mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 22:13:32 +00:00
Suggested Changes from PR
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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" : {
|
||||
|
||||
Reference in New Issue
Block a user