keanu-weblite/src/components/RoomList.vue
N-Pex 85f3a9baef Remove hamburger
Move room list to dropdown, see issue #27
2021-02-01 22:10:48 +01:00

35 lines
961 B
Vue

<template>
<v-list dense class="room-list">
<v-subheader>ROOMS</v-subheader>
<v-list-item-group v-model="currentRoomId" color="primary">
<v-list-item v-for="room in $matrix.rooms" :key="room.roomId" :value="room.roomId">
<v-list-item-avatar color="#e0e0e0">
<v-img :src="room.avatar" />
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title>{{ room.summary.info.title }}</v-list-item-title>
<v-list-item-subtitle>{{ room.topic }}</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-list-item-group>
</v-list>
</template>
<script>
import util from "../plugins/utils";
export default {
name: "RoomList",
data: () => ({
currentRoomId: -1,
}),
watch: {
currentRoomId() {
this.$emit("close");
this.$navigation.push({name: 'Chat', params: { roomId: util.sanitizeRoomId(this.currentRoomId) }}, -1);
},
},
};
</script>