wikijs-fork/client/components/admin.vue

142 lines
5.9 KiB
Vue
Raw Normal View History

2018-02-28 05:54:09 +00:00
<template lang='pug'>
2018-06-10 00:11:00 +00:00
v-app(:dark='darkMode').admin
nav-header
2018-02-28 05:54:09 +00:00
v-navigation-drawer.pb-0(v-model='adminDrawerShown', app, fixed, clipped, left, permanent)
v-list(dense)
v-list-tile.pt-2(to='/dashboard')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon dashboard
v-list-tile-title {{ $t('admin:dashboard.title') }}
2018-02-28 05:54:09 +00:00
v-divider.my-2
v-subheader.pl-4 {{ $t('admin:nav.site') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/general')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon widgets
v-list-tile-title {{ $t('admin:general.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/locale')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon language
v-list-tile-title {{ $t('admin:locale.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/stats')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon show_chart
v-list-tile-title {{ $t('admin:stats.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/theme')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon palette
v-list-tile-title {{ $t('admin:theme.title') }}
2018-02-28 05:54:09 +00:00
v-divider.my-2
v-subheader.pl-4 {{ $t('admin:nav.users') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/groups')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon people
v-list-tile-title {{ $t('admin:groups.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/users')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon perm_identity
v-list-tile-title {{ $t('admin:users.title') }}
2018-06-10 00:11:00 +00:00
v-list-tile-action
.justify-end
v-chip(small, disabled, color='grey lighten-4')
.caption.grey--text 1
2018-02-28 05:54:09 +00:00
v-divider.my-2
v-subheader.pl-4 {{ $t('admin:nav.modules') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/auth')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon lock_outline
v-list-tile-title {{ $t('admin:auth.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/editor')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon transform
v-list-tile-title {{ $t('admin:editor.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/logging')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon graphic_eq
v-list-tile-title {{ $t('admin:logging.title') }}
2018-06-11 03:23:09 +00:00
v-list-tile(to='/rendering')
v-list-tile-avatar: v-icon system_update_alt
v-list-tile-title {{ $t('admin:rendering.title') }}
v-list-tile(to='/search')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon search
v-list-tile-title {{ $t('admin:search.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/storage')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon storage
v-list-tile-title {{ $t('admin:storage.title') }}
2018-02-28 05:54:09 +00:00
v-divider.my-2
v-subheader.pl-4 {{ $t('admin:nav.system') }}
v-list-tile(to='/api')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon call_split
v-list-tile-title {{ $t('admin:api.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/system')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon tune
v-list-tile-title {{ $t('admin:system.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/utilities')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon build
v-list-tile-title {{ $t('admin:utilities.title') }}
2018-02-28 05:54:09 +00:00
v-list-tile(to='/dev')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon weekend
v-list-tile-title {{ $t('admin:dev.title') }}
2018-04-14 19:22:45 +00:00
v-divider.my-2
v-list-tile(to='/contribute')
2018-06-10 00:11:00 +00:00
v-list-tile-avatar: v-icon favorite
v-list-tile-title {{ $t('admin:contribute.title') }}
2018-02-28 05:54:09 +00:00
v-content
transition(name='admin-router')
router-view
2018-02-28 05:54:09 +00:00
nav-footer
2018-02-28 05:54:09 +00:00
</template>
<script>
import VueRouter from 'vue-router'
import { get } from 'vuex-pathify'
2018-06-10 00:11:00 +00:00
2018-02-28 05:54:09 +00:00
const router = new VueRouter({
mode: 'history',
base: '/a',
routes: [
{ path: '/', redirect: '/dashboard' },
2018-03-28 04:02:32 +00:00
{ 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: '/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') },
{ path: '/users', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-users.vue') },
{ path: '/auth', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-auth.vue') },
{ path: '/rendering', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-rendering.vue') },
{ path: '/editor', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-editor.vue') },
{ path: '/logging', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-logging.vue') },
{ path: '/search', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-search.vue') },
{ path: '/storage', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-storage.vue') },
{ path: '/api', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-api.vue') },
{ path: '/system', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-system.vue') },
{ path: '/utilities', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-utilities.vue') },
2018-04-14 19:22:45 +00:00
{ path: '/dev', component: () => import(/* webpackChunkName: "admin-dev" */ './admin/admin-dev.vue') },
2018-06-10 00:11:00 +00:00
{ path: '/contribute', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-contribute.vue') }
2018-02-28 05:54:09 +00:00
]
})
export default {
i18nOptions: { namespaces: 'admin' },
2018-02-28 05:54:09 +00:00
data() {
return {
adminDrawerShown: true
}
},
computed: {
darkMode: get('site/dark')
},
2018-08-04 21:27:55 +00:00
router
2018-02-28 05:54:09 +00:00
}
</script>
<style lang='scss'>
.admin-router {
&-enter-active, &-leave-active {
transition: opacity .25s ease;
opacity: 1;
}
&-enter-active {
transition-delay: .25s;
}
&-enter, &-leave-to {
opacity: 0;
}
}
2018-02-28 05:54:09 +00:00
</style>