Knock support

Also, fix token refresh functionality
This commit is contained in:
N-Pex 2025-05-28 12:29:04 +02:00
parent cfabd8be08
commit e8f04d79c9
11 changed files with 310 additions and 75 deletions

View file

@ -37,6 +37,29 @@
</template>
</v-list-item>
<!-- Knocked rooms -->
<v-list-item :disabled="roomsProcessing[room.roomId]" v-for="room in knockedRooms" :key="room.roomId"
:value="room.roomId" class="room-list-room">
<template v-slot:prepend>
<v-avatar size="42" color="#d9d9d9">
<AuthedImage v-if="roomAvatar(room)" :src="roomAvatar(room)" />
<span v-else class="text-white headline">{{
room.name.substring(0, 1).toUpperCase()
}}</span>
</v-avatar>
</template>
<v-list-item-title class="room-list-name">{{ room.name }}</v-list-item-title>
<v-list-item-subtitle>{{ room.topic }}</v-list-item-subtitle>
<template v-slot:append>
<v-list-item-action>
<v-btn id="btn-reject" class="filled-button" color="black"
@click.stop="rejectInvitation(room)" variant="text">{{
$t("menu.cancel_knock") }}</v-btn>
</v-list-item-action>
</template>
</v-list-item>
<v-list-item v-for="room in joinedRooms" :key="room.roomId" :value="room.roomId"
@click="currentRoomId = room.roomId" class="room-list-room">
<template v-slot:prepend>
@ -96,6 +119,9 @@ export default {
invitedRooms() {
return this.sortItemsOnName(this.$matrix.invites);
},
knockedRooms() {
return this.sortItemsOnName(this.$matrix.knockedRooms);
},
joinedRooms() {
// show room with notification on top, followed by room decending order by active Timestamp
return [...this.$matrix.joinedRooms].sort((a, b) => {