You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/client/components/profile.vue

103 lines
2.7 KiB

<template lang='pug'>
v-app(:dark='darkMode').profile
nav-header
v-navigation-drawer.pb-0(v-model='profileDrawerShown', app, fixed, clipped, left, permanent)
v-list(dense, nav)
v-list-item(to='/profile')
v-list-item-action: v-icon mdi-account-badge
v-list-item-content
v-list-item-title Profile
v-list-item(to='/preferences', disabled)
v-list-item-action: v-icon(color='grey lighten-1') mdi-settings-outline
v-list-item-content
v-list-item-title Preferences
v-list-item-subtitle.caption.grey--text.text--lighten-1 Coming soon
v-list-item(to='/pages', disabled)
v-list-item-action: v-icon(color='grey lighten-1') mdi-file-document
v-list-item-content
v-list-item-title Pages
v-list-item-subtitle.caption.grey--text.text--lighten-1 Coming soon
v-list-item(to='/comments', disabled)
v-list-item-action: v-icon(color='grey lighten-1') mdi-message-reply-text
v-list-item-content
v-list-item-title Comments
v-list-item-subtitle.caption.grey--text.text--lighten-1 Coming soon
v-content
transition(name='profile-router')
router-view
nav-footer
notify
search-results
</template>
<script>
import VueRouter from 'vue-router'
/* global WIKI, siteConfig */
const router = new VueRouter({
mode: 'history',
base: '/p',
routes: [
{ path: '/', redirect: '/profile' },
{ path: '/profile', component: () => import(/* webpackChunkName: "profile" */ './profile/profile.vue') },
{ path: '/preferences', component: () => import(/* webpackChunkName: "profile" */ './profile/preferences.vue') },
{ path: '/pages', component: () => import(/* webpackChunkName: "profile" */ './profile/pages.vue') },
{ path: '/comments', component: () => import(/* webpackChunkName: "profile" */ './profile/comments.vue') }
]
})
router.beforeEach((to, from, next) => {
WIKI.$store.commit('loadingStart', 'profile')
next()
})
router.afterEach((to, from) => {
WIKI.$store.commit('loadingStop', 'profile')
})
export default {
data() {
return {
profileDrawerShown: true
}
},
computed: {
darkMode() { return siteConfig.darkMode }
},
router,
created() {
this.$store.commit('page/SET_MODE', 'profile')
}
}
</script>
<style lang='scss'>
.profile-router {
&-enter-active, &-leave-active {
transition: opacity .25s ease;
opacity: 1;
}
&-enter-active {
transition-delay: .25s;
}
&-enter, &-leave-to {
opacity: 0;
}
}
.profile-header {
display: flex;
justify-content: flex-start;
align-items: center;
&-title {
margin-left: 1rem;
}
}
</style>