2018-06-21 00:16:20 +02:00
|
|
|
<div class="page-header">
|
|
|
|
<h1>{{ "passwordGenerator" | i18n }}</h1>
|
|
|
|
</div>
|
2020-03-11 16:35:12 +01:00
|
|
|
<app-callout type="info" *ngIf="enforcedPolicyOptions?.inEffect()">
|
2020-02-28 20:48:48 +01:00
|
|
|
{{ "passwordGeneratorPolicyInEffect" | i18n }}
|
|
|
|
</app-callout>
|
2018-06-21 00:16:20 +02:00
|
|
|
<div class="card card-password bg-light my-4">
|
2019-04-01 19:56:34 +02:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="password-wrapper" [innerHTML]="password | colorPassword" appSelectCopy></div>
|
|
|
|
</div>
|
2018-06-21 00:16:20 +02:00
|
|
|
</div>
|
2018-10-08 23:27:25 +02:00
|
|
|
<div class="form-group">
|
2021-07-08 01:06:46 +02:00
|
|
|
<div class="form-check form-check-inline" *ngFor="let o of passTypeOptions">
|
|
|
|
<input
|
|
|
|
class="form-check-input"
|
|
|
|
type="radio"
|
|
|
|
[(ngModel)]="options.type"
|
|
|
|
name="Type_{{ o.value }}"
|
|
|
|
id="type_{{ o.value }}"
|
|
|
|
[value]="o.value"
|
|
|
|
(change)="saveOptions()"
|
|
|
|
[checked]="options.type === o.value"
|
|
|
|
/>
|
|
|
|
<label class="form-check-label" for="type_{{ o.value }}">
|
|
|
|
{{ o.name }}
|
|
|
|
</label>
|
2018-10-08 23:27:25 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-02 23:01:19 +02:00
|
|
|
<ng-container *ngIf="options.type === 'passphrase'">
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-4">
|
|
|
|
<label for="num-words">{{ "numWords" | i18n }}</label>
|
|
|
|
<input
|
|
|
|
id="num-words"
|
|
|
|
class="form-control"
|
|
|
|
type="number"
|
|
|
|
min="3"
|
|
|
|
max="20"
|
|
|
|
[(ngModel)]="options.numWords"
|
|
|
|
(blur)="saveOptions()"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-4">
|
|
|
|
<label for="word-separator">{{ "wordSeparator" | i18n }}</label>
|
|
|
|
<input
|
|
|
|
id="word-separator"
|
|
|
|
class="form-control"
|
|
|
|
type="text"
|
|
|
|
maxlength="1"
|
|
|
|
[(ngModel)]="options.wordSeparator"
|
|
|
|
(blur)="saveOptions()"
|
|
|
|
/>
|
2019-07-02 22:54:46 +02:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2019-07-02 23:01:19 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input
|
|
|
|
id="capitalize"
|
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
2020-03-11 16:35:12 +01:00
|
|
|
[(ngModel)]="options.capitalize"
|
|
|
|
[disabled]="enforcedPolicyOptions?.capitalize"
|
|
|
|
/>
|
2019-07-02 23:01:19 +02:00
|
|
|
<label for="capitalize" class="form-check-label">{{ "capitalize" | i18n }}</label>
|
2019-07-02 22:54:46 +02:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-07-02 23:01:19 +02:00
|
|
|
id="include-number"
|
2019-02-21 22:50:37 +01:00
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
2020-03-11 16:35:12 +01:00
|
|
|
[(ngModel)]="options.includeNumber"
|
|
|
|
[disabled]="enforcedPolicyOptions?.includeNumber"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2019-07-02 23:01:19 +02:00
|
|
|
<label for="include-number" class="form-check-label">{{ "includeNumber" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-02 23:01:19 +02:00
|
|
|
</ng-container>
|
2018-10-09 04:06:15 +02:00
|
|
|
<ng-container *ngIf="options.type === 'password'">
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-4">
|
|
|
|
<label for="length">{{ "length" | i18n }}</label>
|
2019-02-21 22:50:37 +01:00
|
|
|
<input
|
|
|
|
id="length"
|
|
|
|
class="form-control"
|
|
|
|
type="number"
|
|
|
|
min="5"
|
|
|
|
max="128"
|
|
|
|
[(ngModel)]="options.length"
|
2019-04-16 04:37:29 +02:00
|
|
|
(blur)="saveOptions()"
|
|
|
|
(change)="lengthChanged()"
|
2018-10-08 23:55:07 +02:00
|
|
|
/>
|
2018-06-21 00:16:20 +02:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="form-group col-4">
|
|
|
|
<label for="min-number">{{ "minNumbers" | i18n }}</label>
|
2019-02-21 22:50:37 +01:00
|
|
|
<input
|
|
|
|
id="min-number"
|
2018-10-08 23:55:07 +02:00
|
|
|
class="form-control"
|
2019-02-21 22:50:37 +01:00
|
|
|
type="number"
|
|
|
|
min="0"
|
|
|
|
max="9"
|
|
|
|
(blur)="saveOptions()"
|
2020-02-27 01:32:57 +01:00
|
|
|
[(ngModel)]="options.minNumber"
|
2019-02-21 22:50:37 +01:00
|
|
|
(change)="minNumberChanged()"
|
2018-10-08 23:55:07 +02:00
|
|
|
/>
|
2018-06-21 00:16:20 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group col-4">
|
2018-07-18 05:21:23 +02:00
|
|
|
<label for="min-special">{{ "minSpecial" | i18n }}</label>
|
|
|
|
<input
|
2020-02-27 01:32:57 +01:00
|
|
|
id="min-special"
|
2018-07-18 05:21:23 +02:00
|
|
|
class="form-control"
|
|
|
|
type="number"
|
2021-12-17 15:57:11 +01:00
|
|
|
min="0"
|
|
|
|
max="9"
|
2018-07-18 05:21:23 +02:00
|
|
|
(blur)="saveOptions()"
|
|
|
|
[(ngModel)]="options.minSpecial"
|
|
|
|
(change)="minSpecialChanged()"
|
2018-06-21 00:16:20 +02:00
|
|
|
/>
|
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-21 00:16:20 +02:00
|
|
|
<div class="form-group">
|
2019-02-21 22:50:37 +01:00
|
|
|
<div class="form-check">
|
|
|
|
<input
|
|
|
|
id="uppercase"
|
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
|
|
|
[(ngModel)]="options.uppercase"
|
2019-10-11 16:35:24 +02:00
|
|
|
[disabled]="enforcedPolicyOptions?.useUppercase"
|
|
|
|
/>
|
|
|
|
<label for="uppercase" class="form-check-label">A-Z</label>
|
2018-06-21 00:16:20 +02:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2018-10-08 23:55:07 +02:00
|
|
|
id="lowercase"
|
2019-02-21 22:50:37 +01:00
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
2020-02-27 01:32:57 +01:00
|
|
|
[(ngModel)]="options.lowercase"
|
|
|
|
[disabled]="enforcedPolicyOptions?.useLowercase"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2018-10-08 23:55:07 +02:00
|
|
|
<label for="lowercase" class="form-check-label">a-z</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2020-02-27 01:32:57 +01:00
|
|
|
id="numbers"
|
2019-02-21 22:50:37 +01:00
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
2020-02-27 01:32:57 +01:00
|
|
|
[(ngModel)]="options.number"
|
|
|
|
[disabled]="enforcedPolicyOptions?.useNumbers"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2018-10-08 23:55:07 +02:00
|
|
|
<label for="numbers" class="form-check-label">0-9</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-02-21 22:50:37 +01:00
|
|
|
id="special"
|
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
2020-02-27 01:32:57 +01:00
|
|
|
[(ngModel)]="options.special"
|
|
|
|
[disabled]="enforcedPolicyOptions?.useSpecial"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2018-10-08 23:55:07 +02:00
|
|
|
<label for="special" class="form-check-label">!@#$%^&*</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2019-02-21 22:50:37 +01:00
|
|
|
id="ambiguous"
|
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
(change)="saveOptions()"
|
|
|
|
[(ngModel)]="avoidAmbiguous"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2018-10-08 23:55:07 +02:00
|
|
|
<label for="ambiguous" class="form-check-label">{{ "ambiguous" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
</ng-container>
|
2018-06-21 00:16:20 +02:00
|
|
|
<div class="d-flex">
|
2021-12-17 15:57:11 +01:00
|
|
|
<div>
|
2018-07-18 05:21:23 +02:00
|
|
|
<button type="button" class="btn btn-primary" (click)="regenerate()">
|
2018-06-21 00:16:20 +02:00
|
|
|
{{ "regeneratePassword" | i18n }}
|
|
|
|
</button>
|
2018-07-18 05:21:23 +02:00
|
|
|
<button type="button" class="btn btn-outline-secondary" (click)="copy()">
|
2018-06-21 00:16:20 +02:00
|
|
|
{{ "copyPassword" | i18n }}
|
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-10-08 23:55:07 +02:00
|
|
|
<div class="ml-auto">
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2018-07-18 05:21:23 +02:00
|
|
|
type="button"
|
2019-02-21 22:50:37 +01:00
|
|
|
class="btn btn-outline-secondary"
|
2018-07-18 05:21:23 +02:00
|
|
|
(click)="history()"
|
2019-10-11 16:35:24 +02:00
|
|
|
appA11yTitle="{{ 'passwordHistory' | i18n }}"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2019-10-11 16:35:24 +02:00
|
|
|
<i class="fa fa-clock-o fa-lg" aria-hidden="true"></i>
|
2018-06-21 00:16:20 +02:00
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2018-06-21 00:16:20 +02:00
|
|
|
</div>
|
|
|
|
<ng-template #historyTemplate></ng-template>
|