mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
remove callout and revert to previous error display
This commit is contained in:
@@ -463,7 +463,6 @@
|
|||||||
[onLoadProfilesFromBrowser]="this.onLoadProfilesFromBrowser"
|
[onLoadProfilesFromBrowser]="this.onLoadProfilesFromBrowser"
|
||||||
[format]="this.format"
|
[format]="this.format"
|
||||||
(csvDataLoaded)="this.formGroup.controls.fileContents.setValue($event)"
|
(csvDataLoaded)="this.formGroup.controls.fileContents.setValue($event)"
|
||||||
(error)="errorMessage = $event"
|
|
||||||
></import-chrome>
|
></import-chrome>
|
||||||
} @else {
|
} @else {
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
@@ -494,9 +493,6 @@
|
|||||||
></textarea>
|
></textarea>
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
}
|
}
|
||||||
<bit-callout type="danger" *ngIf="errorMessage" class="tw-mt-4">
|
|
||||||
{{ errorMessage }}
|
|
||||||
</bit-callout>
|
|
||||||
</bit-card>
|
</bit-card>
|
||||||
</bit-section>
|
</bit-section>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ import { ImportLastPassComponent } from "./lastpass";
|
|||||||
providers: ImporterProviders,
|
providers: ImporterProviders,
|
||||||
})
|
})
|
||||||
export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
errorMessage: string | undefined = undefined;
|
|
||||||
DefaultCollectionType = CollectionTypes.DefaultUserCollection;
|
DefaultCollectionType = CollectionTypes.DefaultUserCollection;
|
||||||
|
|
||||||
featuredImportOptions: ImportOption[];
|
featuredImportOptions: ImportOption[];
|
||||||
@@ -440,7 +439,6 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected async performImport() {
|
protected async performImport() {
|
||||||
this.errorMessage = undefined;
|
|
||||||
if (!(await this.validateImport())) {
|
if (!(await this.validateImport())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -456,14 +454,22 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (importer === null) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const importContents = await this.setImportContents();
|
const importContents = await this.setImportContents();
|
||||||
|
|
||||||
if (importContents == null || importContents === "") {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -607,7 +613,11 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.importBlockedByPolicy && this.organizationId == null) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user