Commit 8ad17daa authored by NGPixel's avatar NGPixel Committed by Nicolas Giard

fix: alert icons

parent 5c1ff578
......@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [v1.0.0-beta.14] - Unreleased
### Added
- **Security**: Optional Two-Factor Authentication (2FA) protection
## [v1.0.0-beta.13] - Unreleased
### Added
- **Admin**: Added Host Information section to System Info page
......@@ -9,7 +13,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- **Editor**: Linebreaks are now rendered, can be disabled via config option
- **History**: History section to list all changes
- **Localization**: German locale is now available (thanks to @joetjengerdes)
- **Security**: Optional Two-Factor Authentication (2FA) protection
- **UI**: Support for color themes, code blocks dark/light + colorize on/off
### Changed
......
......@@ -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
})
})
......
......@@ -19,6 +19,7 @@
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
}
&-msg {
......
......@@ -83,7 +83,7 @@ globalTasks.then(() => {
homeDir: './client',
output: './assets/js/$name.js',
alias: ALIASES,
shim: SHIMS,
target: 'browser',
plugins: [
fsbx.EnvPlugin({ NODE_ENV: (dev) ? 'development' : 'production' }),
fsbx.VuePlugin(),
......@@ -114,7 +114,7 @@ globalTasks.then(() => {
log: true
})
const bundleVendor = fuse.bundle('vendor').instructions('~ index.js') // eslint-disable-line no-unused-vars
const bundleVendor = fuse.bundle('vendor').shim(SHIMS).instructions('~ index.js') // eslint-disable-line no-unused-vars
const bundleApp = fuse.bundle('app').instructions('!> [index.js]')
// const bundleApp = fuse.bundle('app').instructions('> index.js')
const bundleSetup = fuse.bundle('configure').instructions('> configure.js')
......
......@@ -70,7 +70,7 @@
"i18next-node-fs-backend": "~1.0.0",
"image-size": "~0.6.0",
"jimp": "~0.2.28",
"js-yaml": "~3.8.4",
"js-yaml": "~3.9.0",
"jsonwebtoken": "~7.4.1",
"klaw": "~2.0.0",
"levelup": "~1.3.8",
......@@ -111,8 +111,8 @@
"read-chunk": "~2.0.0",
"remove-markdown": "~0.2.0",
"request": "~2.81.0",
"search-index-adder": "~0.3.8",
"search-index-searcher": "~0.2.7",
"search-index-adder": "~0.3.9",
"search-index-searcher": "~0.2.8",
"semver": "~5.3.0",
"serve-favicon": "~2.4.3",
"simplemde": "~1.11.2",
......@@ -158,8 +158,8 @@
"snyk": "~1.36.2",
"twemoji-awesome": "~1.0.6",
"typescript": "~2.4.1",
"uglify-es": "~3.0.22",
"uglify-js": "~3.0.22",
"uglify-es": "~3.0.24",
"uglify-js": "~3.0.24",
"vee-validate": "~2.0.0-rc.6",
"vue": "~2.3.4",
"vue-clipboards": "~1.0.2",
......
......@@ -27,7 +27,7 @@ block adminContent
label.label= t('admin:profile.displayname')
p.control.is-fullwidth
input.input(type='text', placeholder=t('admin:profile.displaynameexample'), v-model='name')
section
//-section
label.label #{t('admin:profile.tfa')}: #[strong.is-red(v-cloak) {{ tfaStatus }}]
button.button.is-blue(@click='$store.dispatch("modalProfile2fa/open")', :disabled='tfaIsActive')
i.nc-icon-outline.ui-1_circle-add
......@@ -59,4 +59,4 @@ block adminContent
label.label= t('admin:profile.lastprofileupdate')
p.control= moment(user.updatedAt).format('LL')
modal-profile-2fa
//-modal-profile-2fa
......@@ -5,3 +5,5 @@ block adminContent
h1.title#title= t('nav.syssettings')
h2.subtitle= t('admin:settings.subtitle')
i.pageicon.nc-icon-outline.ui-1_settings-gear-63
.form-sections
section Coming soon
......@@ -18,7 +18,7 @@ block content
.columns.is-gapless
.column.editor-area
textarea(ref='editorTextArea', v-pre)= pageData.markdown
.column.editor-sd
//- .column.editor-sd
.editor-sd-item Images
.editor-sd-item Files
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment