diff --git a/src/screens/Login/LoginForm.tsx b/src/screens/Login/LoginForm.tsx index 8ac4fa35..3089b388 100644 --- a/src/screens/Login/LoginForm.tsx +++ b/src/screens/Login/LoginForm.tsx @@ -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,164 +131,171 @@ export const LoginForm = ({ const isReady = !!serviceDescription && !!identifier && !!password return ( - - + + + - - - Hosting provider - - - - {toNiceDomain(serviceUrl)} - - - - - - - - Account - - - - { - passwordInputRef.current?.focus() - }} - blurOnSubmit={false} // prevents flickering due to onSubmitEditing going to next field - value={identifier} - onChangeText={str => - setIdentifier((str || '').toLowerCase().trim()) - } - editable={!isProcessing} - accessibilityHint={_( - msg`Input the username or email address you used at signup`, - )} - /> - - - - - - - {/* + + Hosting provider + + - - Forgot - - */} - - - {error ? ( - - - - {error} - + style={[ + a.w_full, + a.flex_row, + a.align_center, + a.rounded_sm, + a.px_md, + a.gap_xs, + {paddingVertical: isAndroid ? 14 : 9}, + t.atoms.bg_contrast_25, + ]} + onPress={onPressSelectService}> + + {toNiceDomain(serviceUrl)} + + + + - ) : undefined} - - - - {!serviceDescription && error ? ( + + + Account + + + + { + passwordInputRef.current?.focus() + }} + blurOnSubmit={false} // prevents flickering due to onSubmitEditing going to next field + value={identifier} + onChangeText={str => + setIdentifier((str || '').toLowerCase().trim()) + } + editable={!isProcessing} + accessibilityHint={_( + msg`Input the username or email address you used at signup`, + )} + /> + + + + + + + + + Forgot? + + + + + {error ? ( + + + + {error} + + + ) : undefined} + - ) : !serviceDescription ? ( - <> + + {!serviceDescription && error ? ( + + ) : !serviceDescription ? ( + <> + + + Connecting... + + + ) : isProcessing ? ( - - Connecting... - - - ) : isProcessing ? ( - - ) : isReady ? ( - - ) : undefined} + ) : isReady ? ( + + ) : undefined} + - + ) }