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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user