wikijs-fork/client/components/profile.vue

99 lines
2.6 KiB
Vue
Raw Permalink Normal View History

2018-05-21 03:27:06 +00:00
<template lang='pug'>
2020-05-08 22:48:07 +00:00
v-app(:dark='$vuetify.theme.dark').profile
2018-05-21 03:27:06 +00:00
nav-header
v-navigation-drawer.pb-0(v-model='profileDrawerShown', app, fixed, clipped, left, permanent)
v-list(dense, nav)
2020-04-05 23:30:02 +00:00
v-list-item(to='/profile', color='primary')
2020-03-30 05:30:10 +00:00
v-list-item-action: v-icon mdi-face-profile
v-list-item-content
2020-04-05 23:30:02 +00:00
v-list-item-title {{$t('profile:title')}}
2020-03-30 05:30:10 +00:00
//- v-list-item(to='/preferences', disabled)
//- v-list-item-action: v-icon(color='grey lighten-1') mdi-cog-outline
//- v-list-item-content
//- v-list-item-title Preferences
//- v-list-item-subtitle.caption.grey--text.text--lighten-1 Coming soon
2020-04-05 23:30:02 +00:00
v-list-item(to='/pages', color='primary')
v-list-item-action: v-icon mdi-file-document-outline
v-list-item-content
2020-04-05 23:30:02 +00:00
v-list-item-title {{$t('profile:pages.title')}}
//- 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 {{$t('profile:comments.title')}}
//- v-list-item-subtitle.caption.grey--text.text--lighten-1 Coming soon
2018-05-21 03:27:06 +00:00
v-content(:class='$vuetify.theme.dark ? "grey darken-4" : "grey lighten-5"')
2018-05-21 03:27:06 +00:00
transition(name='profile-router')
router-view
nav-footer
notify
search-results
2018-05-21 03:27:06 +00:00
</template>
<script>
import VueRouter from 'vue-router'
2020-05-08 22:48:07 +00:00
/* global WIKI */
2018-05-28 18:46:55 +00:00
2018-05-21 03:27:06 +00:00
const router = new VueRouter({
mode: 'history',
base: '/p',
routes: [
{ path: '/', redirect: '/profile' },
{ path: '/profile', component: () => import(/* webpackChunkName: "profile" */ './profile/profile.vue') },
{ path: '/pages', component: () => import(/* webpackChunkName: "profile" */ './profile/pages.vue') },
{ path: '/comments', component: () => import(/* webpackChunkName: "profile" */ './profile/comments.vue') }
]
})
2018-05-28 18:46:55 +00:00
router.beforeEach((to, from, next) => {
WIKI.$store.commit('loadingStart', 'profile')
next()
})
router.afterEach((to, from) => {
WIKI.$store.commit('loadingStop', 'profile')
})
2018-05-21 03:27:06 +00:00
export default {
2020-03-30 05:30:10 +00:00
i18nOptions: { namespaces: 'profile' },
2018-05-21 03:27:06 +00:00
data() {
return {
profileDrawerShown: true
}
},
router,
created() {
this.$store.commit('page/SET_MODE', 'profile')
}
2018-05-21 03:27:06 +00:00
}
</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;
}
}
2018-05-21 03:27:06 +00:00
</style>