diff --git a/src/domain/session/rightpanel/RoomInfoViewModel.js b/src/domain/session/rightpanel/RoomInfoViewModel.js index a2b7eaf4..c74ae826 100644 --- a/src/domain/session/rightpanel/RoomInfoViewModel.js +++ b/src/domain/session/rightpanel/RoomInfoViewModel.js @@ -39,4 +39,8 @@ export class RoomInfoViewModel extends ViewModel { get avatarTitle() { return this.name; } + + get closeLink() { + return this.urlCreator.urlUntilSegment("room"); + } } diff --git a/src/platform/web/ui/session/rightpanel/RoomInfoView.js b/src/platform/web/ui/session/rightpanel/RoomInfoView.js index 57190e7c..04520602 100644 --- a/src/platform/web/ui/session/rightpanel/RoomInfoView.js +++ b/src/platform/web/ui/session/rightpanel/RoomInfoView.js @@ -8,7 +8,7 @@ export class RoomInfoView extends TemplateView { const encryptionString = vm.isEncrypted ? "On" : "Off"; return t.div({ className: "RoomInfo" }, [ - this._createButton(), + this._createButton(vm), t.div({ className: "RoomAvatar" }, [t.view(new AvatarView(vm, 52)), this._createEncryptionIcon(vm.isEncrypted)]), t.div({ className: "RoomName" }, [t.h2(vm.name)]), @@ -32,7 +32,8 @@ export class RoomInfoView extends TemplateView { [tag.div({ className: isEncrypted ? "encrypted" : "unencrypted" })]) } - _createButton() { - return tag.div({ className: "buttons" }, [tag.div({ className: "close button-utility" })]); + _createButton(vm) { + return tag.div({ className: "buttons" }, + [tag.a({ className: "close button-utility", href: vm.closeLink })]); } }