From da137f099f6b967917e3c9cf72587d4c038db6b1 Mon Sep 17 00:00:00 2001 From: yangqianqian <5845211314@qq.com> Date: Wed, 1 Jul 2026 10:43:07 +0800 Subject: [PATCH] fix: add password visibility controls to change password --- frontend/src/app/change-password/page.tsx | 36 +++++++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/change-password/page.tsx b/frontend/src/app/change-password/page.tsx index 69ea7a3..19bd9f1 100644 --- a/frontend/src/app/change-password/page.tsx +++ b/frontend/src/app/change-password/page.tsx @@ -17,6 +17,9 @@ export default function ChangePasswordPage() { const [confirmPassword, setConfirmPassword] = useState(''); const [error, setError] = useState(''); const [saving, setSaving] = useState(false); + const [showCurrentPwd, setShowCurrentPwd] = useState(false); + const [showNewPwd, setShowNewPwd] = useState(false); + const [showConfirmPwd, setShowConfirmPwd] = useState(false); async function handleSubmit(e: React.FormEvent) { e.preventDefault(); @@ -63,18 +66,39 @@ export default function ChangePasswordPage() {
- setCurrentPassword(e.target.value)} className={INPUT_CLS} /> +
+ setCurrentPassword(e.target.value)} className={INPUT_CLS + ' pr-10'} /> + +
- setNewPassword(e.target.value)} className={INPUT_CLS} /> +
+ setNewPassword(e.target.value)} className={INPUT_CLS + ' pr-10'} /> + +
- setConfirmPassword(e.target.value)} className={INPUT_CLS} /> +
+ setConfirmPassword(e.target.value)} className={INPUT_CLS + ' pr-10'} /> + +
{error &&
{error}
}