mirror of
https://github.com/bitwarden/browser
synced 2026-01-09 20:13:42 +00:00
* add constraint support to UserStateSubject * add dynamic constraints * implement password policy constraints * replace policy evaluator with constraints in credential generation service * add cascade between minNumber and minSpecial Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
45 lines
1.2 KiB
HTML
45 lines
1.2 KiB
HTML
<bit-toggle-group
|
|
fullWidth
|
|
class="tw-mb-4"
|
|
[selected]="credentialType$ | async"
|
|
(selectedChange)="onCredentialTypeChanged($event)"
|
|
attr.aria-label="{{ 'type' | i18n }}"
|
|
>
|
|
<bit-toggle value="password">
|
|
{{ "password" | i18n }}
|
|
</bit-toggle>
|
|
<bit-toggle value="passphrase">
|
|
{{ "passphrase" | i18n }}
|
|
</bit-toggle>
|
|
</bit-toggle-group>
|
|
<bit-card class="tw-flex tw-justify-between tw-mb-4">
|
|
<div class="tw-grow tw-flex tw-items-center">
|
|
<bit-color-password class="tw-font-mono" [password]="value$ | async"></bit-color-password>
|
|
</div>
|
|
<div class="tw-space-x-1">
|
|
<button type="button" bitIconButton="bwi-generate" buttonType="main" (click)="generate$.next()">
|
|
{{ "generatePassword" | i18n }}
|
|
</button>
|
|
<button
|
|
type="button"
|
|
bitIconButton="bwi-clone"
|
|
buttonType="main"
|
|
[appCopyClick]="value$ | async"
|
|
>
|
|
{{ "copyPassword" | i18n }}
|
|
</button>
|
|
</div>
|
|
</bit-card>
|
|
<tools-password-settings
|
|
class="tw-mt-6"
|
|
*ngIf="(credentialType$ | async) === 'password'"
|
|
[userId]="this.userId$ | async"
|
|
(onUpdated)="generate$.next()"
|
|
/>
|
|
<tools-passphrase-settings
|
|
class="tw-mt-6"
|
|
*ngIf="(credentialType$ | async) === 'passphrase'"
|
|
[userId]="this.userId$ | async"
|
|
(onUpdated)="generate$.next()"
|
|
/>
|