Overlay guest v2 preview actions
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { YStack, XStack } from '@tamagui/stacks';
|
import { YStack, XStack } from '@tamagui/stacks';
|
||||||
import { SizableText as Text } from '@tamagui/text';
|
import { SizableText as Text } from '@tamagui/text';
|
||||||
import { Button } from '@tamagui/button';
|
import { Button } from '@tamagui/button';
|
||||||
import { Camera, FlipHorizontal, Image, ListVideo, RefreshCcw, Sparkles, UploadCloud, X, Zap, ZapOff } from 'lucide-react';
|
import { ArrowRight, Camera, FlipHorizontal, Image, ListVideo, RefreshCcw, Sparkles, UploadCloud, X, Zap, ZapOff } from 'lucide-react';
|
||||||
import AppShell from '../components/AppShell';
|
import AppShell from '../components/AppShell';
|
||||||
import { useEventData } from '../context/EventDataContext';
|
import { useEventData } from '../context/EventDataContext';
|
||||||
import { useOptionalGuestIdentity } from '../context/GuestIdentityContext';
|
import { useOptionalGuestIdentity } from '../context/GuestIdentityContext';
|
||||||
@@ -617,6 +617,53 @@ export default function UploadScreen() {
|
|||||||
<X size={16} color={iconColor} />
|
<X size={16} color={iconColor} />
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
|
{cameraState === 'preview' ? (
|
||||||
|
<XStack
|
||||||
|
position="absolute"
|
||||||
|
bottom="$4"
|
||||||
|
left="$4"
|
||||||
|
right="$4"
|
||||||
|
gap="$3"
|
||||||
|
zIndex={5}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
flex={1}
|
||||||
|
height={76}
|
||||||
|
borderRadius={24}
|
||||||
|
backgroundColor="#F43F5E"
|
||||||
|
onPress={handleRetake}
|
||||||
|
alignItems="center"
|
||||||
|
justifyContent="center"
|
||||||
|
gap="$2"
|
||||||
|
style={{
|
||||||
|
boxShadow: '0 10px 0 rgba(159, 18, 57, 0.9), 0 26px 40px rgba(127, 29, 29, 0.35)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<X size={22} color="#FFFFFF" />
|
||||||
|
<Text fontSize="$3" fontWeight="$7" color="#FFFFFF">
|
||||||
|
{t('upload.review.retake', 'Nochmal aufnehmen')}
|
||||||
|
</Text>
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
flex={1}
|
||||||
|
height={76}
|
||||||
|
borderRadius={24}
|
||||||
|
backgroundColor="#22C55E"
|
||||||
|
onPress={handleUseImage}
|
||||||
|
alignItems="center"
|
||||||
|
justifyContent="center"
|
||||||
|
gap="$2"
|
||||||
|
style={{
|
||||||
|
boxShadow: '0 10px 0 rgba(21, 128, 61, 0.9), 0 26px 40px rgba(22, 101, 52, 0.35)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ArrowRight size={22} color="#FFFFFF" />
|
||||||
|
<Text fontSize="$3" fontWeight="$7" color="#FFFFFF">
|
||||||
|
{t('upload.review.keep', 'Foto verwenden')}
|
||||||
|
</Text>
|
||||||
|
</Button>
|
||||||
|
</XStack>
|
||||||
|
) : null}
|
||||||
{cameraState !== 'ready' && cameraState !== 'preview' ? (
|
{cameraState !== 'ready' && cameraState !== 'preview' ? (
|
||||||
<YStack alignItems="center" gap="$2" padding="$4">
|
<YStack alignItems="center" gap="$2" padding="$4">
|
||||||
<Camera size={32} color={isDark ? '#F8FAFF' : '#0F172A'} />
|
<Camera size={32} color={isDark ? '#F8FAFF' : '#0F172A'} />
|
||||||
@@ -659,36 +706,7 @@ export default function UploadScreen() {
|
|||||||
borderColor={cardBorder}
|
borderColor={cardBorder}
|
||||||
backgroundColor={isDark ? 'rgba(10, 14, 28, 0.7)' : 'rgba(255, 255, 255, 0.75)'}
|
backgroundColor={isDark ? 'rgba(10, 14, 28, 0.7)' : 'rgba(255, 255, 255, 0.75)'}
|
||||||
>
|
>
|
||||||
{cameraState === 'preview' ? (
|
{cameraState === 'preview' ? null : (
|
||||||
<XStack gap="$2" flex={1} justifyContent="space-between">
|
|
||||||
<Button
|
|
||||||
size="$3"
|
|
||||||
borderRadius="$pill"
|
|
||||||
backgroundColor={mutedButton}
|
|
||||||
borderWidth={1}
|
|
||||||
borderColor={mutedButtonBorder}
|
|
||||||
onPress={handleRetake}
|
|
||||||
flex={1}
|
|
||||||
justifyContent="center"
|
|
||||||
>
|
|
||||||
<Text fontSize="$2" fontWeight="$6">
|
|
||||||
{t('upload.review.retake', 'Retake')}
|
|
||||||
</Text>
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
size="$3"
|
|
||||||
borderRadius="$pill"
|
|
||||||
backgroundColor="$primary"
|
|
||||||
onPress={handleUseImage}
|
|
||||||
flex={1}
|
|
||||||
justifyContent="center"
|
|
||||||
>
|
|
||||||
<Text fontSize="$2" fontWeight="$6" color="#FFFFFF">
|
|
||||||
{t('upload.review.keep', 'Use image')}
|
|
||||||
</Text>
|
|
||||||
</Button>
|
|
||||||
</XStack>
|
|
||||||
) : (
|
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
size="$3"
|
size="$3"
|
||||||
|
|||||||
Reference in New Issue
Block a user