Versão 04/02 16h44
This commit is contained in:
parent
71222216c2
commit
4790d5c5cf
27
src/App.vue
27
src/App.vue
@ -20,6 +20,7 @@
|
||||
color="white"
|
||||
v-bind="props"
|
||||
class="collapse-button"
|
||||
size="small"
|
||||
>
|
||||
<v-icon>
|
||||
{{ isCollapsed ? 'mdi-menu' : 'mdi-chevron-left' }}
|
||||
@ -55,12 +56,12 @@
|
||||
link
|
||||
class="menu-item d-flex align-center"
|
||||
>
|
||||
<v-list-item-icon class="mr-3">
|
||||
<template v-slot:prepend>
|
||||
<v-icon color="white">{{ item.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
</template>
|
||||
<v-list-item-title
|
||||
v-if="!isCollapsed"
|
||||
class="text-white menu-title"
|
||||
class="text-white"
|
||||
>
|
||||
{{ item.label }}
|
||||
</v-list-item-title>
|
||||
@ -131,6 +132,12 @@ export default {
|
||||
icon: 'mdi-flask',
|
||||
label: 'Testes'
|
||||
},
|
||||
{
|
||||
name: 'register',
|
||||
route: { name: 'register' },
|
||||
icon: 'mdi-file-document-plus',
|
||||
label: 'Cadastro'
|
||||
},
|
||||
{
|
||||
name: 'users',
|
||||
route: { name: 'users' },
|
||||
@ -155,12 +162,14 @@ export default {
|
||||
toggleDrawer() {
|
||||
this.isCollapsed = !this.isCollapsed
|
||||
},
|
||||
logout() {
|
||||
// Implement logout logic
|
||||
console.log('Logout')
|
||||
// Example:
|
||||
// this.$store.dispatch('logout')
|
||||
// this.$router.push('/login')
|
||||
async logout() {
|
||||
try {
|
||||
// Implement logout logic here
|
||||
await this.$store.dispatch('auth/logout')
|
||||
this.$router.push('/login')
|
||||
} catch (error) {
|
||||
console.error('Erro ao fazer logout:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user