From 416755f17aa4732fdd98d34ca58e66a9885f729a Mon Sep 17 00:00:00 2001 From: NGPixel Date: Mon, 28 May 2018 14:46:55 -0400 Subject: [PATCH] refactor: remove config namespaces --- client/components/nav-header.vue | 2 +- client/components/profile.vue | 11 +++ client/components/profile/preferences.vue | 25 +++++- client/components/profile/profile.vue | 100 +++++++++++++++------- client/components/setup.vue | 12 ++- client/scss/app.scss | 1 + client/scss/pages/_error.scss | 64 ++++++++++++++ config.sample.yml | 26 +----- server/app/data.yml | 9 +- server/core/auth.js | 68 ++++++++------- server/core/config.js | 41 +++------ server/core/db.js | 26 +++--- server/core/kernel.js | 94 +++++++------------- server/core/localization.js | 5 +- server/db/migrations/2.0.0.js | 41 +++++++-- server/db/models/authentication.js | 64 ++++++++++++++ server/db/models/editors.js | 62 ++++++++++++++ server/db/models/settings.js | 18 +++- server/db/models/users.js | 3 + server/index.js | 11 +-- server/jobs/fetch-graph-locale.js | 9 +- server/jobs/sync-graph-locales.js | 9 +- server/master.js | 2 +- server/modules/editor/markdown.js | 10 +++ server/setup.js | 74 ++++++++-------- server/views/error.pug | 33 ++++--- wiki.js | 19 ++-- 27 files changed, 556 insertions(+), 283 deletions(-) create mode 100644 client/scss/pages/_error.scss create mode 100644 server/db/models/authentication.js create mode 100644 server/db/models/editors.js create mode 100644 server/modules/editor/markdown.js diff --git a/client/components/nav-header.vue b/client/components/nav-header.vue index e84fbf12..5d033e62 100644 --- a/client/components/nav-header.vue +++ b/client/components/nav-header.vue @@ -58,7 +58,7 @@ color='blue' ) v-spacer - v-progress-circular.mr-3(indeterminate, color='blue', v-show='isLoading') + v-progress-circular.mr-3(indeterminate, color='blue', :size='22', :width='2' v-show='isLoading') slot(name='actions') transition(name='navHeaderSearch') v-btn(icon, @click='searchToggle', v-if='!searchIsShown') diff --git a/client/components/profile.vue b/client/components/profile.vue index 9e3ae15c..df30f1c6 100644 --- a/client/components/profile.vue +++ b/client/components/profile.vue @@ -41,6 +41,8 @@ import VueRouter from 'vue-router' import { mapState } from 'vuex' +/* global WIKI */ + const router = new VueRouter({ mode: 'history', base: '/p', @@ -53,6 +55,15 @@ const router = new VueRouter({ ] }) +router.beforeEach((to, from, next) => { + WIKI.$store.commit('loadingStart', 'profile') + next() +}) + +router.afterEach((to, from) => { + WIKI.$store.commit('loadingStop', 'profile') +}) + export default { data() { return { diff --git a/client/components/profile/preferences.vue b/client/components/profile/preferences.vue index c20ce0f1..9a9103bc 100644 --- a/client/components/profile/preferences.vue +++ b/client/components/profile/preferences.vue @@ -12,13 +12,32 @@ v-toolbar(color='primary', dark, dense, flat) v-toolbar-title .subheading Display - v-subheader Locale + v-card-text + v-subheader.pl-0 Locale + v-select.grey.lighten-5(solo, flat) + v-divider + v-subheader.pl-0 Timezone + v-select.grey.lighten-5(solo, flat) + v-divider.my-0 + v-card-actions.grey.lighten-4 + v-spacer + v-btn(color='primary') + v-icon(left) chevron_right + span Save v-flex(lg6 xs12) v-card v-toolbar(color='primary', dark, dense, flat) v-toolbar-title - .subheading --- - v-card-text --- + .subheading Editing + v-card-text + v-subheader.pl-0 Default Editor + v-select.grey.lighten-5(solo, flat) + v-divider.my-0 + v-card-actions.grey.lighten-4 + v-spacer + v-btn(color='primary') + v-icon(left) chevron_right + span Save diff --git a/client/components/profile/profile.vue b/client/components/profile/profile.vue index 83b252c6..621a5a50 100644 --- a/client/components/profile/profile.vue +++ b/client/components/profile/profile.vue @@ -1,40 +1,74 @@