versão 13h47 14/02

This commit is contained in:
Thaís Ferreira 2025-02-14 13:47:52 -03:00
parent 923d6b0655
commit 6d3517332f

View File

@ -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');
}
}
}