From 653fcbbb1f883a429a0605bff06953dfc225b263 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 26 May 2021 15:38:26 +0530 Subject: [PATCH] Add method to create avatar section Signed-off-by: RMidhunSuresh --- src/platform/web/ui/session/rightpanel/RoomInfoView.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/platform/web/ui/session/rightpanel/RoomInfoView.js b/src/platform/web/ui/session/rightpanel/RoomInfoView.js index ef70762d..79753295 100644 --- a/src/platform/web/ui/session/rightpanel/RoomInfoView.js +++ b/src/platform/web/ui/session/rightpanel/RoomInfoView.js @@ -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" })]) + } }