Cluster guest v2 capture controls
This commit is contained in:
@@ -500,61 +500,70 @@ export default function UploadScreen() {
|
||||
/>
|
||||
)}
|
||||
{cameraState === 'ready' && !previewUrl ? (
|
||||
<XStack
|
||||
<YStack
|
||||
position="absolute"
|
||||
bottom="$4"
|
||||
left="$4"
|
||||
right="$4"
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<Button
|
||||
size="$3"
|
||||
circular
|
||||
backgroundColor={flashPreferred ? '$primary' : mutedButton}
|
||||
borderWidth={1}
|
||||
borderColor={flashPreferred ? 'rgba(255,255,255,0.25)' : mutedButtonBorder}
|
||||
onPress={handleToggleFlash}
|
||||
disabled={facingMode !== 'environment'}
|
||||
style={{ boxShadow: accessoryShadow }}
|
||||
aria-label={t('upload.controls.toggleFlash', 'Toggle flash')}
|
||||
>
|
||||
{flashPreferred ? (
|
||||
<Zap size={18} color="#FFFFFF" />
|
||||
) : (
|
||||
<ZapOff size={18} color={iconColor} />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
size="$5"
|
||||
circular
|
||||
backgroundColor="$primary"
|
||||
onPress={handleCapture}
|
||||
width={90}
|
||||
height={90}
|
||||
<XStack
|
||||
gap="$2"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
padding="$2"
|
||||
borderRadius={999}
|
||||
shadowColor={isDark ? 'rgba(255, 79, 216, 0.5)' : 'rgba(15, 23, 42, 0.2)'}
|
||||
shadowOpacity={0.5}
|
||||
shadowRadius={22}
|
||||
shadowOffset={{ width: 0, height: 10 }}
|
||||
style={{ boxShadow: fabShadow }}
|
||||
aria-label={t('upload.captureButton', 'Capture')}
|
||||
>
|
||||
<Camera size={34} color="#FFFFFF" />
|
||||
</Button>
|
||||
<Button
|
||||
size="$3"
|
||||
circular
|
||||
backgroundColor={mutedButton}
|
||||
borderWidth={1}
|
||||
borderColor={mutedButtonBorder}
|
||||
onPress={handleSwitchCamera}
|
||||
borderColor={isDark ? 'rgba(255,255,255,0.16)' : 'rgba(15,23,42,0.14)'}
|
||||
backgroundColor={isDark ? 'rgba(12, 16, 32, 0.6)' : 'rgba(255, 255, 255, 0.8)'}
|
||||
style={{ boxShadow: accessoryShadow }}
|
||||
aria-label={t('upload.controls.switchCamera', 'Switch camera')}
|
||||
>
|
||||
<RefreshCcw size={18} color={iconColor} />
|
||||
</Button>
|
||||
</XStack>
|
||||
<Button
|
||||
size="$3"
|
||||
circular
|
||||
backgroundColor={flashPreferred ? '$primary' : mutedButton}
|
||||
borderWidth={1}
|
||||
borderColor={flashPreferred ? 'rgba(255,255,255,0.25)' : mutedButtonBorder}
|
||||
onPress={handleToggleFlash}
|
||||
disabled={facingMode !== 'environment'}
|
||||
aria-label={t('upload.controls.toggleFlash', 'Toggle flash')}
|
||||
>
|
||||
{flashPreferred ? (
|
||||
<Zap size={20} color="#FFFFFF" />
|
||||
) : (
|
||||
<ZapOff size={20} color={iconColor} />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
size="$5"
|
||||
circular
|
||||
backgroundColor="$primary"
|
||||
onPress={handleCapture}
|
||||
width={98}
|
||||
height={98}
|
||||
borderRadius={999}
|
||||
shadowColor={isDark ? 'rgba(255, 79, 216, 0.5)' : 'rgba(15, 23, 42, 0.2)'}
|
||||
shadowOpacity={0.5}
|
||||
shadowRadius={24}
|
||||
shadowOffset={{ width: 0, height: 12 }}
|
||||
style={{ boxShadow: fabShadow }}
|
||||
aria-label={t('upload.captureButton', 'Capture')}
|
||||
>
|
||||
<Camera size={40} color="#FFFFFF" />
|
||||
</Button>
|
||||
<Button
|
||||
size="$3"
|
||||
circular
|
||||
backgroundColor={mutedButton}
|
||||
borderWidth={1}
|
||||
borderColor={mutedButtonBorder}
|
||||
onPress={handleSwitchCamera}
|
||||
aria-label={t('upload.controls.switchCamera', 'Switch camera')}
|
||||
>
|
||||
<RefreshCcw size={20} color={iconColor} />
|
||||
</Button>
|
||||
</XStack>
|
||||
</YStack>
|
||||
) : null}
|
||||
{(cameraState === 'ready' || cameraState === 'starting' || cameraState === 'preview') ? (
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user