mirror of
https://github.com/bitwarden/web
synced 2025-12-16 00:03:25 +00:00
added password generator tool
This commit is contained in:
63
src/app/tools/password-generator.component.html
Normal file
63
src/app/tools/password-generator.component.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<div class="page-header">
|
||||
<h1>{{'passwordGenerator' | i18n}}</h1>
|
||||
</div>
|
||||
<div class="card card-password bg-light my-4">
|
||||
<div class="card-body">
|
||||
<span>{{password}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<h2>{{'options' | i18n}}</h2>
|
||||
<div class="row">
|
||||
<div class="form-group col-4">
|
||||
<label for="length">{{'length' | i18n}}</label>
|
||||
<input id="length" class="form-control" type="number" min="5" max="128" [(ngModel)]="options.length" (input)="saveOptions()">
|
||||
<input id="lengthRange" class="mt-2" type="range" min="5" max="128" step="1" [(ngModel)]="options.length" (change)="sliderChanged()"
|
||||
(input)="sliderInput()">
|
||||
</div>
|
||||
<div class="form-group col-4">
|
||||
<label for="min-number">{{'minNumbers' | i18n}}</label>
|
||||
<input id="min-number" class="form-control" type="number" min="0" max="9" (input)="saveOptions()" [(ngModel)]="options.minNumber">
|
||||
</div>
|
||||
<div class="form-group col-4">
|
||||
<label for="min-special">{{'minSpecial' | i18n}}</label>
|
||||
<input id="min-special" class="form-control" type="number" min="0" max="9" (input)="saveOptions()" [(ngModel)]="options.minSpecial">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input id="uppercase" class="form-check-input" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.uppercase">
|
||||
<label for="uppercase" class="form-check-label">A-Z</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input id="lowercase" class="form-check-input" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.lowercase">
|
||||
<label for="lowercase" class="form-check-label">a-z</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input id="numbers" class="form-check-input" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.number">
|
||||
<label for="numbers" class="form-check-label">0-9</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input id="special" class="form-check-input" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.special">
|
||||
<label for="special" class="form-check-label">!@#$%^&*</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input id="ambiguous" class="form-check-input" type="checkbox" (change)="saveOptions()" [(ngModel)]="avoidAmbiguous">
|
||||
<label for="ambiguous" class="form-check-label">{{'ambiguous' | i18n}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-primary" appBlurClick (click)="regenerate()">
|
||||
{{'regeneratePassword' | i18n}}
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary" appBlurClick (click)="copy()">
|
||||
{{'copyPassword' | i18n}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="ml-auto">
|
||||
<button type="button" class="btn btn-link" appBlurClick (click)="history()">
|
||||
{{'passwordHistory' | i18n}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #historyTemplate></ng-template>
|
||||
Reference in New Issue
Block a user