mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-22420] Show success toast and dismiss nudge ONLY when PIN is set (#15151)
* check for PIN value before showing toast and dismissing nudge
This commit is contained in:
@@ -474,12 +474,14 @@ export class AccountSecurityComponent implements OnInit, OnDestroy {
|
|||||||
this.form.controls.pin.setValue(userHasPinSet, { emitEvent: false });
|
this.form.controls.pin.setValue(userHasPinSet, { emitEvent: false });
|
||||||
const requireReprompt = (await this.pinService.getPinLockType(userId)) == "EPHEMERAL";
|
const requireReprompt = (await this.pinService.getPinLockType(userId)) == "EPHEMERAL";
|
||||||
this.form.controls.pinLockWithMasterPassword.setValue(requireReprompt, { emitEvent: false });
|
this.form.controls.pinLockWithMasterPassword.setValue(requireReprompt, { emitEvent: false });
|
||||||
this.toastService.showToast({
|
if (userHasPinSet) {
|
||||||
variant: "success",
|
this.toastService.showToast({
|
||||||
title: null,
|
variant: "success",
|
||||||
message: this.i18nService.t("unlockPinSet"),
|
title: null,
|
||||||
});
|
message: this.i18nService.t("unlockPinSet"),
|
||||||
await this.vaultNudgesService.dismissNudge(NudgeType.AccountSecurity, userId);
|
});
|
||||||
|
await this.vaultNudgesService.dismissNudge(NudgeType.AccountSecurity, userId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
|
||||||
await this.vaultTimeoutSettingsService.clear(userId);
|
await this.vaultTimeoutSettingsService.clear(userId);
|
||||||
|
|||||||
Reference in New Issue
Block a user