From d3d845115abb2cf14e0892a0f698bc642361a4e4 Mon Sep 17 00:00:00 2001 From: msamgan Date: Thu, 30 Oct 2025 19:17:28 -0400 Subject: [PATCH 1/2] add show/hide password feature in login form --- resources/js/pages/auth/login.tsx | 38 +++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/resources/js/pages/auth/login.tsx b/resources/js/pages/auth/login.tsx index 398b6576b..0b2810301 100644 --- a/resources/js/pages/auth/login.tsx +++ b/resources/js/pages/auth/login.tsx @@ -10,6 +10,8 @@ import { register } from '@/routes'; import { store } from '@/routes/login'; import { request } from '@/routes/password'; import { Form, Head } from '@inertiajs/react'; +import { useState } from 'react'; +import { Eye, EyeOff } from 'lucide-react'; interface LoginProps { status?: string; @@ -22,6 +24,8 @@ export default function Login({ canResetPassword, canRegister, }: LoginProps) { + const [showPassword, setShowPassword] = useState(false); + return ( )} - +
+ + +
From 22fe1f954d8c2622ed91abb0e0bf02097ebe5a91 Mon Sep 17 00:00:00 2001 From: msamgan Date: Thu, 30 Oct 2025 19:22:45 -0400 Subject: [PATCH 2/2] add show/hide password functionality to registration form --- resources/js/pages/auth/register.tsx | 72 +++++++++++++++++++++------- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/resources/js/pages/auth/register.tsx b/resources/js/pages/auth/register.tsx index 8c65f2d5b..0419effd7 100644 --- a/resources/js/pages/auth/register.tsx +++ b/resources/js/pages/auth/register.tsx @@ -9,8 +9,12 @@ import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Spinner } from '@/components/ui/spinner'; import AuthLayout from '@/layouts/auth-layout'; +import { useState } from 'react'; +import { Eye, EyeOff } from 'lucide-react'; export default function Register() { + const [showPassword, setShowPassword] = useState(false); + const [showConfirmPassword, setShowConfirmPassword] = useState(false); return ( - +
+ + +
@@ -76,15 +96,31 @@ export default function Register() { - +
+ + +