keanu-weblite/src/components/Home.vue

75 lines
1.7 KiB
Vue
Raw Normal View History

2021-01-11 17:42:58 +01:00
<template>
2021-07-06 13:27:15 +02:00
<div class="home">
<YouAre class="mt-4" />
2021-07-10 08:43:47 +02:00
<v-container fluid class="text-center mt-8">
<v-row align="center" justify="center">
<v-col class="text-center" cols="auto">
2023-01-24 20:57:01 +01:00
<v-img contain src="@/assets/logo.svg" width="64" height="64" />
2021-07-10 08:43:47 +02:00
</v-col>
</v-row>
</v-container>
2021-07-06 13:27:15 +02:00
<v-card class="members ma-3" flat>
<v-card-title class="h2">{{ $t("room.room_list_rooms") }}</v-card-title>
<v-card-text class="pa-0">
<RoomList
showInvites
showCreate
title=""
:invitesTitle="$t('room.room_list_invites')"
v-on:newroom="createRoom"
/>
</v-card-text>
</v-card>
<!-- Loading indicator -->
<v-container
fluid
fill-height
v-if="loading"
class="loading-indicator"
>
<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-07-06 13:27:15 +02:00
import RoomList from "../components/RoomList";
import YouAre from "../components/YouAre.vue";
2021-02-09 12:37:56 +01:00
2021-01-11 17:42:58 +01:00
export default {
2021-02-09 12:37:56 +01:00
components: {
2021-07-06 13:27:15 +02:00
RoomList,
YouAre,
2021-02-09 12:37:56 +01:00
},
computed: {
loading() {
return !this.$matrix.ready;
2021-07-06 13:27:15 +02:00
},
},
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("logout");
2021-02-09 12:37:56 +01:00
this.$nextTick(() => {
2021-07-06 13:27:15 +02:00
this.$navigation.push({ path: "/login" }, -1);
});
2021-02-09 12:37:56 +01:00
},
2021-07-06 13:27:15 +02:00
createRoom() {
this.$navigation.push({ name: "CreateRoom" });
2021-07-06 13:27:15 +02:00
},
},
2021-01-11 17:42:58 +01:00
};
</script>
<style lang="scss">
</style>