Add close button to RoomInfoView

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-05-26 15:58:31 +05:30
parent b0535b5d7d
commit 91f083a245

View File

@ -6,17 +6,14 @@ export class RoomInfoView extends TemplateView {
render(t, vm) { render(t, vm) {
const encryptionString = vm.isEncrypted ? "On" : "Off"; const encryptionString = vm.isEncrypted ? "On" : "Off";
return t.div({ className: "RoomInfo" }, [
return t.div({ className: "RoomInfo" }, [
this._createButton(),
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)]),
t.div({ className: "RoomId" }, [text(vm.roomId)]), t.div({ className: "RoomId" }, [text(vm.roomId)]),
this._createSideBarRow("People", vm.memberCount, { MemberCount: true }), this._createSideBarRow("People", vm.memberCount, { MemberCount: true }),
this._createSideBarRow("Encryption", encryptionString, { EncryptionStatus: true }) this._createSideBarRow("Encryption", encryptionString, { EncryptionStatus: true })
]); ]);
} }
@ -34,4 +31,8 @@ export class RoomInfoView extends TemplateView {
return tag.div({ className: "RoomEncryption" }, return tag.div({ className: "RoomEncryption" },
[tag.div({ className: isEncrypted ? "encrypted" : "unencrypted" })]) [tag.div({ className: isEncrypted ? "encrypted" : "unencrypted" })])
} }
_createButton() {
return tag.div({ className: "buttons" }, [tag.div({ className: "close button-utility" })]);
}
} }