From 71009f706c6e475ef46812de69980c2c813730a8 Mon Sep 17 00:00:00 2001 From: John Harrington <84741727+harr1424@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:14:34 -0700 Subject: [PATCH] remove callout and revert to previous error display --- .../src/components/import.component.html | 4 ---- .../src/components/import.component.ts | 20 ++++++++++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/libs/importer/src/components/import.component.html b/libs/importer/src/components/import.component.html index f157520d89..dfee02acf5 100644 --- a/libs/importer/src/components/import.component.html +++ b/libs/importer/src/components/import.component.html @@ -463,7 +463,6 @@ [onLoadProfilesFromBrowser]="this.onLoadProfilesFromBrowser" [format]="this.format" (csvDataLoaded)="this.formGroup.controls.fileContents.setValue($event)" - (error)="errorMessage = $event" > } @else { @@ -494,9 +493,6 @@ > } - - {{ errorMessage }} - diff --git a/libs/importer/src/components/import.component.ts b/libs/importer/src/components/import.component.ts index 72d06bb718..0ff62b00e7 100644 --- a/libs/importer/src/components/import.component.ts +++ b/libs/importer/src/components/import.component.ts @@ -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; }