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) ]); }