From 15d0de806b909b1c080a0f79b42035d0e329311a Mon Sep 17 00:00:00 2001 From: Uruk Date: Mon, 1 Sep 2025 15:05:40 +0200 Subject: [PATCH] feat: add password visibility toggle to login forms Improves user experience by allowing users to show/hide password text in both main login form and Jellyseerr settings. Adds eye icon button that toggles between masked and visible password input, making it easier for users to verify their password entries. --- app/login.tsx | 84 +++++++++++++++++++----------- components/settings/Jellyseerr.tsx | 54 ++++++++++++------- 2 files changed, 91 insertions(+), 47 deletions(-) diff --git a/app/login.tsx b/app/login.tsx index d64516b6..a236b8b3 100644 --- a/app/login.tsx +++ b/app/login.tsx @@ -52,6 +52,7 @@ const Login: React.FC = () => { username: _username, password: _password, }); + const [showPassword, setShowPassword] = useState(false); /** * A way to auto login based on a link @@ -275,21 +276,33 @@ const Login: React.FC = () => { /> {/* Password */} - - setCredentials({ ...credentials, password: text }) - } - value={credentials.password} - secureTextEntry - keyboardType='default' - returnKeyType='done' - autoCapitalize='none' - textContentType='password' - clearButtonMode='while-editing' - maxLength={500} - extraClassName='mb-4' - /> + + + setCredentials({ ...credentials, password: text }) + } + value={credentials.password} + secureTextEntry={!showPassword} + keyboardType='default' + returnKeyType='done' + autoCapitalize='none' + textContentType='password' + clearButtonMode='while-editing' + maxLength={500} + className='pr-12' + /> + setShowPassword(!showPassword)} + className='absolute right-3 top-3.5 p-1' + > + + + @@ -404,20 +417,33 @@ const Login: React.FC = () => { maxLength={500} /> - - setCredentials({ ...credentials, password: text }) - } - value={credentials.password} - secureTextEntry - keyboardType='default' - returnKeyType='done' - autoCapitalize='none' - textContentType='password' - clearButtonMode='while-editing' - maxLength={500} - /> + + + setCredentials({ ...credentials, password: text }) + } + value={credentials.password} + secureTextEntry={!showPassword} + keyboardType='default' + returnKeyType='done' + autoCapitalize='none' + textContentType='password' + clearButtonMode='while-editing' + maxLength={500} + className='pr-12' + /> + setShowPassword(!showPassword)} + className='absolute right-3 top-3.5 p-1' + > + + +