fix collapsed input issue
This commit is contained in:
parent
a06f6ada4e
commit
8316f97e27
1 changed files with 159 additions and 150 deletions
|
@ -2,6 +2,7 @@ import React, {useState, useRef} from 'react'
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Keyboard,
|
Keyboard,
|
||||||
|
ScrollView,
|
||||||
TextInput,
|
TextInput,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
|
@ -21,7 +22,7 @@ import {styles} from '../../view/com/auth/login/styles'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {useDialogControl} from '#/components/Dialog'
|
import {useDialogControl} from '#/components/Dialog'
|
||||||
import {ServerInputDialog} from '../../view/com/auth/server-input'
|
import {ServerInputDialog} from '../../view/com/auth/server-input'
|
||||||
import {Button} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {isAndroid} from '#/platform/detection'
|
import {isAndroid} from '#/platform/detection'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
@ -43,6 +44,7 @@ export const LoginForm = ({
|
||||||
setServiceUrl,
|
setServiceUrl,
|
||||||
onPressRetryConnect,
|
onPressRetryConnect,
|
||||||
onPressBack,
|
onPressBack,
|
||||||
|
onPressForgotPassword,
|
||||||
}: {
|
}: {
|
||||||
error: string
|
error: string
|
||||||
serviceUrl: string
|
serviceUrl: string
|
||||||
|
@ -129,7 +131,8 @@ export const LoginForm = ({
|
||||||
|
|
||||||
const isReady = !!serviceDescription && !!identifier && !!password
|
const isReady = !!serviceDescription && !!identifier && !!password
|
||||||
return (
|
return (
|
||||||
<View testID="loginForm" style={[a.gap_lg, !gtMobile && a.px_lg]}>
|
<ScrollView testID="loginForm" style={a.h_full}>
|
||||||
|
<View style={[a.gap_lg, !gtMobile && a.px_lg, a.flex_1]}>
|
||||||
<ServerInputDialog
|
<ServerInputDialog
|
||||||
control={serverInputControl}
|
control={serverInputControl}
|
||||||
onSelect={setServiceUrl}
|
onSelect={setServiceUrl}
|
||||||
|
@ -224,17 +227,22 @@ export const LoginForm = ({
|
||||||
: _(msg`Input the password tied to ${identifier}`)
|
: _(msg`Input the password tied to ${identifier}`)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{/* <TouchableOpacity
|
<TouchableOpacity
|
||||||
testID="forgotPasswordButton"
|
testID="forgotPasswordButton"
|
||||||
style={styles.textInputInnerBtn}
|
|
||||||
onPress={onPressForgotPassword}
|
onPress={onPressForgotPassword}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel={_(msg`Forgot password`)}
|
accessibilityLabel={_(msg`Forgot password`)}
|
||||||
accessibilityHint={_(msg`Opens password reset form`)}>
|
accessibilityHint={_(msg`Opens password reset form`)}
|
||||||
<Text style={pal.link}>
|
style={[
|
||||||
<Trans>Forgot</Trans>
|
a.rounded_sm,
|
||||||
</Text>
|
t.atoms.bg_contrast_100,
|
||||||
</TouchableOpacity> */}
|
{marginLeft: 'auto', left: 6, padding: 6},
|
||||||
|
a.z_10,
|
||||||
|
]}>
|
||||||
|
<ButtonText style={t.atoms.text_contrast_medium}>
|
||||||
|
<Trans>Forgot?</Trans>
|
||||||
|
</ButtonText>
|
||||||
|
</TouchableOpacity>
|
||||||
</TextField.Root>
|
</TextField.Root>
|
||||||
</View>
|
</View>
|
||||||
{error ? (
|
{error ? (
|
||||||
|
@ -288,5 +296,6 @@ export const LoginForm = ({
|
||||||
) : undefined}
|
) : undefined}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue