feat(#8): make item thumbnails smaller and left-aligned
All checks were successful
Luggage List Build / build-web (push) Successful in 29s
Luggage List Build / build-android (push) Successful in 6m12s
Luggage List Build / release (push) Successful in 12s

This commit is contained in:
2026-04-18 18:25:54 +02:00
parent e8ffab355e
commit fbdae66c9b
2 changed files with 37 additions and 3 deletions

View File

@@ -14,6 +14,17 @@ export default function ItemCard({ item, onEdit, onDelete, onQuickPack, onQuickU
return (
<View style={styles.itemCard}>
<View style={[styles.itemAccent, { backgroundColor: statusAccent(item.status) }]} />
<View style={styles.itemThumbWrap}>
{item.imageUri ? (
<Image source={{ uri: item.imageUri }} style={styles.itemThumbSmall} />
) : (
<View style={styles.itemThumbPlaceholder}>
<Text style={styles.itemThumbPlaceholderText}>🧳</Text>
</View>
)}
</View>
<View style={styles.itemMain}>
<View style={styles.cardRow}>
<View style={styles.flex}>
@@ -41,8 +52,6 @@ export default function ItemCard({ item, onEdit, onDelete, onQuickPack, onQuickU
<Text style={[styles.quickStatusBtnText, isUnpacked && styles.quickStatusBtnTextActive]}>Unpack</Text>
</Pressable>
</View>
{item.imageUri ? <Image source={{ uri: item.imageUri }} style={styles.previewImageSmall} /> : null}
</View>
</View>
);

View File

@@ -282,13 +282,38 @@ export const styles = StyleSheet.create({
borderColor: '#1f2937',
overflow: 'hidden',
flexDirection: 'row',
alignItems: 'flex-start',
},
itemAccent: {
width: 5,
alignSelf: 'stretch',
},
itemThumbWrap: {
paddingTop: 10,
paddingLeft: 10,
},
itemThumbSmall: {
width: 46,
height: 46,
borderRadius: 8,
backgroundColor: '#0b1220',
},
itemThumbPlaceholder: {
width: 46,
height: 46,
borderRadius: 8,
backgroundColor: '#0b1220',
alignItems: 'center',
justifyContent: 'center',
borderWidth: 1,
borderColor: '#243244',
},
itemThumbPlaceholderText: {
fontSize: 18,
},
itemMain: {
flex: 1,
padding: 12,
padding: 10,
gap: 8,
},
itemTitle: {