diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index 9732173b564..f7be27bd9ca 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -197,7 +197,7 @@ export class AppComponent implements OnInit { await this.reloadProcess(); break; case "reloadProcess": - window.location.reload(true); + window.location.reload(); break; case "syncStarted": break; diff --git a/apps/web/src/app/tools/import-export/export.component.ts b/apps/web/src/app/tools/import-export/export.component.ts index 859bb02d762..a3e666159e4 100644 --- a/apps/web/src/app/tools/import-export/export.component.ts +++ b/apps/web/src/app/tools/import-export/export.component.ts @@ -26,9 +26,6 @@ export class ExportComponent extends BaseExportComponent { organizationId: string; showPassword: boolean; showConfirmPassword: boolean; - confirmDescription: string; - confirmButtonText: string; - modalTitle: string; constructor( cryptoService: CryptoService, @@ -66,24 +63,22 @@ export class ExportComponent extends BaseExportComponent { } async submit() { - const confirmDescription = - this.exportForm.get("fileEncryptionType").value === EncryptedExportType.FileEncrypted - ? "confirmVaultExportDesc" - : "encExportKeyWarningDesc"; - const confirmButtonText = "exportVault"; - const modalTitle = "confirmVaultExport"; - if (!this.validForm) { return; } + const confirmDescription = + this.exportForm.get("fileEncryptionType").value === EncryptedExportType.FileEncrypted + ? "FileEncryptedExportWarningDesc" + : "encExportKeyWarningDesc"; + try { const ref = this.modalService.open(UserVerificationPromptComponent, { allowMultipleModals: true, data: { confirmDescription: confirmDescription, - confirmButtonText: confirmButtonText, - modalTitle: modalTitle, + confirmButtonText: "exportVault", + modalTitle: "confirmVaultExport", }, }); @@ -94,12 +89,6 @@ export class ExportComponent extends BaseExportComponent { if (await ref.onClosedPromise()) { //successful this.submitWithSecretAlreadyVerified(); - } else { - this.platformUtilsService.showToast( - "error", - this.i18nService.t("error"), - this.i18nService.t("invalidMasterPassword") - ); } } catch { this.platformUtilsService.showToast( diff --git a/apps/web/src/app/tools/import-export/import.component.ts b/apps/web/src/app/tools/import-export/import.component.ts index e94c070da5f..b70171de36e 100644 --- a/apps/web/src/app/tools/import-export/import.component.ts +++ b/apps/web/src/app/tools/import-export/import.component.ts @@ -117,9 +117,7 @@ export class ImportComponent implements OnInit { if (error != null) { //Check if the error is that a password is required if (error.passwordRequired) { - if (await this.promptFilePassword(fileContents)) { - //successful - } else { + if (!(await this.showFilePasswordPrompt(fileContents, this.organizationId))) { //failed - File Password issues this.loading = false; return; @@ -141,10 +139,6 @@ export class ImportComponent implements OnInit { this.loading = false; } - private async promptFilePassword(fcontents: string) { - return await this.showPasswordPrompt(fcontents, this.organizationId); - } - getFormatInstructionTitle() { if (this.format == null) { return null; @@ -254,7 +248,7 @@ export class ImportComponent implements OnInit { return ["TOTP", "Password", "H_Field", "Card Number", "Security Code"]; } - async showPasswordPrompt(fcontents: string, organizationId: string) { + async showFilePasswordPrompt(fcontents: string, organizationId: string) { const ref = await this.modalService.open(this.component, { allowMultipleModals: true, data: { diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 725a0a52ba1..a6eccfbefef 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -881,7 +881,7 @@ "fileFormat": { "message": "File Format" }, - "confirmVaultExportDesc" : { + "FileEncryptedExportWarningDesc" : { "message": "This file export will be password protected and require the file password to decrypt." }, "exportPasswordDescription" : {