1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

checkbox is avoid ambiguous

This commit is contained in:
Kyle Spearrin
2018-02-11 01:26:19 -05:00
parent 70b4f97f2c
commit e843578df9
2 changed files with 4 additions and 1 deletions

View File

@@ -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;