mirror of
https://github.com/bitwarden/browser
synced 2026-01-21 20:03:43 +00:00
Add error toast for upgrade encryption step (#18161)
This commit is contained in:
@@ -6,6 +6,7 @@ import { filter, firstValueFrom, map } from "rxjs";
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { MasterPasswordUnlockService } from "@bitwarden/common/key-management/master-password/abstractions/master-password-unlock.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import {
|
||||
LinkModule,
|
||||
AsyncActionsModule,
|
||||
@@ -15,6 +16,7 @@ import {
|
||||
DialogService,
|
||||
FormFieldModule,
|
||||
IconButtonModule,
|
||||
ToastService,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
/**
|
||||
@@ -40,6 +42,8 @@ export class PromptMigrationPasswordComponent {
|
||||
private formBuilder = inject(FormBuilder);
|
||||
private masterPasswordUnlockService = inject(MasterPasswordUnlockService);
|
||||
private accountService = inject(AccountService);
|
||||
private toastService = inject(ToastService);
|
||||
private i18nService = inject(I18nService);
|
||||
|
||||
migrationPasswordForm = this.formBuilder.group({
|
||||
masterPassword: ["", [Validators.required]],
|
||||
@@ -73,6 +77,10 @@ export class PromptMigrationPasswordComponent {
|
||||
userId,
|
||||
))
|
||||
) {
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
message: this.i18nService.t("incorrectPassword"),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user