Resolve "Room setup: Not able to edit the room name once the room is created"
This commit is contained in:
parent
525ce9cf3e
commit
65fc39ec9d
21 changed files with 123 additions and 21 deletions
|
|
@ -3,7 +3,10 @@ export default {
|
|||
return {
|
||||
roomJoinRule: null,
|
||||
userCanChangeJoinRule: false,
|
||||
userCanPurgeRoom: false
|
||||
userCanPurgeRoom: false,
|
||||
editedRoomName: "",
|
||||
isEditMode: false,
|
||||
roomNameErrorMessage: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -88,6 +91,20 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
onRoomNameClicked() {
|
||||
if(this.userCanPurgeRoom) {
|
||||
this.isEditMode = !this.isEditMode;
|
||||
this.editedRoomName = this.roomName;
|
||||
}
|
||||
},
|
||||
updateRoomName() {
|
||||
if(this.editedRoomName) {
|
||||
this.$matrix.matrixClient.setRoomName(this.room.roomId, this.editedRoomName);
|
||||
this.isEditMode = !this.isEditMode;
|
||||
} else {
|
||||
this.$refs.editedRoomName.focus();
|
||||
}
|
||||
},
|
||||
setRoomJoinRule(ignoredJoinRule) {
|
||||
// Do nothing in the general mixin, override in RoomInfo.vue
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue