mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-03 18:22:57 +00:00
Merge remote master branch - resolved conflicts in cache files and frontend components
This commit is contained in:
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
{"lastUpdated":"2025-10-19T15:14:56Z"}
|
{"lastUpdated":"2025-10-19T15:29:54Z"}
|
||||||
Vendored
+12
-12
@@ -1,7 +1,17 @@
|
|||||||
{
|
{
|
||||||
"baseURL": "http://127.0.0.1:8080/api/v1",
|
"baseURL": "http://127.0.0.1:8080/api/v1",
|
||||||
"duration_ms": 35,
|
"duration_ms": 41,
|
||||||
"endpoints": [
|
"endpoints": [
|
||||||
|
{
|
||||||
|
"path": "/articles?page=1\u0026page_size=10\u0026published=true",
|
||||||
|
"file": "articles.json",
|
||||||
|
"ok": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/sponsors",
|
||||||
|
"file": "sponsors.json",
|
||||||
|
"ok": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "/events/upcoming",
|
"path": "/events/upcoming",
|
||||||
"file": "events_upcoming.json",
|
"file": "events_upcoming.json",
|
||||||
@@ -22,16 +32,6 @@
|
|||||||
"file": "settings.json",
|
"file": "settings.json",
|
||||||
"ok": true
|
"ok": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "/articles?page=1\u0026page_size=10\u0026published=true",
|
|
||||||
"file": "articles.json",
|
|
||||||
"ok": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "/sponsors",
|
|
||||||
"file": "sponsors.json",
|
|
||||||
"ok": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "/facr/club/football/7eacd9f0-bfa0-4928-a9b6-936140168f58",
|
"path": "/facr/club/football/7eacd9f0-bfa0-4928-a9b6-936140168f58",
|
||||||
"file": "facr_club_info.json",
|
"file": "facr_club_info.json",
|
||||||
@@ -43,5 +43,5 @@
|
|||||||
"ok": true
|
"ok": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"lastUpdated": "2025-10-19T15:14:56Z"
|
"lastUpdated": "2025-10-19T15:29:54Z"
|
||||||
}
|
}
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
{"etag":"","fetched_at":"2025-10-19T15:14:56Z","last_modified":""}
|
{"etag":"","fetched_at":"2025-10-19T15:29:54Z","last_modified":""}
|
||||||
@@ -119,8 +119,6 @@ const MyUIbrixStyleEditor: React.FC<MyUIbrixStyleEditorProps> = ({ pageType, onC
|
|||||||
const isAdmin = user?.role === 'admin';
|
const isAdmin = user?.role === 'admin';
|
||||||
const clubTheme = useClubTheme();
|
const clubTheme = useClubTheme();
|
||||||
|
|
||||||
// Early return if not admin - MUST be before any other hooks
|
|
||||||
if (!isAdmin) return null;
|
|
||||||
const [isEditing, setIsEditing] = useState(false);
|
const [isEditing, setIsEditing] = useState(false);
|
||||||
const [configs, setConfigs] = useState<PageElementConfig[]>([]);
|
const [configs, setConfigs] = useState<PageElementConfig[]>([]);
|
||||||
const [localChanges, setLocalChanges] = useState<Record<string, string>>({});
|
const [localChanges, setLocalChanges] = useState<Record<string, string>>({});
|
||||||
@@ -1233,6 +1231,9 @@ const MyUIbrixStyleEditor: React.FC<MyUIbrixStyleEditorProps> = ({ pageType, onC
|
|||||||
});
|
});
|
||||||
}, [isEditing, viewport, primaryColor, toast]);
|
}, [isEditing, viewport, primaryColor, toast]);
|
||||||
|
|
||||||
|
// Early return if not admin (after all hooks)
|
||||||
|
if (!isAdmin) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Edit Mode - Active */}
|
{/* Edit Mode - Active */}
|
||||||
|
|||||||
@@ -2000,6 +2000,95 @@ const ArticlesAdminPage = () => {
|
|||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
{/* Zonerama Gallery Picker Modal */}
|
||||||
|
<Modal isOpen={isGalleryPickerOpen} onClose={onGalleryPickerClose} size="6xl">
|
||||||
|
<ModalOverlay />
|
||||||
|
<ModalContent maxH="90vh">
|
||||||
|
<ModalHeader>Vybrat fotku z galerie</ModalHeader>
|
||||||
|
<ModalCloseButton />
|
||||||
|
<ModalBody overflowY="auto">
|
||||||
|
<VStack align="stretch" spacing={4}>
|
||||||
|
{/* Loading State */}
|
||||||
|
{galleryLoading && (
|
||||||
|
<HStack spacing={2} justify="center" py={8}>
|
||||||
|
<Spinner size="lg" color="purple.500" />
|
||||||
|
<Text color="gray.600">Načítám alba z galerie...</Text>
|
||||||
|
</HStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Albums Grid */}
|
||||||
|
{!galleryLoading && cachedAlbums.length > 0 && (
|
||||||
|
<VStack align="stretch" spacing={6}>
|
||||||
|
{cachedAlbums.map((album) => (
|
||||||
|
<Box key={album.id} borderWidth="1px" borderRadius="md" p={4} bg={useColorModeValue('white', 'gray.700')}>
|
||||||
|
<HStack justify="space-between" mb={3}>
|
||||||
|
<VStack align="start" spacing={0}>
|
||||||
|
<Text fontWeight="bold" fontSize="lg">{album.title || 'Album bez názvu'}</Text>
|
||||||
|
<Text fontSize="sm" color="gray.500">{album.date} • {album.photos.length} fotografií</Text>
|
||||||
|
</VStack>
|
||||||
|
</HStack>
|
||||||
|
<SimpleGrid columns={{ base: 3, md: 4, lg: 6 }} spacing={2}>
|
||||||
|
{album.photos.map((photo) => (
|
||||||
|
<Box
|
||||||
|
key={photo.id}
|
||||||
|
borderWidth="1px"
|
||||||
|
borderRadius="md"
|
||||||
|
overflow="hidden"
|
||||||
|
cursor="pointer"
|
||||||
|
transition="all 0.2s"
|
||||||
|
_hover={{ boxShadow: 'lg', transform: 'scale(1.05)' }}
|
||||||
|
onClick={() => {
|
||||||
|
pickZoneramaImage({
|
||||||
|
id: photo.id,
|
||||||
|
album_id: album.id,
|
||||||
|
album_url: `https://eu.zonerama.com/FKKofolaKrnov/Album/${album.id}`,
|
||||||
|
page_url: photo.page_url,
|
||||||
|
image_url: photo.image_1500,
|
||||||
|
title: album.title
|
||||||
|
});
|
||||||
|
onGalleryPickerClose();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<AspectRatio ratio={1}>
|
||||||
|
<Image
|
||||||
|
src={photo.image_1500}
|
||||||
|
alt={photo.id}
|
||||||
|
objectFit="cover"
|
||||||
|
/>
|
||||||
|
</AspectRatio>
|
||||||
|
</Box>
|
||||||
|
))}
|
||||||
|
</SimpleGrid>
|
||||||
|
</Box>
|
||||||
|
))}
|
||||||
|
</VStack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Empty State */}
|
||||||
|
{!galleryLoading && cachedAlbums.length === 0 && (
|
||||||
|
<VStack py={8} spacing={3}>
|
||||||
|
<Icon as={FiSearch} boxSize={12} color="gray.400" />
|
||||||
|
<Text color="gray.600" textAlign="center">
|
||||||
|
Žádná alba nebyla nalezena v cache.
|
||||||
|
</Text>
|
||||||
|
<Text fontSize="sm" color="gray.500" textAlign="center">
|
||||||
|
Zkontrolujte nastavení Zonerama nebo obnovte cache.
|
||||||
|
</Text>
|
||||||
|
<Button size="sm" onClick={fetchCachedGallery} leftIcon={<FiRefreshCcw />}>
|
||||||
|
Obnovit seznam
|
||||||
|
</Button>
|
||||||
|
</VStack>
|
||||||
|
)}
|
||||||
|
</VStack>
|
||||||
|
</ModalBody>
|
||||||
|
<ModalFooter>
|
||||||
|
<Button variant="ghost" onClick={onGalleryPickerClose}>
|
||||||
|
Zavřít
|
||||||
|
</Button>
|
||||||
|
</ModalFooter>
|
||||||
|
</ModalContent>
|
||||||
|
</Modal>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user