diff options
Diffstat (limited to 'src/view/shell')
-rw-r--r-- | src/view/shell/Composer.tsx | 2 | ||||
-rw-r--r-- | src/view/shell/Drawer.tsx | 69 | ||||
-rw-r--r-- | src/view/shell/bottom-bar/BottomBar.tsx | 2 | ||||
-rw-r--r-- | src/view/shell/bottom-bar/BottomBarWeb.tsx | 2 | ||||
-rw-r--r-- | src/view/shell/desktop/Feeds.tsx | 1 | ||||
-rw-r--r-- | src/view/shell/desktop/RightNav.tsx | 1 | ||||
-rw-r--r-- | src/view/shell/index.tsx | 8 |
7 files changed, 45 insertions, 40 deletions
diff --git a/src/view/shell/Composer.tsx b/src/view/shell/Composer.tsx index 4c357acc4..21ab9ec21 100644 --- a/src/view/shell/Composer.tsx +++ b/src/view/shell/Composer.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react' +import {useEffect} from 'react' import {Animated, Easing, StyleSheet, View} from 'react-native' import {useAnimatedValue} from '#/lib/hooks/useAnimatedValue' diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index 257506dd0..3dc2b076c 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -122,9 +122,8 @@ let DrawerProfileCard = ({ DrawerProfileCard = React.memo(DrawerProfileCard) export {DrawerProfileCard} -let DrawerContent = ({}: {}): React.ReactNode => { +let DrawerContent = ({}: React.PropsWithoutRef<{}>): React.ReactNode => { const t = useTheme() - const {_} = useLingui() const insets = useSafeAreaInsets() const setDrawerOpen = useSetDrawerOpen() const navigation = useNavigation<NavigationProp>() @@ -137,7 +136,6 @@ let DrawerContent = ({}: {}): React.ReactNode => { isAtMessages, } = useNavigationTabState() const {hasSession, currentAccount} = useSession() - const kawaii = useKawaiiMode() // events // = @@ -277,34 +275,7 @@ let DrawerContent = ({}: {}): React.ReactNode => { <View style={[a.px_xl]}> <Divider style={[a.mb_xl, a.mt_sm]} /> - - <View style={[a.flex_col, a.gap_md, a.flex_wrap]}> - <InlineLinkText - style={[a.text_md]} - label={_(msg`Terms of Service`)} - to="https://bsky.social/about/support/tos"> - <Trans>Terms of Service</Trans> - </InlineLinkText> - <InlineLinkText - style={[a.text_md]} - to="https://bsky.social/about/support/privacy-policy" - label={_(msg`Privacy Policy`)}> - <Trans>Privacy Policy</Trans> - </InlineLinkText> - {kawaii && ( - <Text style={t.atoms.text_contrast_medium}> - <Trans> - Logo by{' '} - <InlineLinkText - style={[a.text_md]} - to="/profile/sawaratsuki.bsky.social" - label="@sawaratsuki.bsky.social"> - @sawaratsuki.bsky.social - </InlineLinkText> - </Trans> - </Text> - )} - </View> + <ExtraLinks /> </View> </ScrollView> @@ -633,3 +604,39 @@ function MenuItem({icon, label, count, bold, onPress}: MenuItemProps) { </Button> ) } + +function ExtraLinks() { + const {_} = useLingui() + const t = useTheme() + const kawaii = useKawaiiMode() + + return ( + <View style={[a.flex_col, a.gap_md, a.flex_wrap]}> + <InlineLinkText + style={[a.text_md]} + label={_(msg`Terms of Service`)} + to="https://bsky.social/about/support/tos"> + <Trans>Terms of Service</Trans> + </InlineLinkText> + <InlineLinkText + style={[a.text_md]} + to="https://bsky.social/about/support/privacy-policy" + label={_(msg`Privacy Policy`)}> + <Trans>Privacy Policy</Trans> + </InlineLinkText> + {kawaii && ( + <Text style={t.atoms.text_contrast_medium}> + <Trans> + Logo by{' '} + <InlineLinkText + style={[a.text_md]} + to="/profile/sawaratsuki.bsky.social" + label="@sawaratsuki.bsky.social"> + @sawaratsuki.bsky.social + </InlineLinkText> + </Trans> + </Text> + )} + </View> + ) +} diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index 855ba21b2..1d1023c2b 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -134,7 +134,7 @@ export function BottomBar({navigation}: BottomTabBarProps) { footerMinimalShellTransform, ]} onLayout={e => { - footerHeight.value = e.nativeEvent.layout.height + footerHeight.set(e.nativeEvent.layout.height) }}> {hasSession ? ( <> diff --git a/src/view/shell/bottom-bar/BottomBarWeb.tsx b/src/view/shell/bottom-bar/BottomBarWeb.tsx index 9b34159d7..81855c97d 100644 --- a/src/view/shell/bottom-bar/BottomBarWeb.tsx +++ b/src/view/shell/bottom-bar/BottomBarWeb.tsx @@ -177,7 +177,7 @@ export function BottomBarWeb() { alignItems: 'center', justifyContent: 'space-between', paddingTop: 14, - paddingBottom: 2, + paddingBottom: 14, paddingLeft: 14, paddingRight: 6, gap: 8, diff --git a/src/view/shell/desktop/Feeds.tsx b/src/view/shell/desktop/Feeds.tsx index bb6b8cadd..383d8f953 100644 --- a/src/view/shell/desktop/Feeds.tsx +++ b/src/view/shell/desktop/Feeds.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index 5f75c220c..4f413211f 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index 6dc4f95a5..1ab045d75 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -1,7 +1,6 @@ import React from 'react' import {BackHandler, StyleSheet, useWindowDimensions, View} from 'react-native' import {Drawer} from 'react-native-drawer-layout' -import Animated from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import * as NavigationBar from 'expo-navigation-bar' import {StatusBar} from 'expo-status-bar' @@ -95,7 +94,7 @@ function ShellInner() { return ( <> - <Animated.View style={[a.h_full]}> + <View style={[a.h_full]}> <ErrorBoundary style={{paddingTop: insets.top, paddingBottom: insets.bottom}}> <Drawer @@ -105,6 +104,7 @@ function ShellInner() { onOpen={onOpenDrawer} onClose={onCloseDrawer} swipeEdgeWidth={winDim.width / 2} + drawerType={isIOS ? 'slide' : 'front'} swipeEnabled={!canGoBack && hasSession && !isDrawerSwipeDisabled} overlayStyle={{ backgroundColor: select(t.name, { @@ -118,7 +118,7 @@ function ShellInner() { <TabsNavigator /> </Drawer> </ErrorBoundary> - </Animated.View> + </View> <Composer winHeight={winDim.height} /> <ModalsContainer /> <MutedWordsDialog /> @@ -132,8 +132,8 @@ function ShellInner() { export const Shell: React.FC = function ShellImpl() { const {fullyExpandedCount} = useDialogStateControlContext() - const pal = usePalette('default') const theme = useTheme() + const pal = usePalette('default') useIntentHandler() React.useEffect(() => { |