1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[PM-6565] migrate vault toasts to CL toastService (#10664)

* migrate vault toasts to CL toastService

* update component args

* add missing toastService deps

* add missing i18 key

* remove moved files

* remove duplicate args
This commit is contained in:
Jordan Aasen
2025-01-17 15:01:18 -08:00
committed by GitHub
parent 8674fb51db
commit a803e5b411
26 changed files with 317 additions and 202 deletions

View File

@@ -11,7 +11,7 @@ import { Verification } from "@bitwarden/common/auth/types/verification";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { SyncService } from "@bitwarden/common/platform/sync";
import { DialogService } from "@bitwarden/components";
import { DialogService, ToastService } from "@bitwarden/components";
export interface PurgeVaultDialogData {
organizationId: string;
@@ -37,6 +37,7 @@ export class PurgeVaultComponent {
private userVerificationService: UserVerificationService,
private router: Router,
private syncService: SyncService,
private toastService: ToastService,
) {
this.organizationId = data && data.organizationId ? data.organizationId : null;
}
@@ -46,7 +47,11 @@ export class PurgeVaultComponent {
.buildRequest(this.formGroup.value.masterPassword)
.then((request) => this.apiService.postPurgeCiphers(request, this.organizationId));
await response;
this.platformUtilsService.showToast("success", null, this.i18nService.t("vaultPurged"));
this.toastService.showToast({
variant: "success",
title: null,
message: this.i18nService.t("vaultPurged"),
});
await this.syncService.fullSync(true);
if (this.organizationId != null) {
await this.router.navigate(["organizations", this.organizationId, "vault"]);