1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

Update complexity score display (#479)

* Update complexity score

* Simplifying switch statement
This commit is contained in:
Vincent Salucci
2020-03-03 15:37:54 -06:00
committed by GitHub
parent e7e5816ded
commit 305d86f765
6 changed files with 52 additions and 6 deletions

View File

@@ -33,6 +33,7 @@ export class PolicyEditComponent implements OnInit {
loading = true;
enabled = false;
formPromise: Promise<any>;
passwordScores: any[];
// Master password
@@ -56,7 +57,16 @@ export class PolicyEditComponent implements OnInit {
private policy: PolicyResponse;
constructor(private apiService: ApiService, private i18nService: I18nService,
private analytics: Angulartics2, private toasterService: ToasterService) { }
private analytics: Angulartics2, private toasterService: ToasterService) {
this.passwordScores = [
{ name: '', value: null },
{ name: i18nService.t('weak') + ' (0)', value: 0 },
{ name: i18nService.t('weak') + ' (1)', value: 1 },
{ name: i18nService.t('weak') + ' (2)', value: 2 },
{ name: i18nService.t('good') + ' (3)', value: 3 },
{ name: i18nService.t('strong') + ' (4)', value: 4 },
];
}
async ngOnInit() {
await this.load();