diff --git a/src/components/Lightbox/Lightbox.tsx b/src/components/Lightbox/Lightbox.tsx index c283cc89cb..d5f864fe30 100644 --- a/src/components/Lightbox/Lightbox.tsx +++ b/src/components/Lightbox/Lightbox.tsx @@ -19,8 +19,8 @@ export function Lightbox() { shareImageModal({uri})} + onPressSave={uri => void saveImageToAlbum(uri)} + onPressShare={uri => void shareImageModal({uri})} /> ) } diff --git a/src/components/Lightbox/chrome/CircleChromeButton.tsx b/src/components/Lightbox/chrome/CircleChromeButton.tsx index afc30c5859..55c229d62b 100644 --- a/src/components/Lightbox/chrome/CircleChromeButton.tsx +++ b/src/components/Lightbox/chrome/CircleChromeButton.tsx @@ -27,9 +27,9 @@ type Props = { | 'accessibilityHint' > -const SIZE = 44 +const SIZE = 32 const RADIUS = 24 -const ICON = 24 +const ICON = 18 export function CircleChromeButton({ icon: Icon, diff --git a/src/components/Lightbox/chrome/Footer.tsx b/src/components/Lightbox/chrome/Footer.tsx index 14b5e1bd2c..8e477d7e46 100644 --- a/src/components/Lightbox/chrome/Footer.tsx +++ b/src/components/Lightbox/chrome/Footer.tsx @@ -7,10 +7,9 @@ import { View, } from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' +import {useLingui} from '@lingui/react/macro' -import {atoms as a} from '#/alf' +import {atoms as a, useTheme} from '#/alf' import {Text} from '#/components/Typography' type Props = { @@ -20,7 +19,8 @@ type Props = { } export function Footer({altText, isAltExpanded, onToggleAltExpanded}: Props) { - const {_} = useLingui() + const {t: l} = useLingui() + const t = useTheme() const insets = useSafeAreaInsets() const isMomentumScrolling = useRef(false) @@ -28,8 +28,14 @@ export function Footer({altText, isAltExpanded, onToggleAltExpanded}: Props) { return ( + style={[ + a.absolute, + a.left_0, + a.right_0, + a.bottom_0, + a.pointer_events_box_none, + {paddingBottom: insets.bottom + 8}, + ]}> { if (isMomentumScrolling.current) return @@ -55,7 +61,7 @@ export function Footer({altText, isAltExpanded, onToggleAltExpanded}: Props) { {altText} @@ -67,18 +73,9 @@ export function Footer({altText, isAltExpanded, onToggleAltExpanded}: Props) { } const styles = StyleSheet.create({ - root: { - position: 'absolute', - bottom: 0, - left: 0, - right: 0, - }, altWrap: { backgroundColor: 'rgba(0, 0, 0, 0.45)', borderRadius: 12, overflow: 'hidden', }, - altText: { - color: '#fff', - }, }) diff --git a/src/components/Lightbox/chrome/Header.tsx b/src/components/Lightbox/chrome/Header.tsx index 3504526ae3..31e09e236d 100644 --- a/src/components/Lightbox/chrome/Header.tsx +++ b/src/components/Lightbox/chrome/Header.tsx @@ -1,4 +1,4 @@ -import {StyleSheet, View} from 'react-native' +import {View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' @@ -30,14 +30,17 @@ export function Header({ return ( + ]}> ) } - -const styles = StyleSheet.create({ - root: { - position: 'absolute', - top: 0, - left: 0, - right: 0, - }, -}) diff --git a/src/components/Lightbox/chrome/ImageMenu.tsx b/src/components/Lightbox/chrome/ImageMenu.tsx index c677e6d491..3ad86facb2 100644 --- a/src/components/Lightbox/chrome/ImageMenu.tsx +++ b/src/components/Lightbox/chrome/ImageMenu.tsx @@ -8,8 +8,7 @@ import Animated, { withSpring, withTiming, } from 'react-native-reanimated' -import {msg} from '@lingui/core/macro' -import {useLingui} from '@lingui/react' +import {useLingui} from '@lingui/react/macro' import {atoms as a} from '#/alf' import {ArrowShareRight_Stroke2_Corner2_Rounded as ShareIcon} from '#/components/icons/ArrowShareRight' @@ -36,7 +35,7 @@ const SPRING_IN = {damping: 18, mass: 0.6, stiffness: 240} const TIMING_OUT = {duration: 150} export function ImageMenu({onPressShare, onPressSave}: Props) { - const {_} = useLingui() + const {t: l} = useLingui() const triggerRef = useRef(null) const [isMounted, setIsMounted] = useState(false) const [anchor, setAnchor] = useState(null) @@ -71,7 +70,7 @@ export function ImageMenu({onPressShare, onPressSave}: Props) { @@ -83,21 +82,21 @@ export function ImageMenu({onPressShare, onPressSave}: Props) { statusBarTranslucent> {anchor && ( runAction(onPressShare)} /> runAction(onPressSave)} />