From e843578df9f21e1937dd93117b101c039d0f771b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 11 Feb 2018 01:26:19 -0500 Subject: [PATCH] checkbox is avoid ambiguous --- src/app/vault/password-generator.component.html | 2 +- src/app/vault/password-generator.component.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/vault/password-generator.component.html b/src/app/vault/password-generator.component.html index 23496639a5..2bb6c4ebe4 100644 --- a/src/app/vault/password-generator.component.html +++ b/src/app/vault/password-generator.component.html @@ -68,7 +68,7 @@
+ [(ngModel)]="avoidAmbiguous">
diff --git a/src/app/vault/password-generator.component.ts b/src/app/vault/password-generator.component.ts index 7c87bda0a9..2bfa157c3a 100644 --- a/src/app/vault/password-generator.component.ts +++ b/src/app/vault/password-generator.component.ts @@ -25,12 +25,14 @@ export class PasswordGeneratorComponent implements OnInit { options: any = {}; password: string = '-'; showOptions = false; + avoidAmbiguous = false; constructor(private passwordGenerationService: PasswordGenerationService, private analytics: Angulartics2, private utilsService: UtilsService) { } async ngOnInit() { this.options = await this.passwordGenerationService.getOptions(); + this.avoidAmbiguous = !this.options.ambiguous; this.password = this.passwordGenerationService.generatePassword(this.options); this.analytics.eventTrack.next({ action: 'Generated Password' }); await this.passwordGenerationService.addHistory(this.password); @@ -86,6 +88,7 @@ export class PasswordGeneratorComponent implements OnInit { private normalizeOptions() { this.options.minLowercase = 0; this.options.minUppercase = 0; + this.options.ambiguous = !this.avoidAmbiguous; if (!this.options.uppercase && !this.options.lowercase && !this.options.number && !this.options.special) { this.options.lowercase = true;