Improved navigation and room handling

This commit is contained in:
N-Pex 2021-01-28 22:13:08 +01:00
parent 8d652767be
commit 8555436bc7
10 changed files with 229 additions and 164 deletions

View file

@ -30,7 +30,8 @@
<div class="h1">{{ displayName }}</div>
<div v-if="$matrix.currentUser.is_guest">
This identity is temporary. Set a password to use it again.
</div>
</div>
<v-btn block class="outlined-button" @click.stop="logout">Logout</v-btn>
</v-col>
</v-row>
</v-container>
@ -177,6 +178,14 @@ export default {
return null;
},
logout() {
//TODO - For guest accounts, show warning about not being able to rejoin.
this.$store.dispatch("auth/logout");
this.$nextTick(() => {
this.$navigation.push({path: "/login"}, -1);
})
},
setDisplayName(name) {
this.$matrix.matrixClient.setDisplayName(name);
},