versão 13h47 14/02
This commit is contained in:
parent
923d6b0655
commit
6d3517332f
24
src/App.vue
24
src/App.vue
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
|
<!-- Navigation Drawer - Hidden on Login Page -->
|
||||||
<v-navigation-drawer
|
<v-navigation-drawer
|
||||||
|
v-if="!isLoginPage"
|
||||||
v-model="drawer"
|
v-model="drawer"
|
||||||
:rail="isCollapsed"
|
:rail="isCollapsed"
|
||||||
:width="260"
|
:width="260"
|
||||||
@ -70,8 +72,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
|
|
||||||
<!-- Top Bar -->
|
<!-- Top Bar - Hidden on Login Page -->
|
||||||
<v-app-bar
|
<v-app-bar
|
||||||
|
v-if="!isLoginPage"
|
||||||
elevation="1"
|
elevation="1"
|
||||||
height="64"
|
height="64"
|
||||||
color="background"
|
color="background"
|
||||||
@ -92,8 +95,14 @@
|
|||||||
</v-app-bar>
|
</v-app-bar>
|
||||||
|
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<v-main>
|
<v-main :class="{ 'pa-0 fill-height': isLoginPage }">
|
||||||
<v-container fluid class="pa-6">
|
<v-container
|
||||||
|
:fluid="true"
|
||||||
|
:class="{
|
||||||
|
'pa-6': !isLoginPage,
|
||||||
|
'pa-0 ma-0 fill-height': isLoginPage
|
||||||
|
}"
|
||||||
|
>
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<component :is="Component"></component>
|
<component :is="Component"></component>
|
||||||
@ -196,7 +205,12 @@ export default {
|
|||||||
...mapGetters('auth', [
|
...mapGetters('auth', [
|
||||||
'isAuthenticated',
|
'isAuthenticated',
|
||||||
'currentUser'
|
'currentUser'
|
||||||
])
|
]),
|
||||||
|
|
||||||
|
// Add new computed property to check if current route is login page
|
||||||
|
isLoginPage() {
|
||||||
|
return this.$route.name === 'login';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -215,7 +229,7 @@ export default {
|
|||||||
await this.$store.dispatch('auth/logout');
|
await this.$store.dispatch('auth/logout');
|
||||||
this.$router.push({ name: 'login' });
|
this.$router.push({ name: 'login' });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.showSnackbar('Erro ao fazer logout', 'error');
|
this.showSnackbar('Sessão Encerrada', 'sucess');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user