Better login to app transition after login

This commit is contained in:
Antoine Nguyen
2023-04-21 09:20:15 +02:00
parent 7c23bffe57
commit 4373fe1466
23 changed files with 1417 additions and 1402 deletions
+39 -31
View File
@@ -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
+8 -2
View File
@@ -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
+1 -1
View File
@@ -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