diff --git a/src/App.vue b/src/App.vue index 8f7255f..898a6f2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,6 +20,7 @@ color="white" v-bind="props" class="collapse-button" + size="small" > {{ isCollapsed ? 'mdi-menu' : 'mdi-chevron-left' }} @@ -55,12 +56,12 @@ link class="menu-item d-flex align-center" > - + {{ item.label }} @@ -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) + } } } }