Start on Vue 3 changes
This commit is contained in:
parent
dcc4784bfd
commit
c913a40e18
35 changed files with 3570 additions and 1913 deletions
|
|
@ -6,11 +6,9 @@
|
|||
<v-list-item-avatar class="round" size="42" color="#d9d9d9">
|
||||
<v-icon size="11">$vuetify.icons.ic_new_room</v-icon>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="room-list-new-room">{{
|
||||
$t("menu.new_room")
|
||||
}}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
|
||||
<!-- invites -->
|
||||
|
|
@ -22,10 +20,8 @@
|
|||
room.name.substring(0, 1).toUpperCase()
|
||||
}}</span>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="room-list-name">{{ room.name }}</v-list-item-title>
|
||||
<v-list-item-subtitle>{{ room.topic }}</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-btn id="btn-accept" class="filled-button" depressed color="black" @click.stop="acceptInvitation(room)">{{
|
||||
$t("menu.join") }}</v-btn>
|
||||
|
|
@ -41,14 +37,12 @@
|
|||
room.name.substring(0, 1).toUpperCase()
|
||||
}}</span>
|
||||
</v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="room-list-name">{{ room.name }}
|
||||
<!-- <v-icon class="ml-2 mb-1" size="10" v-if="isPublic(room)">$vuetify.icons.ic_public</v-icon> -->
|
||||
</v-list-item-title>
|
||||
<v-list-item-subtitle class="room-list-new-messages" v-if="notificationCount(room) > 0">
|
||||
{{ $t("room.room_list_new_messages", { count: notificationCount(room) }) }}
|
||||
</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-icon size="16" v-if="room.roomId == $matrix.currentRoomId">$vuetify.icons.ic_circle_filled</v-icon>
|
||||
<v-icon size="16" v-else>$vuetify.icons.ic_circle</v-icon>
|
||||
|
|
@ -60,7 +54,6 @@
|
|||
|
||||
<script>
|
||||
import util from "../plugins/utils";
|
||||
import Vue from "vue";
|
||||
import AuthedImage from "./AuthedImage.vue";
|
||||
|
||||
export default {
|
||||
|
|
@ -143,7 +136,7 @@ export default {
|
|||
},
|
||||
|
||||
acceptInvitation(room) {
|
||||
Vue.set(this.roomsProcessing, room.roomId, true);
|
||||
this.roomsProcessing[room.roomId] = true;
|
||||
this.$matrix.matrixClient
|
||||
.joinRoom(room.roomId)
|
||||
.then((ignoredRoom) => {
|
||||
|
|
@ -165,19 +158,19 @@ export default {
|
|||
console.error("Failed to accept invite: ", err);
|
||||
})
|
||||
.finally(() => {
|
||||
Vue.delete(this.roomsProcessing, room.roomId);
|
||||
delete this.roomsProcessing[room.roomId];
|
||||
});
|
||||
},
|
||||
|
||||
rejectInvitation(room) {
|
||||
Vue.set(this.roomsProcessing, room.roomId, true);
|
||||
this.roomsProcessing[room.roomId] = true;
|
||||
this.$matrix
|
||||
.leaveRoom(room.roomId)
|
||||
.catch((err) => {
|
||||
console.error("Failed to reject invite: ", err);
|
||||
})
|
||||
.finally(() => {
|
||||
Vue.delete(this.roomsProcessing, room.roomId);
|
||||
delete this.roomsProcessing[room.roomId];
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue