support for username gen website setting (#738)

This commit is contained in:
Kyle Spearrin
2022-03-25 05:32:01 -04:00
committed by GitHub
parent 81607e810e
commit fa73c13b8c
2 changed files with 11 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ export class PasswordGeneratorComponent implements OnInit {
avoidAmbiguous = false;
showWebsiteOption = false;
enforcedPasswordPolicyOptions: PasswordGeneratorPolicyOptions;
usernameWebsite: string = null;
constructor(
protected passwordGenerationService: PasswordGenerationService,
@@ -95,6 +96,9 @@ export class PasswordGeneratorComponent implements OnInit {
if (!this.showWebsiteOption) {
this.usernameOptions.subaddressType = this.usernameOptions.catchallType = "random";
}
if (this.usernameWebsite != null) {
this.usernameOptions.website = this.usernameWebsite;
}
if (qParams.type === "username" || qParams.type === "password") {
this.type = qParams.type;