1
0
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:
Brandon Maharaj 2022-07-18 17:47:53 -04:00 committed by GitHub
parent abed118ef0
commit 4d5df858e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 12 deletions

View File

@ -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

View File

@ -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;

View File

@ -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">

View File

@ -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() {

View File

@ -2,5 +2,6 @@ import { SecretVerificationRequest } from "./secretVerificationRequest";
export class PasswordRequest extends SecretVerificationRequest {
newMasterPasswordHash: string;
masterPasswordHint: string;
key: string;
}