1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-16 08:13:26 +00:00

[Callout] Added Enforced Policy Options UI (#458)

This commit is contained in:
Vincent Salucci
2021-08-20 10:51:11 -05:00
committed by GitHub
parent fe3a387724
commit aa81f8fb96
3 changed files with 47 additions and 20 deletions

View File

@@ -38,26 +38,6 @@ export class ChangePasswordComponent implements OnInit {
this.enforcedPolicyOptions = await this.policyService.getMasterPasswordPolicyOptions();
}
getPasswordScoreAlertDisplay() {
if (this.enforcedPolicyOptions == null) {
return '';
}
let str: string;
switch (this.enforcedPolicyOptions.minComplexity) {
case 4:
str = this.i18nService.t('strong');
break;
case 3:
str = this.i18nService.t('good');
break;
default:
str = this.i18nService.t('weak');
break;
}
return str + ' (' + this.enforcedPolicyOptions.minComplexity + ')';
}
async submit() {
if (!await this.strongPassword()) {
return;