1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 06:33:40 +00:00

[PM-6564] migrate auth toasts to CL toastService (#10665)

* migrate auth toasts to CL toastService

* fix component args

* fix component args

* fix specs

* fix toastService args
This commit is contained in:
Jordan Aasen
2024-08-27 10:33:58 -07:00
committed by GitHub
parent e255d84121
commit 9041a4cd4c
75 changed files with 782 additions and 457 deletions

View File

@@ -6,6 +6,7 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { DeleteRecoverRequest } from "@bitwarden/common/models/request/delete-recover.request";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ToastService } from "@bitwarden/components";
@Component({
selector: "app-recover-delete",
@@ -25,6 +26,7 @@ export class RecoverDeleteComponent {
private apiService: ApiService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private toastService: ToastService,
) {}
submit = async () => {
@@ -35,11 +37,11 @@ export class RecoverDeleteComponent {
const request = new DeleteRecoverRequest();
request.email = this.email.value.trim().toLowerCase();
await this.apiService.postAccountRecoverDelete(request);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("deleteRecoverEmailSent"),
);
this.toastService.showToast({
variant: "success",
title: null,
message: this.i18nService.t("deleteRecoverEmailSent"),
});
await this.router.navigate(["/"]);
};