mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Add method to create avatar section
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
0a4f8aff79
commit
653fcbbb1f
@ -7,7 +7,10 @@ export class RoomInfoView extends TemplateView {
|
||||
render(t, vm) {
|
||||
const encryptionString = vm.isEncrypted ? "On" : "Off";
|
||||
return t.div({ className: "RoomInfo" }, [
|
||||
t.div({ className: "RoomAvatar" }, [t.view(new AvatarView(vm, 128))]),
|
||||
|
||||
t.div({ className: "RoomAvatar" },
|
||||
[t.view(new AvatarView(vm, 52)), this._createEncryptionIcon(vm.isEncrypted)]),
|
||||
|
||||
t.div({ className: "RoomName" }, [t.h2(vm.name)]),
|
||||
|
||||
t.div({ className: "RoomId" }, [text(vm.roomId)]),
|
||||
@ -26,4 +29,9 @@ export class RoomInfoView extends TemplateView {
|
||||
tag.div({ className: valueClassString }, [text(value)])
|
||||
]);
|
||||
}
|
||||
|
||||
_createEncryptionIcon(isEncrypted) {
|
||||
return tag.div({ className: "RoomEncryption" },
|
||||
[tag.div({ className: isEncrypted ? "encrypted" : "unencrypted" })])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user