show error when incorrect backup password was provided

This commit is contained in:
marlon-erler
2026-09-05 02:32:27 +02:00
parent e4d162f0ab
commit b7d85510d5
5 changed files with 5 additions and 5 deletions
@@ -86,7 +86,7 @@ export default class FileTransferViewModel extends Context {
[this.importedFile],
() => this.importedFile.value == undefined,
);
cannotDecryptImport: React.State<boolean> = React.createProxyState(
importDecryptSuccessful: React.State<boolean> = React.createProxyState(
[this.importKey],
() => this.importKey.value == "",
);
@@ -179,7 +179,7 @@ export default class FileTransferViewModel extends Context {
const key = this.importKey.value;
if (!fileString || !key) return;
this.cannotDecryptImport.value = true;
this.importDecryptSuccessful.value = true;
try {
await this.coreViewModel.fileTransferModel.handleBackupFile(
fileString,
@@ -189,7 +189,7 @@ export default class FileTransferViewModel extends Context {
} catch (e) {
console.error(e);
this.isImportKeyCorrect.value = false;
this.cannotDecryptImport.value = false;
this.importDecryptSuccessful.value = false;
}
};