1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-01 08:03:20 +00:00

[AC-2268] - migrate toast to CL service for admin-console (#10663)

* migrate toast to CL service for admin-console

* fix spec

* add missing dep for toastService

* fix toastService args

* fix toastService args

* fix toastService args
This commit is contained in:
Jordan Aasen
2024-08-30 11:16:06 -07:00
committed by GitHub
parent d9ff8b0944
commit 2882fa3077
33 changed files with 381 additions and 255 deletions

View File

@@ -8,7 +8,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
import { DialogService } from "@bitwarden/components";
import { DialogService, ToastService } from "@bitwarden/components";
import { OrganizationUserResetPasswordService } from "../members/services/organization-user-reset-password/organization-user-reset-password.service";
@@ -29,6 +29,7 @@ export class EnrollMasterPasswordReset {
syncService: SyncService,
logService: LogService,
userVerificationService: UserVerificationService,
toastService: ToastService,
) {
const result = await UserVerificationDialogComponent.open(dialogService, {
title: "enrollAccountRecovery",
@@ -71,7 +72,11 @@ export class EnrollMasterPasswordReset {
// Enrollment succeeded
try {
platformUtilsService.showToast("success", null, i18nService.t("enrollPasswordResetSuccess"));
toastService.showToast({
variant: "success",
title: null,
message: i18nService.t("enrollPasswordResetSuccess"),
});
await syncService.fullSync(true);
} catch (e) {
logService.error(e);