Fixed auth
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-12-06 02:13:13 +01:00
parent 633f2af5eb
commit 5a727a6872
5 changed files with 35 additions and 31 deletions

View File

@@ -8,8 +8,8 @@
<md-list>
<md-list-item>
<md-avatar class="md-avatar-icon">J</md-avatar>
<span class="md-list-item-text">Joska</span>
<md-avatar class="md-avatar-icon">{{ avatarText }}</md-avatar>
<span class="md-list-item-text">{{ $store.state.auth.name }}</span>
</md-list-item>
<md-list-item>
@@ -26,10 +26,15 @@ export default {
name: "WorkspaceDrawerContent",
methods: {
performLogout() {
this.$store.dispatch("performLogout").then(() => {
this.$store.dispatch("auth/performLogout").then(() => {
this.$router.push({name: "Welcome"})
})
}
},
computed: {
avatarText() {
return this.$store.state.auth.name.slice(0,2);
}
}
}
</script>