mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
off both passphrase and security key options
This commit is contained in:
parent
f84f06758c
commit
3359d49161
@ -142,10 +142,21 @@ export class SessionStatusViewModel extends ViewModel {
|
||||
async enterPassphrase(passphrase) {
|
||||
if (passphrase) {
|
||||
try {
|
||||
await this._session.enableSecretStorage("recoverykey", passphrase);
|
||||
await this._session.enableSecretStorage("passphrase", passphrase);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
alert(`Could not set up secret storage: ${err.message}`);
|
||||
alert(`Could not set up secret storage with passphrase: ${err.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async enterSecurityKey(securityKey) {
|
||||
if (securityKey) {
|
||||
try {
|
||||
await this._session.enableSecretStorage("recoverykey", securityKey);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
alert(`Could not set up secret storage with securityKey: ${err.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ export class SessionStatusView extends TemplateView {
|
||||
spinner(t, {hidden: vm => !vm.isWaiting}),
|
||||
t.p(vm => vm.statusLabel),
|
||||
t.if(vm => vm.isConnectNowShown, t.createTemplate(t => t.button({onClick: () => vm.connectNow()}, "Retry now"))),
|
||||
t.if(vm => vm.isSecretStorageShown, t.createTemplate(t => t.button({onClick: () => vm.enterPassphrase(prompt("Security key"))}, "Enter security key"))),
|
||||
t.if(vm => vm.isSecretStorageShown, t.createTemplate(t => t.button({onClick: () => vm.enterPassphrase(prompt("Passphrase"))}, "Enter passphrase"))),
|
||||
t.if(vm => vm.isSecretStorageShown, t.createTemplate(t => t.button({onClick: () => vm.enterSecurityKey(prompt("Security key"))}, "Enter security key"))),
|
||||
window.DEBUG ? t.button({id: "showlogs"}, "Show logs") : ""
|
||||
]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user