1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

PM-1440 Fix showing multiple warnings (#5021)

This commit is contained in:
Carlos Gonçalves
2023-03-17 13:21:34 +00:00
committed by GitHub
parent c94508ccf2
commit 0bada56b82

View File

@@ -167,31 +167,33 @@ export class ChangePasswordComponent implements OnInit, OnDestroy {
if (!result) {
return false;
}
}
if (weakPassword) {
const result = await this.platformUtilsService.showDialog(
this.i18nService.t("weakMasterPasswordDesc"),
this.i18nService.t("weakMasterPassword"),
this.i18nService.t("yes"),
this.i18nService.t("no"),
"warning"
);
if (!result) {
return false;
}
}
if (this.leakedPassword) {
const result = await this.platformUtilsService.showDialog(
this.i18nService.t("exposedMasterPasswordDesc"),
this.i18nService.t("exposedMasterPassword"),
this.i18nService.t("yes"),
this.i18nService.t("no"),
"warning"
);
if (!result) {
return false;
} else {
if (weakPassword) {
const result = await this.platformUtilsService.showDialog(
this.i18nService.t("weakMasterPasswordDesc"),
this.i18nService.t("weakMasterPassword"),
this.i18nService.t("yes"),
this.i18nService.t("no"),
"warning"
);
if (!result) {
return false;
}
}
if (this.leakedPassword) {
const result = await this.platformUtilsService.showDialog(
this.i18nService.t("exposedMasterPasswordDesc"),
this.i18nService.t("exposedMasterPassword"),
this.i18nService.t("yes"),
this.i18nService.t("no"),
"warning"
);
if (!result) {
return false;
}
}
}
return true;
}