Clean up room info to use new roomInfoMixin
This commit is contained in:
parent
6d97fd030d
commit
731042084b
1 changed files with 2 additions and 25 deletions
|
|
@ -126,9 +126,11 @@
|
||||||
import LeaveRoomDialog from "../components/LeaveRoomDialog";
|
import LeaveRoomDialog from "../components/LeaveRoomDialog";
|
||||||
import DeviceList from "../components/DeviceList";
|
import DeviceList from "../components/DeviceList";
|
||||||
import QRCode from "qrcode";
|
import QRCode from "qrcode";
|
||||||
|
import roomInfoMixin from "./roomInfoMixin";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RoomInfo",
|
name: "RoomInfo",
|
||||||
|
mixins: [roomInfoMixin],
|
||||||
components: {
|
components: {
|
||||||
LeaveRoomDialog,
|
LeaveRoomDialog,
|
||||||
DeviceList
|
DeviceList
|
||||||
|
|
@ -164,10 +166,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
room() {
|
|
||||||
return this.$matrix.currentRoom;
|
|
||||||
},
|
|
||||||
|
|
||||||
creator() {
|
creator() {
|
||||||
if (this.room) {
|
if (this.room) {
|
||||||
const createEvent = this.room.currentState.getStateEvents("m.room.create", "");
|
const createEvent = this.room.currentState.getStateEvents("m.room.create", "");
|
||||||
|
|
@ -185,20 +183,6 @@ export default {
|
||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
|
|
||||||
roomName() {
|
|
||||||
if (this.room) {
|
|
||||||
return this.room.name;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
|
|
||||||
roomTopic() {
|
|
||||||
if (this.room) {
|
|
||||||
return this.room.topic;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
|
|
||||||
anyoneCanJoin() {
|
anyoneCanJoin() {
|
||||||
// TODO: fix this! For now, just return true of we have a canonical alias.
|
// TODO: fix this! For now, just return true of we have a canonical alias.
|
||||||
if (this.room && this.room.getCanonicalAlias() && this.room.getCanonicalAlias().startsWith('#')) {
|
if (this.room && this.room.getCanonicalAlias() && this.room.getCanonicalAlias().startsWith('#')) {
|
||||||
|
|
@ -214,13 +198,6 @@ export default {
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
roomAvatar() {
|
|
||||||
if (this.room) {
|
|
||||||
return this.room.avatar;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
|
|
||||||
joinedMembers() {
|
joinedMembers() {
|
||||||
if (!this.room) {
|
if (!this.room) {
|
||||||
return [];
|
return [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue