mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-09 09:51:02 +01:00
feat: radio button options (#420)
This commit is contained in:
parent
6f6b5a5503
commit
aff5ad1faa
@ -17,6 +17,7 @@ export class PasswordGeneratorComponent implements OnInit {
|
|||||||
@Input() showSelect: boolean = false;
|
@Input() showSelect: boolean = false;
|
||||||
@Output() onSelected = new EventEmitter<string>();
|
@Output() onSelected = new EventEmitter<string>();
|
||||||
|
|
||||||
|
passTypeOptions: any[];
|
||||||
options: any = {};
|
options: any = {};
|
||||||
password: string = '-';
|
password: string = '-';
|
||||||
showOptions = false;
|
showOptions = false;
|
||||||
@ -25,7 +26,12 @@ export class PasswordGeneratorComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(protected passwordGenerationService: PasswordGenerationService,
|
constructor(protected passwordGenerationService: PasswordGenerationService,
|
||||||
protected platformUtilsService: PlatformUtilsService, protected i18nService: I18nService,
|
protected platformUtilsService: PlatformUtilsService, protected i18nService: I18nService,
|
||||||
private win: Window) { }
|
private win: Window) {
|
||||||
|
this.passTypeOptions = [
|
||||||
|
{ name: i18nService.t('password'), value: 'password' },
|
||||||
|
{ name: i18nService.t('passphrase'), value: 'passphrase' },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
const optionsResponse = await this.passwordGenerationService.getOptions();
|
const optionsResponse = await this.passwordGenerationService.getOptions();
|
||||||
|
Loading…
Reference in New Issue
Block a user