From 49be4e64ca9cc3006f47d86f185098c84058f460 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 3 Aug 2021 15:28:08 +0530 Subject: [PATCH] Remove object Signed-off-by: RMidhunSuresh --- .../web/ui/session/rightpanel/MemberDetailsView.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platform/web/ui/session/rightpanel/MemberDetailsView.js b/src/platform/web/ui/session/rightpanel/MemberDetailsView.js index 32cdd0b6..5ada0912 100644 --- a/src/platform/web/ui/session/rightpanel/MemberDetailsView.js +++ b/src/platform/web/ui/session/rightpanel/MemberDetailsView.js @@ -19,16 +19,15 @@ import {TemplateView} from "../../general/TemplateView.js"; export class MemberDetailsView extends TemplateView { render(t, vm) { - const encryptionMessages = { - true: vm.i18n`Messages in this room are end-to-end encrypted.`, - false: vm.i18n`Messages in this room are not end-to-end encrypted.` - }; return t.div({className: "MemberDetailsView"}, [ t.view(new AvatarView(vm, 128)), t.div({className: "MemberDetailsView_name"}, t.h2(vm => vm.name)), t.div({className: "MemberDetailsView_id"}, vm.userId), this._createSection(t, vm.i18n`Role`, vm => vm.role), - this._createSection(t, vm.i18n`Security`, encryptionMessages[vm.isEncrypted]), + this._createSection(t, vm.i18n`Security`, vm.isEncrypted ? + vm.i18n`Messages in this room are end-to-end encrypted.` : + vm.i18n`Messages in this room are not end-to-end encrypted.` + ), this._createOptions(t, vm) ]); }