diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue index 5f3fe50..69823bd 100644 --- a/src/components/RoomInfo.vue +++ b/src/components/RoomInfo.vue @@ -126,9 +126,11 @@ import LeaveRoomDialog from "../components/LeaveRoomDialog"; import DeviceList from "../components/DeviceList"; import QRCode from "qrcode"; +import roomInfoMixin from "./roomInfoMixin"; export default { name: "RoomInfo", + mixins: [roomInfoMixin], components: { LeaveRoomDialog, DeviceList @@ -164,10 +166,6 @@ export default { }, computed: { - room() { - return this.$matrix.currentRoom; - }, - creator() { if (this.room) { const createEvent = this.room.currentState.getStateEvents("m.room.create", ""); @@ -185,20 +183,6 @@ export default { return ""; }, - roomName() { - if (this.room) { - return this.room.name; - } - return ""; - }, - - roomTopic() { - if (this.room) { - return this.room.topic; - } - return ""; - }, - anyoneCanJoin() { // TODO: fix this! For now, just return true of we have a canonical alias. if (this.room && this.room.getCanonicalAlias() && this.room.getCanonicalAlias().startsWith('#')) { @@ -214,13 +198,6 @@ export default { return null; }, - roomAvatar() { - if (this.room) { - return this.room.avatar; - } - return ""; - }, - joinedMembers() { if (!this.room) { return [];