mobile: fix vault does not show error toast on incorrect password

This commit is contained in:
Ammar Ahmed
2024-11-06 10:32:29 +05:00
committed by Ammar Ahmed
parent 55842d44ea
commit 5659576ce3
5 changed files with 1772 additions and 1751 deletions

View File

@@ -540,6 +540,7 @@ export class VaultDialog extends Component {
this.close();
})
.catch((e) => {
console.log("Error", e);
this._takeErrorAction(e);
});
}
@@ -580,10 +581,6 @@ export class VaultDialog extends Component {
}
_takeErrorAction(e) {
if (
e.message === db.vault.ERRORS.wrongPassword ||
e.message === "FAILURE"
) {
this.setState({
wrongPassword: true,
visible: true
@@ -595,9 +592,6 @@ export class VaultDialog extends Component {
context: "local"
});
}, 500);
return;
}
}
_revokeFingerprintAccess = async () => {
@@ -876,9 +870,9 @@ export class VaultDialog extends Component {
}
positiveTitle={
deleteVault
? strings.deleteVault()
? strings.delete()
: clearVault
? strings.clearVault()
? strings.clear()
: fingerprintAccess
? strings.enable()
: this.state.revokeFingerprintAccess

View File

@@ -897,7 +897,7 @@ export const settingsGroups: SettingSection[] = [
item: {},
clearVault: true,
novault: true,
title: strings.clearVault()
title: strings.clearVault() + "?"
});
}
},
@@ -912,7 +912,7 @@ export const settingsGroups: SettingSection[] = [
item: {},
deleteVault: true,
novault: true,
title: strings.deleteVault()
title: strings.deleteVault() + "?"
});
}
},

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -147,8 +147,8 @@ export const strings = {
t`Loading ${progress ? `(${progress})` : ""}, please wait...`,
vaultEnableBiometrics: () =>
t` Unlock with password once to enable biometric access.`,
deleteVault: () => t`Delete`,
clearVault: () => t`Clear`,
deleteVault: () => t`Delete vault`,
clearVault: () => t`Clear vault`,
enable: () => t`Enable`,
revoke: () => t`Revoke`,
change: () => t`Change`,
@@ -532,7 +532,7 @@ $headline$: Use starting line of the note as title.`,
couldNotUnlock: () => t`Could not unlock`,
unlockNoteDesc: () =>
t`Your note will be unencrypted and removed from the vault.`,
deleteAllNotes: () => t`Delete all notes`,
deleteAllNotes: () => t`Delete notes in this vault`,
getStarted: () => t`Get started`,
saveACopy: () => t`Save a copy`,
discard: () => t`Discard`,
@@ -1139,8 +1139,7 @@ $headline$: Use starting line of the note as title.`,
vaultDesc: () => t`Multi-layer encryption to most important notes`,
changeVaultPasswordDesc: () =>
t`All locked notes will be re-encrypted with the new password.`,
clearVaultDesc: () =>
t`Enter vault password to unlock and remove all notes from the vault.`,
clearVaultDesc: () => t`Remove all notes from the vault.`,
deleteVaultDesc: () => t`Delete vault (and optionally remove all notes).`,
biometricUnlock: () => t`Biometric unlocking`,
biometricUnlockDesc: () => t`Unlock your vault with biometric authentication`,