1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

migrate secrets manager toasts to CL toastService (#10677)

This commit is contained in:
Jordan Aasen
2024-08-23 09:13:25 -07:00
committed by GitHub
parent 0d75b71ea9
commit 2ee51589ce
21 changed files with 194 additions and 114 deletions

View File

@@ -3,6 +3,7 @@ import { Component, Inject } from "@angular/core";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ToastService } from "@bitwarden/components";
import { SecretService } from "../../secrets/secret.service";
@@ -21,6 +22,7 @@ export class SecretHardDeleteDialogComponent {
private i18nService: I18nService,
private platformUtilsService: PlatformUtilsService,
@Inject(DIALOG_DATA) public data: SecretHardDeleteOperation,
private toastService: ToastService,
) {}
get title() {
@@ -36,6 +38,10 @@ export class SecretHardDeleteDialogComponent {
const message =
this.data.secretIds.length === 1 ? "hardDeleteSuccessToast" : "hardDeletesSuccessToast";
this.dialogRef.close(this.data.secretIds);
this.platformUtilsService.showToast("success", null, this.i18nService.t(message));
this.toastService.showToast({
variant: "success",
title: null,
message: this.i18nService.t(message),
});
};
}