mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-21 10:24:05 +01:00
Better login to app transition after login
This commit is contained in:
+39
-31
@@ -1,35 +1,40 @@
|
||||
<template>
|
||||
<v-app v-if="!isAuthenticated">
|
||||
<v-main>
|
||||
<router-view />
|
||||
</v-main>
|
||||
</v-app>
|
||||
<v-app v-else>
|
||||
<navbar />
|
||||
<v-main>
|
||||
<v-container fluid>
|
||||
<router-view/>
|
||||
</v-container>
|
||||
</v-main>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:color="notificationColor"
|
||||
:timeout="notificationTimeout"
|
||||
top
|
||||
>
|
||||
{{ notification }}
|
||||
<v-app>
|
||||
<template v-if="layoutTemplate === 'empty'">
|
||||
<v-main>
|
||||
<router-view />
|
||||
</v-main>
|
||||
</template>
|
||||
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn
|
||||
color="white"
|
||||
text
|
||||
v-bind="attrs"
|
||||
@click="snackbar = false"
|
||||
>
|
||||
<translate>Close</translate>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-snackbar>
|
||||
<template v-else>
|
||||
<navbar />
|
||||
<v-main>
|
||||
<v-container fluid>
|
||||
<transition name="fade">
|
||||
<router-view/>
|
||||
</transition>
|
||||
</v-container>
|
||||
</v-main>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:color="notificationColor"
|
||||
:timeout="notificationTimeout"
|
||||
top
|
||||
>
|
||||
{{ notification }}
|
||||
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn
|
||||
color="white"
|
||||
text
|
||||
v-bind="attrs"
|
||||
@click="snackbar = false"
|
||||
>
|
||||
<translate>Close</translate>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-snackbar>
|
||||
</template>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
@@ -44,7 +49,10 @@ export default {
|
||||
computed: {
|
||||
...mapGetters({
|
||||
isAuthenticated: 'auth/isAuthenticated'
|
||||
})
|
||||
}),
|
||||
layoutTemplate () {
|
||||
return this.$route.meta.layoutTemplate || '2cols'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
Navbar
|
||||
|
||||
@@ -22,12 +22,18 @@ const routes = [
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue'),
|
||||
meta: {
|
||||
layoutTemplate: 'empty'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/twofa',
|
||||
name: 'TwoFA',
|
||||
component: () => import('../views/TwoFA.vue')
|
||||
component: () => import('../views/TwoFA.vue'),
|
||||
meta: {
|
||||
layoutTemplate: 'empty'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/domains',
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -67,7 +67,6 @@
|
||||
</template>
|
||||
</import-form>
|
||||
</v-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -89,6 +88,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loading: true,
|
||||
showAliasForm: false,
|
||||
showDomainWizard: false,
|
||||
showImportForm: false
|
||||
|
||||
Reference in New Issue
Block a user