Add "createRoom" as option to Home screen
This commit is contained in:
parent
9223db56a6
commit
67d3c07c30
2 changed files with 10 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="pa-4">
|
||||
<RoomList showInvites />
|
||||
<RoomList showInvites showCreate :title="$t('room.room_list_rooms')" :invitesTitle="$t('room.room_list_invites')" v-on:newroom="createRoom" />
|
||||
<v-btn block depressed class="outlined-button" @click.stop="logout">{{$t('menu.logout')}}</v-btn>
|
||||
|
||||
<!-- Loading indicator -->
|
||||
|
|
@ -42,6 +42,10 @@ export default {
|
|||
this.$navigation.push({path: "/login"}, -1);
|
||||
})
|
||||
},
|
||||
|
||||
createRoom() {
|
||||
this.$navigation.push({ name: "CreateRoom" });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<v-list dense class="room-list">
|
||||
<div v-if="showInvites" class="h4">{{invitesTitle}}</div>
|
||||
<div v-if="showInvites && $matrix.invites.length > 0" class="h4">{{invitesTitle}}</div>
|
||||
<v-list-item-group v-if="showInvites" v-model="currentRoomId" color="primary">
|
||||
<v-slide-y-transition group>
|
||||
<v-list-item :disabled="roomsProcessing[room.roomId]" v-for="room in $matrix.invites" :key="room.roomId" :value="room.roomId">
|
||||
|
|
@ -116,6 +116,10 @@ export default {
|
|||
|
||||
watch: {
|
||||
currentRoomId() {
|
||||
if (this.currentRoomId == null) {
|
||||
// Ignore, this is caused by "new room" etc.
|
||||
return;
|
||||
}
|
||||
this.$emit("close");
|
||||
this.$navigation.push({name: 'Chat', params: { roomId: util.sanitizeRoomId(this.currentRoomId) }}, -1);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue