2024-06-17 14:56:24 -07:00
|
|
|
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
|
|
|
|
<auth-password-callout
|
2024-06-26 10:06:50 -07:00
|
|
|
*ngIf="masterPasswordPolicyOptions"
|
|
|
|
|
[policy]="masterPasswordPolicyOptions"
|
2024-06-17 14:56:24 -07:00
|
|
|
></auth-password-callout>
|
|
|
|
|
|
2025-04-07 11:58:50 -07:00
|
|
|
<bit-form-field
|
|
|
|
|
*ngIf="
|
2025-05-16 10:41:46 -07:00
|
|
|
flow === InputPasswordFlow.ChangePassword ||
|
|
|
|
|
flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation
|
2025-04-07 11:58:50 -07:00
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<bit-label>{{ "currentMasterPass" | i18n }}</bit-label>
|
|
|
|
|
<input
|
|
|
|
|
id="input-password-form_current-password"
|
|
|
|
|
bitInput
|
|
|
|
|
type="password"
|
|
|
|
|
formControlName="currentPassword"
|
|
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
bitIconButton
|
|
|
|
|
bitSuffix
|
|
|
|
|
bitPasswordInputToggle
|
|
|
|
|
[(toggled)]="showPassword"
|
|
|
|
|
></button>
|
|
|
|
|
</bit-form-field>
|
|
|
|
|
|
2024-06-17 14:56:24 -07:00
|
|
|
<div class="tw-mb-6">
|
|
|
|
|
<bit-form-field>
|
2025-04-07 11:58:50 -07:00
|
|
|
<bit-label>{{ "newMasterPass" | i18n }}</bit-label>
|
2024-06-17 14:56:24 -07:00
|
|
|
<input
|
2025-04-07 11:58:50 -07:00
|
|
|
id="input-password-form_new-password"
|
2024-06-17 14:56:24 -07:00
|
|
|
bitInput
|
|
|
|
|
type="password"
|
2025-04-07 11:58:50 -07:00
|
|
|
formControlName="newPassword"
|
2024-06-17 14:56:24 -07:00
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
bitIconButton
|
|
|
|
|
bitSuffix
|
|
|
|
|
bitPasswordInputToggle
|
|
|
|
|
[(toggled)]="showPassword"
|
|
|
|
|
></button>
|
|
|
|
|
<bit-hint>
|
|
|
|
|
<span class="tw-font-bold">{{ "important" | i18n }} </span>
|
|
|
|
|
{{ "masterPassImportant" | i18n }}
|
2024-07-25 07:42:32 -07:00
|
|
|
{{ minPasswordLengthMsg }}.
|
2024-06-17 14:56:24 -07:00
|
|
|
</bit-hint>
|
|
|
|
|
</bit-form-field>
|
|
|
|
|
|
2024-07-16 09:14:39 -07:00
|
|
|
<tools-password-strength
|
2024-06-17 14:56:24 -07:00
|
|
|
[showText]="true"
|
2024-07-16 09:14:39 -07:00
|
|
|
[email]="email"
|
2025-04-07 11:58:50 -07:00
|
|
|
[password]="formGroup.controls.newPassword.value"
|
2024-07-16 09:14:39 -07:00
|
|
|
(passwordStrengthScore)="getPasswordStrengthScore($event)"
|
|
|
|
|
></tools-password-strength>
|
2024-06-17 14:56:24 -07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<bit-form-field>
|
2025-05-16 10:41:46 -07:00
|
|
|
<bit-label>{{ "confirmNewMasterPass" | i18n }}</bit-label>
|
2024-06-17 14:56:24 -07:00
|
|
|
<input
|
2025-05-16 10:41:46 -07:00
|
|
|
id="input-password-form_new-password-confirm"
|
2024-06-17 14:56:24 -07:00
|
|
|
bitInput
|
|
|
|
|
type="password"
|
2025-05-16 10:41:46 -07:00
|
|
|
formControlName="newPasswordConfirm"
|
2024-06-17 14:56:24 -07:00
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
bitIconButton
|
|
|
|
|
bitSuffix
|
|
|
|
|
bitPasswordInputToggle
|
|
|
|
|
[(toggled)]="showPassword"
|
|
|
|
|
></button>
|
|
|
|
|
</bit-form-field>
|
|
|
|
|
|
|
|
|
|
<bit-form-field>
|
|
|
|
|
<bit-label>{{ "masterPassHintLabel" | i18n }}</bit-label>
|
2025-05-16 10:41:46 -07:00
|
|
|
<input id="input-password-form_new-password-hint" bitInput formControlName="newPasswordHint" />
|
2024-06-17 14:56:24 -07:00
|
|
|
<bit-hint>
|
2025-05-16 10:41:46 -07:00
|
|
|
{{
|
|
|
|
|
"masterPassHintText"
|
|
|
|
|
| i18n: formGroup.value.newPasswordHint.length : maxHintLength.toString()
|
|
|
|
|
}}
|
2024-06-17 14:56:24 -07:00
|
|
|
</bit-hint>
|
|
|
|
|
</bit-form-field>
|
|
|
|
|
|
|
|
|
|
<bit-form-control>
|
2025-05-16 10:41:46 -07:00
|
|
|
<input
|
|
|
|
|
id="input-password-form_check-for-breaches"
|
|
|
|
|
type="checkbox"
|
|
|
|
|
bitCheckbox
|
|
|
|
|
formControlName="checkForBreaches"
|
|
|
|
|
/>
|
2024-06-17 14:56:24 -07:00
|
|
|
<bit-label>{{ "checkForBreaches" | i18n }}</bit-label>
|
|
|
|
|
</bit-form-control>
|
|
|
|
|
|
2025-05-16 10:41:46 -07:00
|
|
|
<bit-form-control *ngIf="flow === InputPasswordFlow.ChangePasswordWithOptionalUserKeyRotation">
|
|
|
|
|
<input
|
|
|
|
|
id="input-password-form_rotate-user-key"
|
|
|
|
|
type="checkbox"
|
|
|
|
|
bitCheckbox
|
|
|
|
|
formControlName="rotateUserKey"
|
|
|
|
|
(change)="rotateUserKeyClicked()"
|
|
|
|
|
/>
|
2025-04-07 11:58:50 -07:00
|
|
|
<bit-label>
|
|
|
|
|
{{ "rotateAccountEncKey" | i18n }}
|
|
|
|
|
<a
|
|
|
|
|
href="https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noreferrer"
|
|
|
|
|
appA11yTitle="{{ 'impactOfRotatingYourEncryptionKey' | i18n }}"
|
|
|
|
|
>
|
|
|
|
|
<i class="bwi bwi-question-circle" aria-hidden="true"></i>
|
|
|
|
|
</a>
|
|
|
|
|
</bit-label>
|
|
|
|
|
</bit-form-control>
|
|
|
|
|
|
|
|
|
|
<div class="tw-flex tw-gap-2" [ngClass]="inlineButtons ? 'tw-flex-row' : 'tw-flex-col'">
|
|
|
|
|
<button type="submit" bitButton bitFormButton buttonType="primary" [loading]="loading">
|
|
|
|
|
{{ primaryButtonTextStr || ("setMasterPassword" | i18n) }}
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
*ngIf="secondaryButtonText"
|
|
|
|
|
type="button"
|
|
|
|
|
bitButton
|
|
|
|
|
bitFormButton
|
|
|
|
|
buttonType="secondary"
|
|
|
|
|
[loading]="loading"
|
|
|
|
|
(click)="onSecondaryButtonClick.emit()"
|
|
|
|
|
>
|
|
|
|
|
{{ secondaryButtonTextStr }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2024-06-17 14:56:24 -07:00
|
|
|
|
|
|
|
|
<bit-error-summary *ngIf="showErrorSummary" [formGroup]="formGroup"></bit-error-summary>
|
|
|
|
|
</form>
|