From 2817c72ec398de078b0349c17fe591c470b99927 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 29 Jul 2018 22:23:33 -0400 Subject: [PATCH] feat: core improvements + local fs provider + UI fixes --- client/app.js | 2 +- client/components/admin/admin-general.vue | 26 ++++- client/components/admin/admin-stats.vue | 12 ++ client/components/admin/admin-storage.vue | 19 +++- client/components/admin/admin-utilities.vue | 107 ++++++++++-------- client/components/{ => common}/nav-header.vue | 49 ++++---- client/components/editor.vue | 2 +- .../editor/editor-modal-properties.vue | 5 +- client/scss/app.scss | 2 +- client/scss/pages/_welcome.scss | 19 +++- server/core/auth.js | 4 +- server/core/config.js | 6 +- server/core/db.js | 2 +- server/core/kernel.js | 5 +- server/core/localization.js | 2 +- server/core/system.js | 2 +- server/db/migrations/2.0.0.js | 2 + server/graph/resolvers/authentication.js | 8 +- server/graph/resolvers/comment.js | 8 +- server/graph/resolvers/document.js | 10 +- server/graph/resolvers/file.js | 12 +- server/graph/resolvers/folder.js | 8 +- server/graph/resolvers/group.js | 20 ++-- server/graph/resolvers/localization.js | 2 +- server/graph/resolvers/page.js | 12 +- server/graph/resolvers/right.js | 10 +- server/graph/resolvers/setting.js | 4 +- server/graph/resolvers/storage.js | 29 +++-- server/graph/resolvers/system.js | 2 +- server/graph/resolvers/tag.js | 16 +-- server/graph/resolvers/user.js | 12 +- server/jobs/fetch-graph-locale.js | 6 +- server/jobs/sync-graph-locales.js | 4 +- server/{db => }/models/authentication.js | 8 +- server/{db => }/models/editors.js | 6 +- server/{db => }/models/groups.js | 0 server/{db => }/models/locales.js | 0 server/{db => }/models/pageHistory.js | 2 +- server/{db => }/models/pages.js | 21 ++-- server/{db => }/models/settings.js | 2 +- server/{db => }/models/storage.js | 62 ++++++---- server/{db => }/models/tags.js | 0 server/{db => }/models/users.js | 10 +- .../authentication/auth0/authentication.js | 2 +- .../authentication/azure/authentication.js | 2 +- .../authentication/cas/authentication.js | 2 +- .../authentication/discord/authentication.js | 2 +- .../authentication/dropbox/authentication.js | 2 +- .../authentication/facebook/authentication.js | 2 +- .../authentication/github/authentication.js | 2 +- .../authentication/google/authentication.js | 2 +- .../authentication/ldap/authentication.js | 2 +- .../authentication/local/authentication.js | 2 +- .../microsoft/authentication.js | 2 +- .../authentication/oauth2/authentication.js | 2 +- .../authentication/slack/authentication.js | 2 +- .../authentication/twitch/authentication.js | 2 +- server/modules/storage/box/definition.yml | 7 ++ server/modules/storage/box/storage.js | 23 ++++ server/modules/storage/disk/definition.yml | 7 +- server/modules/storage/disk/storage.js | 85 ++++++++++---- server/modules/storage/git/definition.yml | 24 +++- server/setup.js | 20 ++-- server/views/main/welcome.pug | 10 +- wiki.js | 2 +- 65 files changed, 482 insertions(+), 264 deletions(-) rename client/components/{ => common}/nav-header.vue (82%) rename server/{db => }/models/authentication.js (92%) rename server/{db => }/models/editors.js (89%) rename server/{db => }/models/groups.js (100%) rename server/{db => }/models/locales.js (100%) rename server/{db => }/models/pageHistory.js (97%) rename server/{db => }/models/pages.js (81%) rename server/{db => }/models/settings.js (94%) rename server/{db => }/models/storage.js (56%) rename server/{db => }/models/tags.js (100%) rename server/{db => }/models/users.js (96%) create mode 100644 server/modules/storage/box/definition.yml create mode 100644 server/modules/storage/box/storage.js diff --git a/client/app.js b/client/app.js index 6bb98be7..e2984492 100644 --- a/client/app.js +++ b/client/app.js @@ -110,7 +110,7 @@ Vue.prototype.Velocity = Velocity Vue.component('admin', () => import(/* webpackChunkName: "admin" */ './components/admin.vue')) Vue.component('editor', () => import(/* webpackChunkName: "editor" */ './components/editor.vue')) Vue.component('login', () => import(/* webpackMode: "eager" */ './components/login.vue')) -Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/nav-header.vue')) +Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/common/nav-header.vue')) Vue.component('profile', () => import(/* webpackChunkName: "profile" */ './components/profile.vue')) Vue.component('setup', () => import(/* webpackChunkName: "setup" */ './components/setup.vue')) Vue.component('v-card-chin', () => import(/* webpackMode: "eager" */ './components/common/v-card-chin.vue')) diff --git a/client/components/admin/admin-general.vue b/client/components/admin/admin-general.vue index d07dfac0..f6392c26 100644 --- a/client/components/admin/admin-general.vue +++ b/client/components/admin/admin-general.vue @@ -13,14 +13,34 @@ v-toolbar-title .subheading {{ $t('admin:general.siteInfo') }} v-subheader General - .px-3 + .px-3.pb-3 v-text-field(label='Site Title', required, :counter='50', v-model='siteTitle', prepend-icon='public') - v-divider.mt-3 + v-divider v-subheader SEO - .px-3 + .px-3.pb-3 v-text-field(label='Site Description', :counter='255', prepend-icon='public') v-text-field(label='Site Keywords', :counter='255', prepend-icon='public') v-select(label='Meta Robots', chips, tags, :items='metaRobots', v-model='metaRobotsSelection', prepend-icon='public') + v-divider + v-subheader Analytics + .px-3.pb-3 + v-text-field( + label='Google Analytics ID' + :counter='255' + prepend-icon='public' + persistent-hint + hint='Property tracking ID for Google Analytics.' + ) + v-divider + v-subheader Footer Copyright + .px-3.pb-3 + v-text-field( + label='Company / Organization Name' + :counter='255' + prepend-icon='public' + persistent-hint + hint='Name to use when displaying copyright notice in the footer. Leave empty to hide.' + ) v-card-chin v-spacer v-btn(color='primary') diff --git a/client/components/admin/admin-stats.vue b/client/components/admin/admin-stats.vue index ea40e640..c6226c06 100644 --- a/client/components/admin/admin-stats.vue +++ b/client/components/admin/admin-stats.vue @@ -4,10 +4,22 @@ v-flex(xs12) .headline.primary--text Statistics .subheading.grey--text Useful information about your wiki + .pa-3 + fingerprint-spinner( + :animation-duration='1500' + :size='128' + color='#e91e63' + ) + .caption.pink--text.mt-3 Compiling latest data...