fix: alert icons
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
computed: {
|
||||
shown() { return this.$store.state.alert.shown },
|
||||
style() { return 'is-' + this.$store.state.alert.style },
|
||||
icon() { return 'icon-' + this.$store.state.alert.icon },
|
||||
icon() { return 'nc-icon-outline ' + this.$store.state.alert.icon },
|
||||
msg() { return this.$store.state.alert.msg },
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@
|
||||
clipboardSuccess () {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'blue',
|
||||
icon: 'clipboard',
|
||||
icon: 'business_notes',
|
||||
msg: this.$t('modal.anchorsuccess')
|
||||
})
|
||||
this.$store.dispatch('anchor/close')
|
||||
@@ -45,7 +45,7 @@
|
||||
clipboardError () {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'clipboard',
|
||||
icon: 'business_notes',
|
||||
msg: this.$t('modal.anchorerror')
|
||||
})
|
||||
this.$refs.anchorURLinput.select()
|
||||
|
@@ -89,14 +89,14 @@ export default {
|
||||
} else {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.codeblockloadingerror')
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: 'Error: ' + err.body.msg
|
||||
})
|
||||
})
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
this.$store.dispatch('editor/insert', codeBlockText)
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'blue',
|
||||
icon: 'inbox',
|
||||
icon: 'files_archive-3d-check',
|
||||
msg: this.$t('editor.codeblocksuccess')
|
||||
})
|
||||
this.cancel()
|
||||
|
@@ -173,7 +173,7 @@
|
||||
},
|
||||
filesize (rawSize) {
|
||||
return this.$helpers.common.filesize(rawSize)
|
||||
}
|
||||
},
|
||||
|
||||
// -------------------------------------------
|
||||
// INSERT LINK TO FILE
|
||||
@@ -251,7 +251,7 @@
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'blue',
|
||||
icon: 'folder2',
|
||||
icon: 'files_folder-check',
|
||||
msg: self.$t('modal.newfoldersuccess', { name: self.newFolderName })
|
||||
})
|
||||
})
|
||||
@@ -285,7 +285,7 @@
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.fileuploaderror', { err: data.msg })
|
||||
})
|
||||
}
|
||||
@@ -323,7 +323,7 @@
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('modal.renamefileerror', { err: data.msg })
|
||||
})
|
||||
}
|
||||
@@ -345,14 +345,14 @@
|
||||
self.loadFiles()
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'blue',
|
||||
icon: 'arrow-right2',
|
||||
icon: 'files_check',
|
||||
msg: self.$t('editor.filemovesuccess')
|
||||
})
|
||||
} else {
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.filemoveerror', { err: data.msg })
|
||||
})
|
||||
}
|
||||
@@ -381,7 +381,7 @@
|
||||
self.loadFiles()
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'blue',
|
||||
icon: 'trash2',
|
||||
icon: 'ui-1_trash',
|
||||
msg: self.$t('editor.filedeletesuccess')
|
||||
})
|
||||
})
|
||||
@@ -449,7 +449,7 @@
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.fileerror')
|
||||
})
|
||||
} else {
|
||||
@@ -470,7 +470,7 @@
|
||||
let moveFolders = this._.map(this.folders, (f) => {
|
||||
return {
|
||||
name: (f !== '') ? f : '/ (root)',
|
||||
icon: 'icon-folder2',
|
||||
icon: 'nc-icon-outline files_folder-15',
|
||||
callback: (key, opt) => {
|
||||
let moveFileId = self._.toString($(opt.$trigger).data('uid'))
|
||||
let moveFileDestFolder = self._.nth(self.folders, key)
|
||||
@@ -497,7 +497,7 @@
|
||||
items: {
|
||||
rename: {
|
||||
name: self.$t('editor.filerenameaction'),
|
||||
icon: 'icon-edit',
|
||||
icon: 'nc-icon-outline files_vector',
|
||||
callback: (key, opt) => {
|
||||
self.renameFileId = self._.toString(opt.$trigger[0].dataset.uid)
|
||||
self.renameFile()
|
||||
@@ -553,7 +553,7 @@
|
||||
self._.forEach(failedUpls, (u) => {
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.fileuploaderror', { err: u.msg })
|
||||
})
|
||||
})
|
||||
@@ -571,7 +571,7 @@
|
||||
} else {
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.fileuploaderror', { err: data.msg })
|
||||
})
|
||||
}
|
||||
@@ -580,7 +580,7 @@
|
||||
error: (error) => {
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: self.$t('editor.fileuploaderror', { err: error.message })
|
||||
})
|
||||
},
|
||||
|
@@ -22,7 +22,7 @@
|
||||
i.icon-vimeo
|
||||
span Vimeo
|
||||
li
|
||||
i.icon-film
|
||||
i.nc-icon-outline.media-1_play-69
|
||||
span Dailymotion
|
||||
li
|
||||
i.icon-video
|
||||
@@ -81,7 +81,7 @@
|
||||
this.$store.dispatch('editor/insert', videoText)
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'blue',
|
||||
icon: 'video',
|
||||
icon: 'media-1_action-74',
|
||||
msg: self.$t('editor.videosuccess')
|
||||
})
|
||||
this.cancel()
|
||||
|
@@ -34,14 +34,14 @@ export default {
|
||||
} else {
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: resp.msg
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: 'Error: ' + err.body.msg
|
||||
})
|
||||
})
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
if (!editor.codemirror.doc.somethingSelected()) {
|
||||
return self.$store.dispatch('alert', {
|
||||
style: 'orange',
|
||||
icon: 'marquee',
|
||||
icon: 'design_drag',
|
||||
msg: 'Invalid selection. Select at least 1 character.'
|
||||
})
|
||||
}
|
||||
|
@@ -29,13 +29,13 @@
|
||||
span {{ $t('history.commit') }}: #[strong {{ current.commit }}]
|
||||
.column.history-info-actions
|
||||
.button-group
|
||||
button.button.is-blue-grey()
|
||||
button.button.is-blue-grey(@click='compareWith')
|
||||
i.nc-icon-outline.design_path-intersect
|
||||
span {{ $t('history.comparewith') }}
|
||||
button.button.is-blue-grey()
|
||||
button.button.is-blue-grey(@click='view')
|
||||
i.nc-icon-outline.ui-1_eye-17
|
||||
span {{ $t('history.view') }}
|
||||
button.button.is-blue-grey()
|
||||
button.button.is-blue-grey(@click='revertToVersion')
|
||||
i.nc-icon-outline.arrows-4_undo-29
|
||||
span {{ $t('history.reverttoversion') }}
|
||||
toggle.is-dark(v-model='sidebyside', :desc='$t("history.sidebyside")')
|
||||
@@ -63,6 +63,27 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
compareWith() {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'purple',
|
||||
icon: 'objects_astronaut',
|
||||
msg: 'Sorry, this function is not available. Coming soon!'
|
||||
})
|
||||
},
|
||||
view() {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'purple',
|
||||
icon: 'objects_astronaut',
|
||||
msg: 'Sorry, this function is not available. Coming soon!'
|
||||
})
|
||||
},
|
||||
revertToVersion() {
|
||||
this.$store.dispatch('alert', {
|
||||
style: 'purple',
|
||||
icon: 'objects_astronaut',
|
||||
msg: 'Sorry, this function is not available. Coming soon!'
|
||||
})
|
||||
},
|
||||
draw() {
|
||||
if (diffuiIsReady) {
|
||||
diffui.draw('#diff', {
|
||||
@@ -90,7 +111,7 @@ export default {
|
||||
console.log(err)
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: 'Error: ' + err.body.error
|
||||
})
|
||||
})
|
||||
|
@@ -84,7 +84,7 @@ export default {
|
||||
} else {
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: resp.msg
|
||||
})
|
||||
}
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
this.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: 'Error: ' + err.body.msg
|
||||
})
|
||||
})
|
||||
|
@@ -47,7 +47,7 @@ export default {
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: resp.msg
|
||||
})
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
self.isLoading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: 'Error: ' + err.body.msg
|
||||
})
|
||||
})
|
||||
|
@@ -39,20 +39,20 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
makeSelection: function () {
|
||||
makeSelection() {
|
||||
let self = this;
|
||||
self._.delay(() => {
|
||||
let startPos = (self._.includes(self.currentPath, '/') ? self._.lastIndexOf(self.movePath, '/') + 1 : 0
|
||||
let startPos = (self._.includes(self.currentPath, '/')) ? self._.lastIndexOf(self.movePath, '/') + 1 : 0
|
||||
self.$helpers.form.setInputSelection(self.$refs.movePageInput, startPos, self.movePath.length)
|
||||
}, 100)
|
||||
},
|
||||
cancel: function () {
|
||||
cancel() {
|
||||
this.$store.dispatch('modalMovePage/close')
|
||||
},
|
||||
move: function () {
|
||||
move () {
|
||||
this.isInvalid = false
|
||||
let newDocPath = this.$helpers.pages.makeSafePath(this.movePath)
|
||||
if (this._.isEmpty(newDocPath) || newDocPath === this.currentPath || newDocPath === 'home') {) {
|
||||
if (this._.isEmpty(newDocPath) || newDocPath === this.currentPath || newDocPath === 'home') {
|
||||
this.isInvalid = true
|
||||
} else {
|
||||
this.isLoading = true
|
||||
@@ -67,7 +67,7 @@
|
||||
this.loading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: resp.msg
|
||||
})
|
||||
}
|
||||
@@ -75,7 +75,7 @@
|
||||
this.loading = false
|
||||
self.$store.dispatch('alert', {
|
||||
style: 'red',
|
||||
icon: 'square-cross',
|
||||
icon: 'ui-2_square-remove-09',
|
||||
msg: 'Error: ' + err.body.msg
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user