mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-05 13:38:27 +01:00
refactor: standardize Input component prop naming
Replaces `className` prop with `extraClassName` across Input and PasswordInput components for consistency. Updates PasswordInput to use numeric `topOffset` instead of string `topPosition` for better type safety and clearer intent. Adds uncontrolled mode support to PasswordInput with internal state management and optional `defaultShowPassword` prop. Removes unnecessary margin classes from various View components to clean up spacing.
This commit is contained in:
@@ -273,7 +273,7 @@ const Login: React.FC = () => {
|
||||
textContentType='oneTimeCode'
|
||||
clearButtonMode='while-editing'
|
||||
maxLength={500}
|
||||
extraClassName='mb-4'
|
||||
extraClassName=''
|
||||
/>
|
||||
|
||||
{/* Password */}
|
||||
@@ -286,15 +286,15 @@ const Login: React.FC = () => {
|
||||
placeholder={t("login.password_placeholder")}
|
||||
showPassword={showPassword}
|
||||
onShowPasswordChange={setShowPassword}
|
||||
topPosition='15'
|
||||
topOffset={15}
|
||||
layout='tv'
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View className='mt-4'>
|
||||
<View className=''>
|
||||
<Button onPress={handleLogin}>{t("login.login_button")}</Button>
|
||||
</View>
|
||||
<View className='mt-3'>
|
||||
<View className=''>
|
||||
<Button
|
||||
onPress={handleQuickConnect}
|
||||
className='bg-neutral-800 border border-neutral-700'
|
||||
@@ -348,7 +348,7 @@ const Login: React.FC = () => {
|
||||
</View>
|
||||
|
||||
{/* Lists stay full width but inside max width container */}
|
||||
<View className='mt-2'>
|
||||
<View className='mt-4'>
|
||||
<JellyfinServerDiscovery
|
||||
onServerSelect={async (server: any) => {
|
||||
setServerURL(server.address);
|
||||
@@ -402,10 +402,10 @@ const Login: React.FC = () => {
|
||||
textContentType='oneTimeCode'
|
||||
clearButtonMode='while-editing'
|
||||
maxLength={500}
|
||||
extraClassName='mb-4'
|
||||
extraClassName=''
|
||||
/>
|
||||
|
||||
<View className='relative mb-0.5'>
|
||||
<View className='relative'>
|
||||
<PasswordInput
|
||||
value={credentials.password}
|
||||
onChangeText={(text) =>
|
||||
@@ -414,7 +414,7 @@ const Login: React.FC = () => {
|
||||
placeholder={t("login.password_placeholder")}
|
||||
showPassword={showPassword}
|
||||
onShowPasswordChange={setShowPassword}
|
||||
topPosition='10'
|
||||
topOffset={12}
|
||||
layout='mobile'
|
||||
/>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user