mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 19:53:43 +00:00
password generator options toggle
This commit is contained in:
@@ -17,9 +17,13 @@
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
{{'options' | i18n}}
|
||||
<button type="button" (click)="toggleOptions()">
|
||||
<i class="fa fa-plus-square-o" [hidden]="showOptions"></i>
|
||||
<i class="fa fa-minus-square-o" [hidden]="!showOptions"></i>
|
||||
{{'options' | i18n}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="box-content condensed">
|
||||
<div class="box-content condensed" *ngIf="showOptions">
|
||||
<div class="box-content-row box-content-row-slider" appBoxRow>
|
||||
<label for="length">{{'length' | i18n}}</label>
|
||||
<span>{{options.length}}</span>
|
||||
@@ -47,7 +51,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box" *ngIf="showOptions">
|
||||
<div class="box-content condensed">
|
||||
<div class="box-content-row box-content-row-input" appBoxRow>
|
||||
<label for="min-number">{{'minNumbers' | i18n}}</label>
|
||||
@@ -68,8 +72,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="primary" appBlurClick *ngIf="showSelect" (click)="select()">
|
||||
<i class="fa fa-lg fa-check"></i> {{'select' | i18n}}
|
||||
<button type="button" class="primary" appBlurClick *ngIf="showSelect" (click)="select()"
|
||||
title="{{'select' | i18n}}">
|
||||
<i class="fa fa-lg fa-fw fa-check"></i>
|
||||
</button>
|
||||
<button type="button" data-dismiss="modal">{{'close' | i18n}}</button>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,7 @@ export class PasswordGeneratorComponent implements OnInit {
|
||||
|
||||
options: any = {};
|
||||
password: string = '-';
|
||||
showOptions = false;
|
||||
|
||||
constructor(private passwordGenerationService: PasswordGenerationService, private analytics: Angulartics2,
|
||||
private utilsService: UtilsService) { }
|
||||
@@ -89,4 +90,8 @@ export class PasswordGeneratorComponent implements OnInit {
|
||||
this.analytics.eventTrack.next({ action: 'Selected Generated Password' });
|
||||
this.onSelected.emit(this.password);
|
||||
}
|
||||
|
||||
toggleOptions() {
|
||||
this.showOptions = !this.showOptions;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user