@umituz/react-native-ai-generation-content 1.12.17 → 1.12.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/domains/creations/application/services/CreationsService.ts +1 -0
- package/src/domains/creations/presentation/components/CreationCard.tsx +1 -1
- package/src/domains/creations/presentation/components/CreationImageViewer.tsx +2 -2
- package/src/domains/creations/presentation/screens/CreationsGalleryScreen.tsx +21 -31
package/package.json
CHANGED
|
@@ -154,7 +154,7 @@ export function CreationCard({
|
|
|
154
154
|
<Image source={{ uri: creation.uri }} style={styles.thumbnail} />
|
|
155
155
|
{isSelectionMode && (
|
|
156
156
|
<View style={styles.selectionOverlay}>
|
|
157
|
-
{isSelected && <AtomicIcon name="checkmark-circle" size="xs" color="
|
|
157
|
+
{isSelected && <AtomicIcon name="checkmark-circle" size="xs" color="onPrimary" />}
|
|
158
158
|
</View>
|
|
159
159
|
)}
|
|
160
160
|
</View>
|
|
@@ -48,7 +48,7 @@ export const CreationImageViewer: React.FC<CreationImageViewerProps> = ({
|
|
|
48
48
|
activeOpacity={0.7}
|
|
49
49
|
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
|
|
50
50
|
>
|
|
51
|
-
<AtomicIcon name="close" size="lg" color="
|
|
51
|
+
<AtomicIcon name="close" size="lg" color="onPrimary" />
|
|
52
52
|
</TouchableOpacity>
|
|
53
53
|
</View>
|
|
54
54
|
);
|
|
@@ -68,7 +68,7 @@ export const CreationImageViewer: React.FC<CreationImageViewerProps> = ({
|
|
|
68
68
|
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
69
69
|
paddingHorizontal: tokens.spacing.md,
|
|
70
70
|
paddingVertical: tokens.spacing.xs,
|
|
71
|
-
borderRadius:
|
|
71
|
+
borderRadius: 999,
|
|
72
72
|
justifyContent: 'center',
|
|
73
73
|
},
|
|
74
74
|
counterText: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo, useCallback, useState } from "react";
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, TouchableOpacity } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
useAppDesignTokens,
|
|
5
5
|
useSharing,
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
ScreenHeader,
|
|
8
8
|
useAlert,
|
|
9
9
|
AlertMode,
|
|
10
|
+
AtomicIcon,
|
|
10
11
|
type BottomSheetModalRef
|
|
11
12
|
} from "@umituz/react-native-design-system";
|
|
12
|
-
import { useFocusEffect } from "@react-navigation/native";
|
|
13
13
|
import { useCreations } from "../hooks/useCreations";
|
|
14
14
|
import { useDeleteCreation } from "../hooks/useDeleteCreation";
|
|
15
15
|
import { useCreationsFilter } from "../hooks/useCreationsFilter";
|
|
@@ -92,15 +92,6 @@ export function CreationsGalleryScreen({
|
|
|
92
92
|
const [selectedItemIds, setSelectedItemIds] = useState<string[]>([]);
|
|
93
93
|
const [isSelectionMode, setIsSelectionMode] = useState(false);
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
// Refetch creations when screen comes into focus
|
|
98
|
-
useFocusEffect(
|
|
99
|
-
useCallback(() => {
|
|
100
|
-
refetch();
|
|
101
|
-
}, [refetch])
|
|
102
|
-
);
|
|
103
|
-
|
|
104
95
|
// Prepare data for UI using utils
|
|
105
96
|
const translatedTypes = useMemo(() => getTranslatedTypes(config, t), [config, t]);
|
|
106
97
|
const allCategories = useMemo(() => getFilterCategoriesFromConfig(config, t), [config, t]);
|
|
@@ -186,10 +177,11 @@ export function CreationsGalleryScreen({
|
|
|
186
177
|
<ScreenHeader
|
|
187
178
|
title={isSelectionMode ? `${selectedItemIds.length} Selected` : screenTitle}
|
|
188
179
|
onBackPress={isSelectionMode ? () => { setIsSelectionMode(false); setSelectedItemIds([]); } : onBackPress}
|
|
189
|
-
rightAction={isSelectionMode ?
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
180
|
+
rightAction={isSelectionMode ? (
|
|
181
|
+
<TouchableOpacity onPress={handleDeleteSelected}>
|
|
182
|
+
<AtomicIcon name="trash" color="error" size="md" />
|
|
183
|
+
</TouchableOpacity>
|
|
184
|
+
) : undefined}
|
|
193
185
|
/>
|
|
194
186
|
)}
|
|
195
187
|
{!isSelectionMode && enableSearch && (
|
|
@@ -205,22 +197,20 @@ export function CreationsGalleryScreen({
|
|
|
205
197
|
}
|
|
206
198
|
contentContainerStyle={{ paddingHorizontal: 0 }}
|
|
207
199
|
>
|
|
208
|
-
{
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
/>
|
|
223
|
-
) : null
|
|
200
|
+
{creations && creations.length > 0 && showGalleryHeader && (
|
|
201
|
+
<GalleryHeader
|
|
202
|
+
title={showScreenHeader || isSelectionMode ? '' : screenTitle}
|
|
203
|
+
count={filtered.length}
|
|
204
|
+
countLabel=''
|
|
205
|
+
subtitle={showCount ? t(config.translations.photoCount, { count: filtered.length }) : undefined}
|
|
206
|
+
isFiltered={isFiltered}
|
|
207
|
+
filterLabel={t(config.translations.filterLabel) || 'Filter'}
|
|
208
|
+
onFilterPress={() => filterSheetRef.current?.present()}
|
|
209
|
+
onFavoritesPress={() => setShowOnlyFavorites(!showOnlyFavorites)}
|
|
210
|
+
showOnlyFavorites={showOnlyFavorites}
|
|
211
|
+
isFilterEnabled={enableFilter}
|
|
212
|
+
showCount={showCount}
|
|
213
|
+
/>
|
|
224
214
|
)}
|
|
225
215
|
|
|
226
216
|
{/* Main Content Grid - handles empty/loading via ListEmptyComponent */}
|