diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx index 3442d1bdf9..77973ed3d7 100644 --- a/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx @@ -1,18 +1,23 @@ -import {View} from 'react-native' +import {useMemo} from 'react' +import {Image as RNImage, View} from 'react-native' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' -import {useSafeAreaInsets} from 'react-native-safe-area-context' +import {Image} from 'expo-image' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useHaptics} from '#/lib/haptics' -import {ErrorBoundary} from '#/view/com/util/ErrorBoundary' -import {CenteredView} from '#/view/com/util/Views' import {Logo} from '#/view/icons/Logo' import {Logotype} from '#/view/icons/Logotype' import {atoms as a, useTheme} from '#/alf' -import {AppLanguageDropdown} from '#/components/AppLanguageDropdown' import {Button, ButtonText} from '#/components/Button' -import {Text} from '#/components/Typography' +// @ts-ignore +import splashImagePointer from '../../../../assets/splash/splash-mobile.png' +// @ts-ignore +import darkSplashImagePointer from '../../../../assets/splash/splash-mobile-dark.png' +const splashImageUri = RNImage.resolveAssetSource(splashImagePointer).uri +const darkSplashImageUri = RNImage.resolveAssetSource( + darkSplashImagePointer, +).uri export const SplashScreen = ({ onPressSignin, @@ -23,38 +28,68 @@ export const SplashScreen = ({ }) => { const t = useTheme() const {_} = useLingui() + const isDarkMode = t.name !== 'light' const playHaptic = useHaptics() - const insets = useSafeAreaInsets() + + const styles = useMemo(() => { + const logoFill = isDarkMode ? 'white' : t.palette.primary_500 + return { + logoFill, + logoShadow: isDarkMode + ? [ + t.atoms.shadow_md, + { + shadowColor: logoFill, + shadowOpacity: 0.5, + shadowOffset: { + width: 0, + height: 0, + }, + }, + ] + : [], + } + }, [t, isDarkMode]) return ( - + <> + + - - - + + + + - - - - - - What's up? - - + + + style={[ + t.atoms.shadow_md, + { + shadowOpacity: 0.1, + shadowOffset: { + width: 0, + height: 5, + }, + }, + ]}> - - - - - - - - + + + - + ) }