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