mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
chore: added new ui fields (#2991)
This commit is contained in:
@@ -64,6 +64,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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-group">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import { UpdateKeyRequest } from "@bitwarden/common/models/request/updateKeyRequ
|
|||||||
export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
||||||
rotateEncKey = false;
|
rotateEncKey = false;
|
||||||
currentMasterPassword: string;
|
currentMasterPassword: string;
|
||||||
|
masterPasswordHint: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
i18nService: I18nService,
|
i18nService: I18nService,
|
||||||
@@ -69,6 +70,8 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
if (await this.keyConnectorService.getUsesKeyConnector()) {
|
if (await this.keyConnectorService.getUsesKeyConnector()) {
|
||||||
this.router.navigate(["/settings/security/two-factor"]);
|
this.router.navigate(["/settings/security/two-factor"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.masterPasswordHint = (await this.apiService.getProfile()).masterPasswordHint;
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +159,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent {
|
|||||||
this.currentMasterPassword,
|
this.currentMasterPassword,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
request.masterPasswordHint = this.masterPasswordHint;
|
||||||
request.newMasterPasswordHash = newMasterPasswordHash;
|
request.newMasterPasswordHash = newMasterPasswordHash;
|
||||||
request.key = newEncKey[1].encryptedString;
|
request.key = newEncKey[1].encryptedString;
|
||||||
|
|
||||||
|
|||||||
@@ -30,16 +30,6 @@
|
|||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ export class ProfileComponent implements OnInit {
|
|||||||
loading = true;
|
loading = true;
|
||||||
profile: ProfileResponse;
|
profile: ProfileResponse;
|
||||||
fingerprint: string;
|
fingerprint: string;
|
||||||
hidePasswordHint = false;
|
|
||||||
|
|
||||||
formPromise: Promise<any>;
|
formPromise: Promise<any>;
|
||||||
|
|
||||||
@@ -41,7 +40,6 @@ export class ProfileComponent implements OnInit {
|
|||||||
if (fingerprint != null) {
|
if (fingerprint != null) {
|
||||||
this.fingerprint = fingerprint.join("-");
|
this.fingerprint = fingerprint.join("-");
|
||||||
}
|
}
|
||||||
this.hidePasswordHint = await this.keyConnectorService.getUsesKeyConnector();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ import { SecretVerificationRequest } from "./secretVerificationRequest";
|
|||||||
|
|
||||||
export class PasswordRequest extends SecretVerificationRequest {
|
export class PasswordRequest extends SecretVerificationRequest {
|
||||||
newMasterPasswordHash: string;
|
newMasterPasswordHash: string;
|
||||||
|
masterPasswordHint: string;
|
||||||
key: string;
|
key: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user