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:
@@ -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),
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user