parent
f0e281b141
commit
ed8fea5de2
2 changed files with 34 additions and 0 deletions
|
|
@ -828,6 +828,14 @@ $admin-fg: white;
|
|||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.member .user-name {
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.member .start-private-chat {
|
||||
margin-left: 38px;
|
||||
}
|
||||
|
||||
.member::after {
|
||||
content: " ";
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@
|
|||
member.name.substring(0, 1).toUpperCase()
|
||||
}}</span>
|
||||
</v-avatar>
|
||||
<span class="user-name">
|
||||
{{
|
||||
member.userId == $matrix.currentUserId
|
||||
? $t("room_info.user_you", {
|
||||
|
|
@ -151,6 +152,8 @@
|
|||
user: member.user ? member.user.displayName : member.name,
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
<div v-if="member.userId != $matrix.currentUserId && !$matrix.isDirectRoomWith(room, member.userId) && expandedMembers.includes(member)" class="start-private-chat clickable" @click="startPrivateChat(member.userId)">Start private chat</div>
|
||||
<DeviceList
|
||||
v-if="expandedMembers.includes(member)"
|
||||
:member="member"
|
||||
|
|
@ -205,6 +208,7 @@ import DeviceList from "../components/DeviceList";
|
|||
import QRCode from "qrcode";
|
||||
import roomInfoMixin from "./roomInfoMixin";
|
||||
import QRCodePopup from './QRCodePopup.vue';
|
||||
import util from "../plugins/utils";
|
||||
|
||||
export default {
|
||||
name: "RoomInfo",
|
||||
|
|
@ -438,6 +442,28 @@ export default {
|
|||
this.updateQRCode();
|
||||
});
|
||||
},
|
||||
startPrivateChat(userId) {
|
||||
this.$matrix
|
||||
.getOrCreatePrivateChat(userId)
|
||||
.then((room) => {
|
||||
this.$nextTick(() => {
|
||||
this.$navigation.push(
|
||||
{
|
||||
name: "Chat",
|
||||
params: {
|
||||
roomId: util.sanitizeRoomId(
|
||||
room.getCanonicalAlias() || room.roomId
|
||||
),
|
||||
},
|
||||
},
|
||||
-1
|
||||
);
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue