Add menu entry to launch RoomInfoView

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-05-31 22:54:52 +05:30
parent 1e96b58f85
commit 00dbd3db06
2 changed files with 4 additions and 6 deletions

View file

@ -288,13 +288,10 @@ export class RoomViewModel extends ViewModel {
} }
} }
toggleDetailsPanel() { get detailsLink() {
const isPanelOpen = !!this.navigation.path.get("details"); return this.urlCreator.urlForSegment("details");
const link = isPanelOpen ? this.urlCreator.urlUntilSegment("room"):
this.urlCreator.urlForSegment("details");
window.location.href = link;
} }
get composerViewModel() { get composerViewModel() {
return this._composerVM; return this._composerVM;
} }

View file

@ -77,6 +77,7 @@ export class RoomView extends TemplateView {
if (vm.canRejoin) { if (vm.canRejoin) {
options.push(Menu.optionWithButton(vm.i18n`Rejoin room`, () => vm.rejoinRoom())); options.push(Menu.optionWithButton(vm.i18n`Rejoin room`, () => vm.rejoinRoom()));
} }
options.push(Menu.optionWithLink(vm.i18n`Room Details`, vm.detailsLink))
if (!options.length) { if (!options.length) {
return; return;
} }