1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-20 11:24:07 +00:00

Removing unused code and cleanup

This commit is contained in:
CarleyDiaz-Bitwarden
2022-07-24 17:49:56 -04:00
parent 9fcb9ddfe4
commit 370cbacd3e
3 changed files with 17 additions and 44 deletions

View File

@@ -72,30 +72,23 @@ export class ExportComponent extends BaseExportComponent {
? "FileEncryptedExportWarningDesc"
: "encExportKeyWarningDesc";
try {
const ref = this.modalService.open(UserVerificationPromptComponent, {
allowMultipleModals: true,
data: {
confirmDescription: confirmDescription,
confirmButtonText: "exportVault",
modalTitle: "confirmVaultExport",
},
});
const ref = this.modalService.open(UserVerificationPromptComponent, {
allowMultipleModals: true,
data: {
confirmDescription: confirmDescription,
confirmButtonText: "exportVault",
modalTitle: "confirmVaultExport",
},
});
if (ref == null) {
return;
}
if (ref == null) {
return;
}
if (await ref.onClosedPromise()) {
//successful
this.submitWithSecretAlreadyVerified();
}
} catch {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("error"),
this.i18nService.t("invalidMasterPassword")
);
const userVerified = await ref.onClosedPromise();
if (userVerified) {
//successful
this.submitWithSecretAlreadyVerified();
}
}

View File

@@ -28,7 +28,6 @@ export class ImportComponent implements OnInit {
formPromise: Promise<ImportError>;
loading = false;
importBlockedByPolicy = false;
protected component = FilePasswordPromptComponent;
protected organizationId: string = null;
protected successNavigate: any[] = ["vault"];
@@ -244,12 +243,8 @@ export class ImportComponent implements OnInit {
);
}
protectedFields() {
return ["TOTP", "Password", "H_Field", "Card Number", "Security Code"];
}
async showFilePasswordPrompt(fcontents: string, organizationId: string) {
const ref = await this.modalService.open(this.component, {
const ref = await this.modalService.open(FilePasswordPromptComponent, {
allowMultipleModals: true,
data: {
fileContents: fcontents,
@@ -264,8 +259,4 @@ export class ImportComponent implements OnInit {
const result = await ref.onClosedPromise();
return result === true;
}
async enabled() {
return !this.keyConnectorService.getUsesKeyConnector();
}
}