diff --git a/assets/background-dark.webp b/assets/background-dark.webp new file mode 100644 index 0000000000..a9b2014606 Binary files /dev/null and b/assets/background-dark.webp differ diff --git a/assets/background-light.webp b/assets/background-light.webp new file mode 100644 index 0000000000..5efaa9c7c5 Binary files /dev/null and b/assets/background-light.webp differ diff --git a/src/screens/Authentication/ForgotPasswordScreen.tsx b/src/screens/Authentication/ForgotPasswordScreen.tsx index 33a3aadf2b..a20562b19d 100644 --- a/src/screens/Authentication/ForgotPasswordScreen.tsx +++ b/src/screens/Authentication/ForgotPasswordScreen.tsx @@ -2,11 +2,15 @@ import { type AuthNavigatorParams, type NativeStackScreenProps, } from '#/lib/routes/types' -import * as Layout from '#/components/Layout' import {Text} from '#/components/Typography' +import * as Layout from './components/Layout' type Props = NativeStackScreenProps export function ForgotPasswordScreen({}: Props) { + return +} + +export function ForgotPasswordScreenInner() { return ( diff --git a/src/screens/Authentication/LandingScreen.tsx b/src/screens/Authentication/LandingScreen.tsx index ed56f4bd9a..716ef13bc2 100644 --- a/src/screens/Authentication/LandingScreen.tsx +++ b/src/screens/Authentication/LandingScreen.tsx @@ -7,7 +7,8 @@ import { type AuthNavigatorParams, type NativeStackScreenProps, } from '#/lib/routes/types' -import {useSession} from '#/state/session' +import {isNative} from '#/platform/detection' +import {type SessionAccount, useSession} from '#/state/session' import { useLoggedOutView, useLoggedOutViewControls, @@ -18,11 +19,29 @@ import {atoms as a, useTheme} from '#/alf' import {AppLanguageDropdown} from '#/components/AppLanguageDropdown' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {TimesLarge_Stroke2_Corner0_Rounded as CloseIcon} from '#/components/icons/Times' -import * as Layout from '#/components/Layout' import {Text} from '#/components/Typography' +import * as Layout from './components/Layout' type Props = NativeStackScreenProps export function LandingScreen({navigation}: Props) { + return ( + navigation.navigate('SignUpInfo')} + selectAccount={() => navigation.navigate('SelectAccount')} + signIn={account => navigation.navigate('SignIn', {account})} + /> + ) +} + +export function LandingScreenInner({ + signUp, + selectAccount, + signIn, +}: { + signUp: () => void + selectAccount: () => void + signIn: (account?: SessionAccount) => void +}) { const {_} = useLingui() const t = useTheme() const insets = useSafeAreaInsets() @@ -38,7 +57,7 @@ export function LandingScreen({navigation}: Props) { - {showLoggedOut && ( + {isNative && showLoggedOut && ( @@ -71,7 +90,7 @@ export function LandingScreen({navigation}: Props) { style={[a.px_xl, a.gap_md, a.pb_2xl]}> + )} + + + + + + + + {children} + + + ) +} diff --git a/src/screens/Authentication/components/Layout.native.tsx b/src/screens/Authentication/components/Layout.native.tsx new file mode 100644 index 0000000000..8803d128ed --- /dev/null +++ b/src/screens/Authentication/components/Layout.native.tsx @@ -0,0 +1 @@ +export * from '#/components/Layout' diff --git a/src/screens/Authentication/components/Layout.tsx b/src/screens/Authentication/components/Layout.tsx new file mode 100644 index 0000000000..484b67c515 --- /dev/null +++ b/src/screens/Authentication/components/Layout.tsx @@ -0,0 +1,21 @@ +import {memo} from 'react' +import {View} from 'react-native' + +import {atoms as a} from '#/alf' +import {type ContentProps, type ScreenProps} from '#/components/Layout' + +export * as Header from '#/components/Layout/Header' + +export const Screen = memo(function Screen({style, ...props}: ScreenProps) { + return +}) + +export const Content = memo(function Content({ + style, + contentContainerStyle, + children, +}: React.PropsWithChildren) { + return ( + {children} + ) +}) diff --git a/src/view/shell/createNativeStackNavigatorWithAuth.tsx b/src/view/shell/createNativeStackNavigatorWithAuth.tsx index 284dfea90e..79fdd5df5f 100644 --- a/src/view/shell/createNativeStackNavigatorWithAuth.tsx +++ b/src/view/shell/createNativeStackNavigatorWithAuth.tsx @@ -34,7 +34,7 @@ import { useLoggedOutView, useLoggedOutViewControls, } from '#/state/shell/logged-out' -import {LoggedOut} from '#/view/com/auth/LoggedOut' +import {AuthenticationFlow} from '#/screens/Authentication/components/Flow' import {Deactivated} from '#/screens/Deactivated' import {Onboarding} from '#/screens/Onboarding' import {SignupQueued} from '#/screens/SignupQueued' @@ -114,7 +114,7 @@ function NativeStackNavigator({ const {leftNavMinimal} = useLayoutBreakpoints() // Temp: use old system for web. TODO: unify if (isWeb && !hasSession && (!PWI_ENABLED || activeRouteRequiresAuth)) { - return + return } if (hasSession && currentAccount?.signupQueued) { return @@ -123,7 +123,7 @@ function NativeStackNavigator({ return } if (isWeb && showLoggedOut) { - return setShowLoggedOut(false)} /> + return setShowLoggedOut(false)} /> } if (currentAccount?.status === 'deactivated') { return