Add error toast for upgrade encryption step (#18161)

pull/18233/head
Bernd Schoolmann 4 months ago committed by GitHub
parent 1eebee535b
commit c2d42f286e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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;
}

Loading…
Cancel
Save