Make close button close the view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
20a250dfc0
commit
37367cde65
2 changed files with 8 additions and 3 deletions
|
@ -39,4 +39,8 @@ export class RoomInfoViewModel extends ViewModel {
|
||||||
get avatarTitle() {
|
get avatarTitle() {
|
||||||
return this.name;
|
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";
|
const encryptionString = vm.isEncrypted ? "On" : "Off";
|
||||||
|
|
||||||
return t.div({ className: "RoomInfo" }, [
|
return t.div({ className: "RoomInfo" }, [
|
||||||
this._createButton(),
|
this._createButton(vm),
|
||||||
t.div({ className: "RoomAvatar" },
|
t.div({ className: "RoomAvatar" },
|
||||||
[t.view(new AvatarView(vm, 52)), this._createEncryptionIcon(vm.isEncrypted)]),
|
[t.view(new AvatarView(vm, 52)), this._createEncryptionIcon(vm.isEncrypted)]),
|
||||||
t.div({ className: "RoomName" }, [t.h2(vm.name)]),
|
t.div({ className: "RoomName" }, [t.h2(vm.name)]),
|
||||||
|
@ -32,7 +32,8 @@ export class RoomInfoView extends TemplateView {
|
||||||
[tag.div({ className: isEncrypted ? "encrypted" : "unencrypted" })])
|
[tag.div({ className: isEncrypted ? "encrypted" : "unencrypted" })])
|
||||||
}
|
}
|
||||||
|
|
||||||
_createButton() {
|
_createButton(vm) {
|
||||||
return tag.div({ className: "buttons" }, [tag.div({ className: "close button-utility" })]);
|
return tag.div({ className: "buttons" },
|
||||||
|
[tag.a({ className: "close button-utility", href: vm.closeLink })]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue