1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

[PM-21021] - fix toggled hidden field state for custom fields view (#14595)

* fix toggled hidden field state for custom fields view

* fix hidden field toggle for cards and login details
This commit is contained in:
Jordan Aasen
2025-05-09 18:09:26 -07:00
committed by GitHub
parent 23d4f04b22
commit 2282a74abd
5 changed files with 45 additions and 6 deletions

View File

@@ -1,7 +1,15 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { CommonModule, DatePipe } from "@angular/common";
import { Component, EventEmitter, inject, Input, Output } from "@angular/core";
import {
Component,
EventEmitter,
inject,
Input,
OnChanges,
Output,
SimpleChanges,
} from "@angular/core";
import { Observable, switchMap } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
@@ -51,7 +59,7 @@ type TotpCodeValues = {
LinkModule,
],
})
export class LoginCredentialsViewComponent {
export class LoginCredentialsViewComponent implements OnChanges {
@Input() cipher: CipherView;
@Input() activeUserId: UserId;
@Input() hadPendingChangePasswordTask: boolean;
@@ -85,6 +93,13 @@ export class LoginCredentialsViewComponent {
return `${dateCreated} ${creationDate}`;
}
ngOnChanges(changes: SimpleChanges): void {
if (changes["cipher"]) {
this.passwordRevealed = false;
this.showPasswordCount = false;
}
}
async getPremium(organizationId?: string) {
await this.premiumUpgradeService.promptForPremium(organizationId);
}