Remove object

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-08-03 15:28:08 +05:30
parent fea4143af9
commit 49be4e64ca

View file

@ -19,16 +19,15 @@ import {TemplateView} from "../../general/TemplateView.js";
export class MemberDetailsView extends TemplateView { export class MemberDetailsView extends TemplateView {
render(t, vm) { 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"}, return t.div({className: "MemberDetailsView"},
[ t.view(new AvatarView(vm, 128)), [ t.view(new AvatarView(vm, 128)),
t.div({className: "MemberDetailsView_name"}, t.h2(vm => vm.name)), t.div({className: "MemberDetailsView_name"}, t.h2(vm => vm.name)),
t.div({className: "MemberDetailsView_id"}, vm.userId), t.div({className: "MemberDetailsView_id"}, vm.userId),
this._createSection(t, vm.i18n`Role`, vm => vm.role), 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) this._createOptions(t, vm)
]); ]);
} }