From f68df139067ec4357fe97375685ed7cbb375e4b5 Mon Sep 17 00:00:00 2001 From: "SANDHYA.JS" Date: Thu, 12 Oct 2023 16:23:38 +0530 Subject: [PATCH] Fix Bug 2295: No eye-icon in NG-UI - Added Visibility function for password in login page Change-Id: I1413806f7c1d32832f805d5952c7841ac8bed2ad Signed-off-by: SANDHYA.JS --- src/app/login/LoginComponent.html | 4 ++-- src/app/login/LoginComponent.scss | 14 ++++++++++++++ src/app/login/LoginComponent.ts | 8 ++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/app/login/LoginComponent.html b/src/app/login/LoginComponent.html index 296d51b..12c88f2 100644 --- a/src/app/login/LoginComponent.html +++ b/src/app/login/LoginComponent.html @@ -32,11 +32,11 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
{{'PAGE.LOGIN.USERNAMEVALIDMESSAGE' | translate}}
- + +
{{'PAGE.LOGIN.PASSWORDVALIDMESSAGE' | translate}}
diff --git a/src/app/login/LoginComponent.scss b/src/app/login/LoginComponent.scss index dc1a51b..895fe22 100644 --- a/src/app/login/LoginComponent.scss +++ b/src/app/login/LoginComponent.scss @@ -101,6 +101,20 @@ pointer-events: none; color: $gray-600; } + .input-icon-eye { + @include font(null, 13px, null); + @include flexbox(flex, null, null, null, center, null); + @include roundedCorners(25); + @include position_value(absolute, null, null, 0, 0); + left: 245px; + top: 4px; + @include transition(all, 0.5s, null, null); + color: $gray-600; + cursor: pointer; + } + input::-ms-reveal, input::-ms-clear { + display: none; + } } .submit-btn { @include background(null, $white, null, null, null); diff --git a/src/app/login/LoginComponent.ts b/src/app/login/LoginComponent.ts index 1ffa8c3..964394d 100644 --- a/src/app/login/LoginComponent.ts +++ b/src/app/login/LoginComponent.ts @@ -126,6 +126,9 @@ export class LoginComponent implements OnInit { /** contains the passwordIn observable value @public */ public changePassword: boolean; + /** To show the visiblity of password @public */ + public visiblePassword: boolean; + /** Utilizes auth service for any auth operations @private */ private authService: AuthenticationService; @@ -284,6 +287,11 @@ export class LoginComponent implements OnInit { } } + /** To Show or Hide the Password @public */ + public onShowPassword(): void { + this.visiblePassword = !this.visiblePassword; + } + /** To display password expiry Toaster with required data @public */ public passwordExpiryToaster(): void { if ((this.accountNoOfDays === '1' && this.passwordNoOfDays === '1') || -- 2.25.1