show MSK trust status in settings after enabling key backup

This commit is contained in:
Bruno Windels 2023-02-14 12:13:07 +01:00
parent fdce098245
commit 45d45cb690
3 changed files with 8 additions and 1 deletions

View File

@ -88,6 +88,10 @@ export class KeyBackupViewModel extends ViewModel {
return this._session.keyBackup.get()?.version; return this._session.keyBackup.get()?.version;
} }
get isMasterKeyTrusted() {
return this._session.crossSigning?.isMasterKeyTrusted ?? false;
}
get backupWriteStatus() { get backupWriteStatus() {
const keyBackup = this._session.keyBackup.get(); const keyBackup = this._session.keyBackup.get();
if (!keyBackup) { if (!keyBackup) {

View File

@ -53,6 +53,9 @@ export class KeyBackupSettingsView extends TemplateView {
default: default:
return null; return null;
} }
}),
t.if(vm => vm.isMasterKeyTrusted, t => {
return t.p("Cross-signing master key found and trusted.")
}) })
]); ]);
} }

View File

@ -49,7 +49,7 @@ export class SettingsView extends TemplateView {
}, vm.i18n`Log out`)), }, vm.i18n`Log out`)),
); );
settingNodes.push( settingNodes.push(
t.h3("Key backup"), t.h3("Key backup & security"),
t.view(new KeyBackupSettingsView(vm.keyBackupViewModel)) t.view(new KeyBackupSettingsView(vm.keyBackupViewModel))
); );