mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
chore: added new ui fields (#2991)
This commit is contained in:
parent
abed118ef0
commit
4d5df858e9
@ -64,6 +64,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="masterPasswordHint">{{ "masterPassHintLabel" | i18n }}</label>
|
||||
<input
|
||||
id="masterPasswordHint"
|
||||
class="form-control"
|
||||
maxlength="50"
|
||||
type="text"
|
||||
name="MasterPasswordHint"
|
||||
[(ngModel)]="masterPasswordHint"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input
|
||||
|
@ -36,6 +36,7 @@ import { UpdateKeyRequest } from "@bitwarden/common/models/request/updateKeyRequ
|
||||
export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
||||
rotateEncKey = false;
|
||||
currentMasterPassword: string;
|
||||
masterPasswordHint: string;
|
||||
|
||||
constructor(
|
||||
i18nService: I18nService,
|
||||
@ -69,6 +70,8 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
||||
if (await this.keyConnectorService.getUsesKeyConnector()) {
|
||||
this.router.navigate(["/settings/security/two-factor"]);
|
||||
}
|
||||
|
||||
this.masterPasswordHint = (await this.apiService.getProfile()).masterPasswordHint;
|
||||
await super.ngOnInit();
|
||||
}
|
||||
|
||||
@ -156,6 +159,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
||||
this.currentMasterPassword,
|
||||
null
|
||||
);
|
||||
request.masterPasswordHint = this.masterPasswordHint;
|
||||
request.newMasterPasswordHash = newMasterPasswordHash;
|
||||
request.key = newEncKey[1].encryptedString;
|
||||
|
||||
|
@ -30,16 +30,6 @@
|
||||
readonly
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="!hidePasswordHint">
|
||||
<label for="masterPasswordHint">{{ "masterPassHintLabel" | i18n }}</label>
|
||||
<input
|
||||
id="masterPasswordHint"
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="MasterPasswordHint"
|
||||
[(ngModel)]="profile.masterPasswordHint"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="mb-3">
|
||||
|
@ -18,7 +18,6 @@ export class ProfileComponent implements OnInit {
|
||||
loading = true;
|
||||
profile: ProfileResponse;
|
||||
fingerprint: string;
|
||||
hidePasswordHint = false;
|
||||
|
||||
formPromise: Promise<any>;
|
||||
|
||||
@ -41,7 +40,6 @@ export class ProfileComponent implements OnInit {
|
||||
if (fingerprint != null) {
|
||||
this.fingerprint = fingerprint.join("-");
|
||||
}
|
||||
this.hidePasswordHint = await this.keyConnectorService.getUsesKeyConnector();
|
||||
}
|
||||
|
||||
async submit() {
|
||||
|
@ -2,5 +2,6 @@ import { SecretVerificationRequest } from "./secretVerificationRequest";
|
||||
|
||||
export class PasswordRequest extends SecretVerificationRequest {
|
||||
newMasterPasswordHash: string;
|
||||
masterPasswordHint: string;
|
||||
key: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user