From a0d9804116fa791ab2aeea64a2ae793c452432c0 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sun, 30 Sep 2018 18:19:28 -0400 Subject: [PATCH] feat: page selector (wip) --- client/client-app.js | 3 +- client/components/admin/admin-pages.vue | 10 ++- client/components/common/page-selector.vue | 100 +++++++++++++++++++++ 3 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 client/components/common/page-selector.vue diff --git a/client/client-app.js b/client/client-app.js index 0bf9d238..39d5f3ba 100644 --- a/client/client-app.js +++ b/client/client-app.js @@ -128,9 +128,10 @@ Vue.component('login', () => import(/* webpackPrefetch: true, webpackChunkName: Vue.component('nav-footer', () => import(/* webpackMode: "eager" */ './components/common/nav-footer.vue')) Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/common/nav-header.vue')) Vue.component('nav-sidebar', () => import(/* webpackMode: "eager" */ './components/common/nav-sidebar.vue')) +Vue.component('page', () => import(/* webpackChunkName: "theme-page" */ './themes/' + process.env.CURRENT_THEME + '/components/app.vue')) +Vue.component('page-selector', () => import(/* webpackPrefetch: true, webpackChunkName: "ui-extra" */ './components/common/page-selector.vue')) Vue.component('profile', () => import(/* webpackChunkName: "profile" */ './components/profile.vue')) Vue.component('v-card-chin', () => import(/* webpackPrefetch: true, webpackChunkName: "ui-extra" */ './components/common/v-card-chin.vue')) -Vue.component('page', () => import(/* webpackChunkName: "theme-page" */ './themes/' + process.env.CURRENT_THEME + '/components/app.vue')) let bootstrap = () => { // ==================================== diff --git a/client/components/admin/admin-pages.vue b/client/components/admin/admin-pages.vue index 5697e707..29ce64b3 100644 --- a/client/components/admin/admin-pages.vue +++ b/client/components/admin/admin-pages.vue @@ -10,7 +10,7 @@ v-spacer v-btn(color='grey', outline, @click='refresh', large) v-icon.grey--text refresh - v-btn(color='primary', depressed, @click='save', large) + v-btn(color='primary', depressed, large, @click='newpage') v-icon(left) add span New Page v-card.mt-3 @@ -33,6 +33,8 @@ v-alert.ma-3(icon='warning', :value='true', outline) No pages to display. .text-xs-center.py-2(v-if='groups.length > 15') v-pagination(v-model='pagination.page', :length='pages') + + page-selector(v-model='pageSelectorShown', mode='new')