From 96f5e7e3b0130970077f83040f22b7c9514f7fe3 Mon Sep 17 00:00:00 2001 From: MOHAN Date: Thu, 27 Aug 2026 00:05:57 +0530 Subject: [PATCH] Add show/hide password toggle to login page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The login page's password field had no reveal toggle at all — it was always plain type="password" with no button, unlike the register page which already had one. Added the same eye-icon toggle used on register, verified in a real browser with Playwright: click toggles password<->text and back, value is preserved throughout. --- app/login/page.tsx | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/app/login/page.tsx b/app/login/page.tsx index c6e1cd5..fe42c29 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -34,6 +34,7 @@ function LoginForm() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); + const [showPassword, setShowPassword] = useState(false); const [staySignedIn, setStaySignedIn] = useState(true); const [totpToken, setTotpToken] = useState(""); const [requiresTwoFactor, setRequiresTwoFactor] = useState(false); @@ -155,12 +156,29 @@ function LoginForm() { -
+
setPassword(e.target.value)} - className="block w-full appearance-none rounded-lg border border-border bg-background/50 px-3 py-2 text-foreground placeholder-muted-foreground shadow-sm focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 sm:text-sm transition-all" + className="block w-full appearance-none rounded-lg border border-border bg-background/50 px-3 py-2 pr-11 text-foreground placeholder-muted-foreground shadow-sm focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20 sm:text-sm transition-all" /> +