mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[PM-12724] - fix logic for showing new password (#11512)
* fix logic for showing new password * fix logic
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
>
|
>
|
||||||
</bit-form-field>
|
</bit-form-field>
|
||||||
<bit-form-field>
|
<bit-form-field>
|
||||||
<bit-label *ngIf="!originalSendView || !hasPassword">{{ "password" | i18n }}</bit-label>
|
<bit-label *ngIf="!shouldShowNewPassword">{{ "password" | i18n }}</bit-label>
|
||||||
<bit-label *ngIf="originalSendView && hasPassword">{{ "newPassword" | i18n }}</bit-label>
|
<bit-label *ngIf="shouldShowNewPassword">{{ "newPassword" | i18n }}</bit-label>
|
||||||
<input bitInput type="password" formControlName="password" />
|
<input bitInput type="password" formControlName="password" />
|
||||||
<button
|
<button
|
||||||
data-testid="toggle-visibility-for-password"
|
data-testid="toggle-visibility-for-password"
|
||||||
|
|||||||
@@ -53,10 +53,8 @@ export class SendOptionsComponent implements OnInit {
|
|||||||
hideEmail: [false as boolean],
|
hideEmail: [false as boolean],
|
||||||
});
|
});
|
||||||
|
|
||||||
get hasPassword(): boolean {
|
get shouldShowNewPassword(): boolean {
|
||||||
return (
|
return this.originalSendView && this.originalSendView.password !== null;
|
||||||
this.sendOptionsForm.value.password !== null && this.sendOptionsForm.value.password !== ""
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get shouldShowCount(): boolean {
|
get shouldShowCount(): boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user