mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 22:13:32 +00:00
Removing unused code and cleanup
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
import {
|
||||
Directive,
|
||||
EventEmitter,
|
||||
OnInit,
|
||||
Output,
|
||||
ViewChild,
|
||||
ViewContainerRef,
|
||||
} from "@angular/core";
|
||||
import { Directive, EventEmitter, OnInit, Output } from "@angular/core";
|
||||
import { FormBuilder } from "@angular/forms";
|
||||
|
||||
import { ModalConfig, ModalService } from "@bitwarden/angular/services/modal.service";
|
||||
@@ -29,10 +22,6 @@ export class ExportComponent implements OnInit {
|
||||
|
||||
formPromise: Promise<string>;
|
||||
disabledByPolicy = false;
|
||||
|
||||
@ViewChild("viewUserApiKeyTemplate", { read: ViewContainerRef, static: true })
|
||||
viewUserApiKeyModalRef: ViewContainerRef;
|
||||
|
||||
encryptionPassword: string;
|
||||
|
||||
exportForm = this.formBuilder.group({
|
||||
|
||||
Reference in New Issue
Block a user