1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

remove callout and revert to previous error display

This commit is contained in:
John Harrington
2025-12-04 09:14:34 -07:00
parent f773081802
commit 71009f706c
2 changed files with 15 additions and 9 deletions

View File

@@ -463,7 +463,6 @@
[onLoadProfilesFromBrowser]="this.onLoadProfilesFromBrowser"
[format]="this.format"
(csvDataLoaded)="this.formGroup.controls.fileContents.setValue($event)"
(error)="errorMessage = $event"
></import-chrome>
} @else {
<bit-form-field>
@@ -494,9 +493,6 @@
></textarea>
</bit-form-field>
}
<bit-callout type="danger" *ngIf="errorMessage" class="tw-mt-4">
{{ errorMessage }}
</bit-callout>
</bit-card>
</bit-section>
</form>

View File

@@ -112,7 +112,6 @@ import { ImportLastPassComponent } from "./lastpass";
providers: ImporterProviders,
})
export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
errorMessage: string | undefined = undefined;
DefaultCollectionType = CollectionTypes.DefaultUserCollection;
featuredImportOptions: ImportOption[];
@@ -440,7 +439,6 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
}
protected async performImport() {
this.errorMessage = undefined;
if (!(await this.validateImport())) {
return;
}
@@ -456,14 +454,22 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
);
if (importer === null) {
this.errorMessage = this.i18nService.t("selectFormat");
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("selectFormat"),
});
return;
}
const importContents = await this.setImportContents();
if (importContents == null || importContents === "") {
this.errorMessage = this.i18nService.t("selectFile");
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("selectFile"),
});
return;
}
@@ -607,7 +613,11 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
}
if (this.importBlockedByPolicy && this.organizationId == null) {
this.errorMessage = this.i18nService.t("personalOwnershipPolicyInEffectImports");
this.toastService.showToast({
variant: "error",
title: null,
message: this.i18nService.t("personalOwnershipPolicyInEffectImports"),
});
return false;
}