fix and update

This commit is contained in:
lendry
2026-06-29 22:51:25 +03:00
parent 885b07d76b
commit 57cb58347b
30 changed files with 799 additions and 187 deletions

View File

@@ -3,6 +3,7 @@
import { useEffect } from 'react';
import { ChevronLeft, ChevronRight, Download, X } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { MediaImageSkeleton } from '@/components/ui/media-image-skeleton';
import type { ChatMessage } from '@/lib/api';
import { cn } from '@/lib/utils';
@@ -97,7 +98,7 @@ export function ChatImageLightbox({
// eslint-disable-next-line @next/next/no-img-element
<img src={media.blobUrl} alt="" className="max-h-[calc(100vh-140px)] max-w-full object-contain" />
) : (
<div className="text-sm text-white/70">Загрузка изображения...</div>
<MediaImageSkeleton className="h-[min(70vh,520px)] w-[min(92vw,720px)]" rounded="2xl" />
)}
</div>
@@ -137,7 +138,9 @@ export function ChatImageLightbox({
{thumb?.blobUrl ? (
// eslint-disable-next-line @next/next/no-img-element
<img src={thumb.blobUrl} alt="" className="h-full w-full object-cover" />
) : null}
) : (
<MediaImageSkeleton className="h-full w-full min-h-0" rounded="none" />
)}
</button>
);
})}