keanu-weblite/src/components/Home.vue

50 lines
1 KiB
Vue
Raw Normal View History

2021-01-11 17:42:58 +01:00
<template>
<div class="pa-4">
<RoomList showInvites />
<v-btn block depressed class="outlined-button" @click.stop="logout">Logout</v-btn>
<!-- Loading indicator -->
<v-container
fluid
fill-height
style="position: absolute;background-color:rgba(0,0,0,0.2)"
v-if="loading"
>
<v-row align="center" justify="center">
<v-col class="text-center">
<v-progress-circular
indeterminate
color="primary"
></v-progress-circular>
</v-col>
</v-row>
</v-container>
2021-01-11 17:42:58 +01:00
</div>
</template>
<script>
2021-02-09 12:37:56 +01:00
import RoomList from '../components/RoomList';
2021-01-11 17:42:58 +01:00
export default {
2021-02-09 12:37:56 +01:00
components: {
RoomList
},
computed: {
loading() {
return !this.$matrix.ready;
}
},
2021-02-09 12:37:56 +01:00
methods: {
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);
})
},
}
2021-01-11 17:42:58 +01:00
};
</script>
<style lang="scss">
</style>