diff --git a/frontend/src/components/Albums/AddImagesToAlbumDialog.tsx b/frontend/src/components/Albums/AddImagesToAlbumDialog.tsx index d2195ce28..94a2b5872 100644 --- a/frontend/src/components/Albums/AddImagesToAlbumDialog.tsx +++ b/frontend/src/components/Albums/AddImagesToAlbumDialog.tsx @@ -16,6 +16,7 @@ import { usePictoMutation, usePictoQuery } from '@/hooks/useQueryExtension'; import { addImagesToAlbum, fetchAllImages } from '@/api/api-functions'; import { showInfoDialog } from '@/features/infoDialogSlice'; import { useMutationFeedback } from '@/hooks/useMutationFeedback'; +import { AspectRatio } from '@/components/ui/aspect-ratio'; import { Image } from '@/types/Media'; import { convertFileSrc } from '@tauri-apps/api/core'; import { Search, Check } from 'lucide-react'; @@ -98,7 +99,7 @@ export const AddImagesToAlbumDialog: React.FC = ({ return ( - + Add Images to "{albumName}" @@ -133,9 +134,14 @@ export const AddImagesToAlbumDialog: React.FC = ({ ) : (
{filteredImages.map((image) => ( -
= ({ }} onClick={() => handleImageToggle(image.id)} > - { - const img = e.target as HTMLImageElement; - img.onerror = null; - const placeholder = window.matchMedia( - '(prefers-color-scheme: dark)', - ).matches - ? '/placeholder-album.svg' - : '/placeholder-album-light.svg'; - img.src = placeholder; - }} - /> + + { + const img = e.currentTarget; + img.onerror = null; + const placeholder = window.matchMedia( + '(prefers-color-scheme: dark)', + ).matches + ? '/placeholder-album.svg' + : '/placeholder-album-light.svg'; + img.src = placeholder; + }} + /> - {selectedImages.has(image.id) && ( -
-
- + {selectedImages.has(image.id) && ( +
+
+ +
-
- )} -
+ )} +
+ ))}
)}