Архитектура
This commit is contained in:
@@ -75,6 +75,7 @@ export interface Message {
|
||||
scheduledAt?: string | null;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
sequenceId: number;
|
||||
sender: MessageSender;
|
||||
replyTo?: {
|
||||
id: string;
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function ImageLightbox({ url, images, initialIndex = 0, onClose }
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
className="fixed inset-0 z-[9999] bg-black/90 flex items-center justify-center"
|
||||
className="fixed inset-0 z-[9999] bg-black flex items-center justify-center"
|
||||
onClick={onClose}
|
||||
>
|
||||
{/* Top bar */}
|
||||
@@ -49,7 +49,7 @@ export default function ImageLightbox({ url, images, initialIndex = 0, onClose }
|
||||
<span className="text-sm text-white/70 mr-2">{index + 1} / {total}</span>
|
||||
)}
|
||||
<a
|
||||
href={currentUrl}
|
||||
href={`${currentUrl}?download=true`}
|
||||
download
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
@@ -92,22 +92,23 @@ export default function ImageLightbox({ url, images, initialIndex = 0, onClose }
|
||||
initial={{ scale: 0.8, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
exit={{ scale: 0.8, opacity: 0 }}
|
||||
transition={{ duration: 0.15 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="max-w-[90vw] max-h-[90vh] flex items-center justify-center"
|
||||
className="absolute inset-x-0 inset-y-12 flex items-center justify-center p-4"
|
||||
>
|
||||
{currentType === 'video' ? (
|
||||
<video
|
||||
src={currentUrl}
|
||||
controls
|
||||
autoPlay
|
||||
className="max-w-[90vw] max-h-[90vh] rounded-lg shadow-2xl"
|
||||
preload="metadata"
|
||||
className="w-full h-full object-contain outline-none bg-black/50"
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
src={currentUrl}
|
||||
alt=""
|
||||
className="max-w-[90vw] max-h-[90vh] object-contain rounded-lg shadow-2xl"
|
||||
className="max-w-full max-h-full object-contain shadow-2xl"
|
||||
/>
|
||||
)}
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user