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