Automatically resolve hosting provider from handle (#11053)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
@@ -160,7 +160,12 @@ export function LoggedOut({onDismiss}: {onDismiss?: () => void}) {
|
||||
/>
|
||||
) : undefined}
|
||||
{screenState === ScreenState.S_Login ? (
|
||||
<Login onPressBack={onPressBack} />
|
||||
<Login
|
||||
onPressBack={onPressBack}
|
||||
onPressCreateAccount={() => {
|
||||
setScreenState(ScreenState.S_CreateAccount)
|
||||
}}
|
||||
/>
|
||||
) : undefined}
|
||||
{screenState === ScreenState.S_CreateAccount ? (
|
||||
<Signup onPressBack={onPressBack} />
|
||||
|
||||
@@ -80,7 +80,18 @@ export const SplashScreen = ({
|
||||
<View
|
||||
testID="signinOrCreateAccount"
|
||||
style={[a.px_5xl, a.gap_md, a.pb_sm]}>
|
||||
<View
|
||||
<Button
|
||||
testID="createAccountButton"
|
||||
onPress={() => {
|
||||
onPressCreateAccount()
|
||||
playHaptic('Light')
|
||||
}}
|
||||
label={_(msg`Create new account`)}
|
||||
accessibilityHint={_(
|
||||
msg`Opens flow to create a new Bluesky account`,
|
||||
)}
|
||||
size="large"
|
||||
color={isDarkMode ? 'secondary_inverted' : 'secondary'}
|
||||
style={[
|
||||
t.atoms.shadow_md,
|
||||
{
|
||||
@@ -91,23 +102,10 @@ export const SplashScreen = ({
|
||||
},
|
||||
},
|
||||
]}>
|
||||
<Button
|
||||
testID="createAccountButton"
|
||||
onPress={() => {
|
||||
onPressCreateAccount()
|
||||
playHaptic('Light')
|
||||
}}
|
||||
label={_(msg`Create new account`)}
|
||||
accessibilityHint={_(
|
||||
msg`Opens flow to create a new Bluesky account`,
|
||||
)}
|
||||
size="large"
|
||||
color={isDarkMode ? 'secondary_inverted' : 'secondary'}>
|
||||
<ButtonText>
|
||||
<Trans>Create account</Trans>
|
||||
</ButtonText>
|
||||
</Button>
|
||||
</View>
|
||||
<ButtonText>
|
||||
<Trans>Create account</Trans>
|
||||
</ButtonText>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
testID="signInButton"
|
||||
@@ -119,7 +117,8 @@ export const SplashScreen = ({
|
||||
accessibilityHint={_(
|
||||
msg`Opens flow to sign in to your existing Bluesky account`,
|
||||
)}
|
||||
size="large">
|
||||
size="large"
|
||||
hoverStyle={{opacity: 0.5}}>
|
||||
<ButtonText style={{color: 'white'}}>
|
||||
<Trans>Sign in</Trans>
|
||||
</ButtonText>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {ScrollView, StyleSheet, View} from 'react-native'
|
||||
|
||||
import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle'
|
||||
import {useIsKeyboardVisible} from '#/lib/hooks/useIsKeyboardVisible'
|
||||
import {usePalette} from '#/lib/hooks/usePalette'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {atoms as a} from '#/alf'
|
||||
@@ -29,8 +28,6 @@ export const LoggedOutLayout = ({
|
||||
borderLeftWidth: 1,
|
||||
})
|
||||
|
||||
const [isKeyboardVisible] = useIsKeyboardVisible()
|
||||
|
||||
if (isMobile) {
|
||||
if (scrollable) {
|
||||
return (
|
||||
@@ -38,10 +35,8 @@ export const LoggedOutLayout = ({
|
||||
style={a.flex_1}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
keyboardDismissMode="none"
|
||||
contentContainerStyle={[
|
||||
{paddingBottom: isKeyboardVisible ? 300 : 0},
|
||||
]}>
|
||||
<View style={a.pt_lg}>{children}</View>
|
||||
contentContainerStyle={[a.flex_grow]}>
|
||||
<View style={[a.flex_1, a.pt_lg]}>{children}</View>
|
||||
</ScrollView>
|
||||
)
|
||||
} else {
|
||||
@@ -77,7 +72,15 @@ export const LoggedOutLayout = ({
|
||||
style={a.flex_1}
|
||||
contentContainerStyle={styles.scrollViewContentContainer}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
keyboardDismissMode="on-drag">
|
||||
/*
|
||||
* RNW implements `on-drag` by blurring the focused element on ANY
|
||||
* scroll event - including the one Firefox fires when swapping
|
||||
* splash -> login content resizes the scroller - which kills the
|
||||
* login form's autofocus. It doesn't appear to do anything anyways
|
||||
* on web (judging by iOS safari, which keeps the keyboard open
|
||||
* regardless of scrolling) -sfn
|
||||
*/
|
||||
keyboardDismissMode={IS_WEB ? 'none' : 'on-drag'}>
|
||||
<View style={[styles.contentWrapper, IS_WEB && a.my_auto]}>
|
||||
{children}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user