fix: camera unmount, sticker trash, update reset
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
faRightFromBracket,
|
||||
faFaceGrinStars,
|
||||
faBorderAll,
|
||||
faTrash,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import { THEME } from '../styles/theme';
|
||||
import { printImageLocal } from '../services/printer';
|
||||
@@ -432,7 +433,7 @@ export default function PreviewScreen({
|
||||
))}
|
||||
</View>
|
||||
<View style={styles.collageFooter}>
|
||||
<Text style={styles.collageFooterText}>SCHNAPPIX FOTOBOX</Text>
|
||||
<Text style={styles.collageFooterText}>{eventText}</Text>
|
||||
<Text style={styles.collageFooterDate}>{new Date().toLocaleDateString('de-DE')}</Text>
|
||||
</View>
|
||||
</View>
|
||||
@@ -454,7 +455,7 @@ export default function PreviewScreen({
|
||||
))}
|
||||
</View>
|
||||
<View style={styles.collageFooter}>
|
||||
<Text style={styles.collageFooterText}>SCHNAPPIX FOTOBOX</Text>
|
||||
<Text style={styles.collageFooterText}>{eventText}</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
@@ -475,7 +476,7 @@ export default function PreviewScreen({
|
||||
))}
|
||||
</View>
|
||||
<View style={styles.collageFooter}>
|
||||
<Text style={styles.collageFooterText}>SCHNAPPIX FOTOBOX</Text>
|
||||
<Text style={styles.collageFooterText}>{eventText}</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
@@ -554,9 +555,20 @@ export default function PreviewScreen({
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
|
||||
{/* Global Trash Can for Stickers */}
|
||||
{selectedStickerId !== null && (
|
||||
<TouchableOpacity
|
||||
style={styles.globalTrashButton}
|
||||
onPress={() => handleStickerDelete(selectedStickerId)}
|
||||
activeOpacity={0.7}
|
||||
>
|
||||
<FontAwesomeIcon icon={faTrash} color="#fff" size={32} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
|
||||
{/* Right panel: Controls */}
|
||||
<View style={styles.controlPanel}>
|
||||
<Text style={styles.header}>DEIN FOTO</Text>
|
||||
<Text style={styles.header}>{eventText}</Text>
|
||||
|
||||
{/* Thumbnail Reel for Photo Selection */}
|
||||
{photoUris.length > 1 && (
|
||||
@@ -568,6 +580,7 @@ export default function PreviewScreen({
|
||||
<ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.thumbnailReelContent}>
|
||||
{photoUris.map((uri, idx) => {
|
||||
const isActive = activeUris.includes(uri);
|
||||
const indexInSelection = activeUris.indexOf(uri) + 1;
|
||||
return (
|
||||
<TouchableOpacity
|
||||
key={idx}
|
||||
@@ -578,7 +591,7 @@ export default function PreviewScreen({
|
||||
<Image source={{ uri }} style={styles.thumbnailImage} />
|
||||
{isActive && (
|
||||
<View style={styles.thumbnailCheck}>
|
||||
<Text style={{ color: '#fff', fontSize: 10, fontWeight: 'bold' }}>✓</Text>
|
||||
<Text style={{ color: '#fff', fontSize: 14, fontWeight: 'bold' }}>{indexInSelection}</Text>
|
||||
</View>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
@@ -739,6 +752,23 @@ const styles = StyleSheet.create({
|
||||
textShadowOffset: { width: 0, height: 0 },
|
||||
textShadowRadius: 12,
|
||||
},
|
||||
globalTrashButton: {
|
||||
position: 'absolute',
|
||||
top: 40,
|
||||
alignSelf: 'center',
|
||||
width: 60,
|
||||
height: 60,
|
||||
borderRadius: 30,
|
||||
backgroundColor: THEME.colors.error,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
zIndex: 9999,
|
||||
shadowColor: '#000',
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
shadowOpacity: 0.5,
|
||||
shadowRadius: 6,
|
||||
elevation: 8,
|
||||
},
|
||||
thumbnailInstruction: {
|
||||
color: THEME.colors.textMuted,
|
||||
fontSize: 12,
|
||||
|
||||
Reference in New Issue
Block a user