feat: add camera capture for trip and item images
All checks were successful
Luggage List Build / build-web (push) Successful in 31s
Luggage List Build / build-android (push) Successful in 6m24s
Luggage List Build / release (push) Successful in 14s

This commit is contained in:
2026-04-18 14:19:48 +02:00
parent bd500674a0
commit 2e45261354
5 changed files with 52 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ export default function TripsTab({
tripForm,
updateTripForm,
pickTripImage,
takeTripImage,
templateTrip,
createTrip,
trips,
@@ -58,9 +59,14 @@ export default function TripsTab({
<DateField label="Start Date" value={tripForm.startDate} onPress={() => openDatePicker('startDate')} />
<DateField label="End Date" value={tripForm.endDate} onPress={() => openDatePicker('endDate')} />
<Pressable style={styles.secondaryBtn} onPress={pickTripImage}>
<Text style={styles.secondaryBtnText}>{tripForm.imageUri ? 'Change trip image' : 'Add trip image'}</Text>
</Pressable>
<View style={styles.actionRow}>
<Pressable style={[styles.secondaryBtnTight, styles.flex]} onPress={takeTripImage}>
<Text style={styles.secondaryBtnText}>Take photo</Text>
</Pressable>
<Pressable style={[styles.secondaryBtnTight, styles.flex]} onPress={pickTripImage}>
<Text style={styles.secondaryBtnText}>{tripForm.imageUri ? 'From gallery (change)' : 'From gallery'}</Text>
</Pressable>
</View>
{tripForm.imageUri ? <Image source={{ uri: tripForm.imageUri }} style={styles.previewImage} /> : null}