mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Add close button to RoomInfoView
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
b0535b5d7d
commit
91f083a245
@ -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" })]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user