From edd0c1a00a5c9eb66393477928b46f2606e2a340 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sun, 23 Sep 2018 00:14:01 -0400 Subject: [PATCH] feat: admin navigation UI --- client/app.js | 3 +- client/components/admin.vue | 8 +- client/components/admin/admin-navigation.vue | 171 +++++++++++++++++++ client/components/common/nav-sidebar.vue | 35 ++++ client/themes/default/components/app.vue | 17 +- 5 files changed, 214 insertions(+), 20 deletions(-) create mode 100644 client/components/admin/admin-navigation.vue create mode 100644 client/components/common/nav-sidebar.vue diff --git a/client/app.js b/client/app.js index 8b461372..2ff071e7 100644 --- a/client/app.js +++ b/client/app.js @@ -113,7 +113,8 @@ Vue.component('admin', () => import(/* webpackChunkName: "admin" */ './component Vue.component('editor', () => import(/* webpackPrefetch: -100, webpackChunkName: "editor" */ './components/editor.vue')) Vue.component('login', () => import(/* webpackPrefetch: true, webpackChunkName: "login" */ './components/login.vue')) Vue.component('nav-footer', () => import(/* webpackMode: "eager" */ './components/common/nav-footer.vue')) -Vue.component('nav-header', () => import(/* webpackMode: "lazy" */ './components/common/nav-header.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('profile', () => import(/* webpackChunkName: "profile" */ './components/profile.vue')) Vue.component('setup', () => import(/* webpackChunkName: "setup" */ './components/setup.vue')) Vue.component('v-card-chin', () => import(/* webpackPrefetch: true, webpackChunkName: "ui-extra" */ './components/common/v-card-chin.vue')) diff --git a/client/components/admin.vue b/client/components/admin.vue index c67955ea..5e551923 100644 --- a/client/components/admin.vue +++ b/client/components/admin.vue @@ -14,12 +14,12 @@ v-list-tile(to='/locale') v-list-tile-avatar: v-icon language v-list-tile-title {{ $t('admin:locale.title') }} + v-list-tile(to='/navigation') + v-list-tile-avatar: v-icon near_me + v-list-tile-title {{ $t('admin:navigation.title') }} v-list-tile(to='/pages') v-list-tile-avatar: v-icon insert_drive_file v-list-tile-title {{ $t('admin:pages.title') }} - v-list-tile(to='/stats') - v-list-tile-avatar: v-icon show_chart - v-list-tile-title {{ $t('admin:stats.title') }} v-list-tile(to='/theme') v-list-tile-avatar: v-icon palette v-list-tile-title {{ $t('admin:theme.title') }} @@ -93,8 +93,8 @@ const router = new VueRouter({ { path: '/dashboard', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-dashboard.vue') }, { path: '/general', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-general.vue') }, { path: '/locale', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-locale.vue') }, + { path: '/navigation', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-navigation.vue') }, { path: '/pages', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-pages.vue') }, - { path: '/stats', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-stats.vue') }, { path: '/theme', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-theme.vue') }, { path: '/groups', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-groups.vue') }, { path: '/groups/:id', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-groups-edit.vue') }, diff --git a/client/components/admin/admin-navigation.vue b/client/components/admin/admin-navigation.vue new file mode 100644 index 00000000..c3476a68 --- /dev/null +++ b/client/components/admin/admin-navigation.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/client/components/common/nav-sidebar.vue b/client/components/common/nav-sidebar.vue new file mode 100644 index 00000000..8a4c311d --- /dev/null +++ b/client/components/common/nav-sidebar.vue @@ -0,0 +1,35 @@ + + + diff --git a/client/themes/default/components/app.vue b/client/themes/default/components/app.vue index a8a76c38..28a709b7 100644 --- a/client/themes/default/components/app.vue +++ b/client/themes/default/components/app.vue @@ -11,21 +11,7 @@ :temporary='$vuetify.breakpoint.xs' v-model='navShown' ) - v-list(dense) - v-list-tile.pt-2(href='/') - v-list-tile-avatar: v-icon home - v-list-tile-title Home - v-divider.my-2 - v-subheader.pl-4 Navigation - v-list-tile - v-list-tile-avatar: v-icon stars - v-list-tile-title The Universe - v-list-tile - v-list-tile-avatar: v-icon directions_boat - v-list-tile-title Ships - v-list-tile - v-list-tile-avatar: v-icon local_airport - v-list-tile-title Airports + nav-sidebar v-content v-toolbar(color='grey lighten-3', flat, dense) @@ -33,6 +19,7 @@ v-icon(color='grey darken-2', left) menu span Navigation v-breadcrumbs.pl-0(v-else, divider='/') + v-breadcrumbs-item: v-icon home v-breadcrumbs-item Universe v-breadcrumbs-item Galaxy v-breadcrumbs-item Solar System