mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
show animated gifs in gallery
This commit is contained in:
1 parent
90c172f038
commit
6667c70ead
3 files changed
+5
-1
No files matched your search
@@ -110,6 +110,7 @@ export const GalleryDraggableItem: React.FC<GalleryDraggableItemProps> = ({
|
||||
</div>
|
||||
) : (
|
||||
<img
|
||||
data-gallery-draggable-1="true"
|
||||
ref={imgRef}
|
||||
src={item.thumbnail}
|
||||
alt={item.label}
|
||||
@@ -177,6 +178,7 @@ export const GalleryDraggableItem: React.FC<GalleryDraggableItemProps> = ({
|
||||
</div>
|
||||
) : (
|
||||
<img
|
||||
data-gallery-draggable-2="true"
|
||||
ref={imgRef}
|
||||
src={item.thumbnail}
|
||||
alt={item.label}
|
||||
|
||||
@@ -153,6 +153,7 @@ export const GalleryModal = React.memo(
|
||||
|
||||
const handleImageError = useCallback(
|
||||
(url: string) => {
|
||||
console.error(`Failed to load gallery modal image: ${url}`);
|
||||
failedImageUrls.add(url);
|
||||
},
|
||||
[failedImageUrls]
|
||||
@@ -234,7 +235,7 @@ export const GalleryModal = React.memo(
|
||||
label: item.maybe_title || "Image Generation",
|
||||
thumbnail:
|
||||
item.media_class === "video"
|
||||
? item.media_links.maybe_video_previews.still
|
||||
? item.media_links.maybe_video_previews.animated
|
||||
: item.media_class === "dimensional"
|
||||
? item.cover_image?.maybe_cover_image_public_bucket_url
|
||||
: item.media_links.maybe_thumbnail_template?.replace(
|
||||
|
||||
@@ -94,6 +94,7 @@ export function LightboxModal({
|
||||
</video>
|
||||
) : (
|
||||
<img
|
||||
data-lightbox-modal="true"
|
||||
src={imageTagImageUrl}
|
||||
alt={imageAlt}
|
||||
className="h-full w-full object-contain"
|
||||
|
||||
Reference in new issue
Block a user