diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f6f54eb..6b855aa9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/client/js/components/alert.vue b/client/js/components/alert.vue index bb5826d8..95af3539 100644 --- a/client/js/components/alert.vue +++ b/client/js/components/alert.vue @@ -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 }, } } diff --git a/client/js/components/anchor.vue b/client/js/components/anchor.vue index a1338128..4f2bda58 100644 --- a/client/js/components/anchor.vue +++ b/client/js/components/anchor.vue @@ -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() diff --git a/client/js/components/editor-codeblock.vue b/client/js/components/editor-codeblock.vue index b9fde4c8..b486d823 100644 --- a/client/js/components/editor-codeblock.vue +++ b/client/js/components/editor-codeblock.vue @@ -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() diff --git a/client/js/components/editor-file.vue b/client/js/components/editor-file.vue index 79853e28..f944e38c 100644 --- a/client/js/components/editor-file.vue +++ b/client/js/components/editor-file.vue @@ -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 }) }) }, diff --git a/client/js/components/editor-video.vue b/client/js/components/editor-video.vue index 6a2b2ba3..38e9fef8 100644 --- a/client/js/components/editor-video.vue +++ b/client/js/components/editor-video.vue @@ -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() diff --git a/client/js/components/editor.component.js b/client/js/components/editor.component.js index c06bfdc4..455eaeec 100644 --- a/client/js/components/editor.component.js +++ b/client/js/components/editor.component.js @@ -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.' }) } diff --git a/client/js/components/history.vue b/client/js/components/history.vue index 614f4cdb..01d81ff3 100644 --- a/client/js/components/history.vue +++ b/client/js/components/history.vue @@ -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 }) }) diff --git a/client/js/components/modal-create-user.vue b/client/js/components/modal-create-user.vue index 8e0c4c85..50a5023c 100644 --- a/client/js/components/modal-create-user.vue +++ b/client/js/components/modal-create-user.vue @@ -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 }) }) diff --git a/client/js/components/modal-delete-user.vue b/client/js/components/modal-delete-user.vue index f1c8bb6a..95c93ff1 100644 --- a/client/js/components/modal-delete-user.vue +++ b/client/js/components/modal-delete-user.vue @@ -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 }) }) diff --git a/client/js/components/modal-move-page.vue b/client/js/components/modal-move-page.vue index 6eb081a8..ad76f3f6 100644 --- a/client/js/components/modal-move-page.vue +++ b/client/js/components/modal-move-page.vue @@ -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 }) }) diff --git a/client/scss/components/alert.scss b/client/scss/components/alert.scss index 2425796f..f17dc76f 100644 --- a/client/scss/components/alert.scss +++ b/client/scss/components/alert.scss @@ -19,6 +19,7 @@ display: flex; align-items: center; justify-content: center; + font-size: 24px; } &-msg { diff --git a/fuse.js b/fuse.js index 61c758c9..08fe4c0a 100644 --- a/fuse.js +++ b/fuse.js @@ -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') diff --git a/package.json b/package.json index 66bee2b4..4fd195b9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/server/views/pages/admin/profile.pug b/server/views/pages/admin/profile.pug index 8e198d6b..7188eb95 100644 --- a/server/views/pages/admin/profile.pug +++ b/server/views/pages/admin/profile.pug @@ -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 diff --git a/server/views/pages/admin/settings.pug b/server/views/pages/admin/settings.pug index d86d966a..eae6836e 100644 --- a/server/views/pages/admin/settings.pug +++ b/server/views/pages/admin/settings.pug @@ -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 diff --git a/server/views/pages/edit.pug b/server/views/pages/edit.pug index 5ccdc5a4..f9de8fad 100644 --- a/server/views/pages/edit.pug +++ b/server/views/pages/edit.pug @@ -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 diff --git a/yarn.lock b/yarn.lock index 181059cd..80ae8fde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -404,13 +404,13 @@ async@1.5, async@^1.4.0, async@^1.5, async@~1.5: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@2.1.4: +async@2.1.4, async@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" dependencies: lodash "^4.14.0" -async@^2.1.4, async@^2.3.0: +async@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: @@ -2143,9 +2143,9 @@ esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" -esprima@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" esquery@^1.0.0: version "1.0.0" @@ -3831,12 +3831,12 @@ js-yaml@3.5.4: argparse "^1.0.2" esprima "^2.6.0" -js-yaml@^3.5.3, js-yaml@^3.7.0, js-yaml@^3.8.4, js-yaml@~3.8.4: - version "3.8.4" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" +js-yaml@^3.5.3, js-yaml@^3.7.0, js-yaml@^3.8.4, js-yaml@~3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.0.tgz#4ffbbf25c2ac963b8299dc74da7e3740de1c18ce" dependencies: argparse "^1.0.7" - esprima "^3.1.1" + esprima "^4.0.0" jsbn@~0.1.0: version "0.1.1" @@ -6217,9 +6217,9 @@ scss-tokenizer@^0.2.3: js-base64 "^2.1.8" source-map "^0.4.2" -search-index-adder@~0.3.8: - version "0.3.8" - resolved "https://registry.yarnpkg.com/search-index-adder/-/search-index-adder-0.3.8.tgz#2e992507305b4996de63801c38fb9bb2a029fe03" +search-index-adder@~0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/search-index-adder/-/search-index-adder-0.3.9.tgz#a94b5fc5b27f1827c43eab599c760dcc4c29599d" dependencies: JSONStream "^1.2.1" async "^2.3.0" @@ -6230,9 +6230,9 @@ search-index-adder@~0.3.8: optionalDependencies: leveldown "^1.7.1" -search-index-searcher@~0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/search-index-searcher/-/search-index-searcher-0.2.7.tgz#b891127c9ccdfefc5b11cdd752c5d2e524dd4f58" +search-index-searcher@~0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/search-index-searcher/-/search-index-searcher-0.2.8.tgz#4a289f9f6b9c2b6dc064e46cffbd8a3bc830a83b" dependencies: bunyan "^1.8.1" intersect-arrays-to-stream "^0.0.3" @@ -7080,9 +7080,9 @@ uc.micro@^1.0.1, uc.micro@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.3.tgz#7ed50d5e0f9a9fb0a573379259f2a77458d50192" -uglify-es@~3.0.22: - version "3.0.23" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.0.23.tgz#9682c6ae347269ad6b0628bd8b3d6a3b391707c0" +uglify-es@~3.0.24: + version "3.0.24" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.0.24.tgz#fab5dccff6108df71d9573012ef65c740cb97cdc" dependencies: commander "~2.9.0" source-map "~0.5.1" @@ -7096,9 +7096,9 @@ uglify-js@2.7.5, uglify-js@^2.6, uglify-js@^2.6.1: uglify-to-browserify "~1.0.0" yargs "~3.10.0" -uglify-js@~3.0.22: - version "3.0.23" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.23.tgz#a58c6b97e6d6763d94dbc265fe8e8c1725e64666" +uglify-js@~3.0.24: + version "3.0.24" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.24.tgz#ee93400ad9857fb7a1671778db83f6a23f033121" dependencies: commander "~2.9.0" source-map "~0.5.1"