MOBILE-3833 show-password: fix show password eye icon

main
Alfonso Salces 2022-04-19 11:07:46 +02:00
parent 2e584357e7
commit 70a4f1df40
2 changed files with 1 additions and 4 deletions

View File

@ -1,6 +1,5 @@
<ng-content></ng-content>
<ion-button fill="clear" [attr.aria-label]="label | translate" core-suppress-events (onClick)="toggle($event)"
(mousedown)="doNotBlur($event)" (keydown)="doNotBlur($event)" (keyup)="toggle($event)">
<ion-icon [name]=" iconName" slot="icon-only" aria-hidden="true">
</ion-icon>
<ion-icon [name]="shown ? 'fas-eye-slash' : 'fas-eye'" slot="icon-only" aria-hidden="true"></ion-icon>
</ion-button>

View File

@ -46,7 +46,6 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit {
shown = false; // Whether the password is shown.
label = ''; // Label for the button to show/hide.
iconName = ''; // Name of the icon of the button to show/hide.
protected input?: HTMLInputElement; // Input affected.
protected element: HTMLElement; // Current element.
@ -99,7 +98,6 @@ export class CoreShowPasswordComponent implements OnInit, AfterViewInit {
*/
protected setData(input: HTMLInputElement): void {
this.label = this.shown ? 'core.hide' : 'core.show';
this.iconName = this.shown ? 'fas-eye-slash' : 'fas-eye';
input.type = this.shown ? 'text' : 'password';
}