mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Make close button close the view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
20a250dfc0
commit
37367cde65
@ -39,4 +39,8 @@ export class RoomInfoViewModel extends ViewModel {
|
||||
get avatarTitle() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
get closeLink() {
|
||||
return this.urlCreator.urlUntilSegment("room");
|
||||
}
|
||||
}
|
||||
|
@ -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 })]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user