mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
reset password input back to password (#16010)
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
import { CommonModule, DatePipe } from "@angular/common";
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
inject,
|
||||
Input,
|
||||
OnChanges,
|
||||
Output,
|
||||
SimpleChanges,
|
||||
ViewChild,
|
||||
} from "@angular/core";
|
||||
import { Observable, switchMap } from "rxjs";
|
||||
|
||||
@@ -61,6 +63,8 @@ export class LoginCredentialsViewComponent implements OnChanges {
|
||||
@Input() activeUserId: UserId;
|
||||
@Input() hadPendingChangePasswordTask: boolean;
|
||||
@Output() handleChangePassword = new EventEmitter<void>();
|
||||
@ViewChild("passwordInput")
|
||||
private passwordInput!: ElementRef<HTMLInputElement>;
|
||||
|
||||
isPremium$: Observable<boolean> = this.accountService.activeAccount$.pipe(
|
||||
switchMap((account) =>
|
||||
@@ -92,6 +96,10 @@ export class LoginCredentialsViewComponent implements OnChanges {
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes["cipher"]) {
|
||||
if (this.passwordInput?.nativeElement) {
|
||||
// Reset password input type in case it's been toggled
|
||||
this.passwordInput.nativeElement.type = "password";
|
||||
}
|
||||
this.passwordRevealed = false;
|
||||
this.showPasswordCount = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user