Ensure video player and information display at consistent sizes

Update the layout in `bunny-video-modal.tsx` to make the video player and its associated information consistently sized across different screen sizes.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/Sy6XHzr
This commit is contained in:
sebastjanartic 2025-08-30 16:28:02 +00:00
parent bed93bb270
commit 308b045620

View File

@ -256,9 +256,9 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
</div>
{/* Video player area */}
<div className="flex-1 flex flex-col lg:flex-row gap-2 min-h-0">
<div className="flex-1 flex flex-col gap-3 min-h-0">
{/* Main video player */}
<div className="flex-1 flex flex-col">
<div className="w-full max-w-md mx-auto">
<div className="relative w-full aspect-video bg-black rounded-lg overflow-hidden">
{video.videoUrlIframe ? (
<iframe
@ -298,35 +298,12 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
</>
)}
</div>
{/* Video info directly under video on mobile, sidebar on desktop */}
<div className="block lg:hidden mt-0">
<div className="p-3 bg-gray-800 rounded-lg text-white max-h-none overflow-visible">
<h3 className="font-bold text-lg mb-2 whitespace-normal break-words" data-testid="text-video-title">
{video.title}
</h3>
<div className="flex flex-wrap gap-4 text-sm text-gray-300 mb-3">
<span data-testid="text-video-views">{formatViews(video.views)}</span>
<span data-testid="text-video-duration">{formatDuration(video.duration)}</span>
<span data-testid="text-video-date">{formatDate(video.createdAt)}</span>
</div>
{video.description && (
<div className="text-sm text-gray-300">
<p className="leading-relaxed whitespace-pre-wrap break-words" data-testid="text-video-description">
{video.description}
</p>
</div>
)}
</div>
</div>
</div>
{/* Video info sidebar - desktop only */}
<div className="hidden lg:block lg:w-80 lg:min-w-80 space-y-0 overflow-y-auto lg:ml-4">
<div className="p-3 bg-gray-800 rounded-lg text-white max-h-none overflow-visible">
<h3 className="font-bold text-lg mb-2 whitespace-normal break-words" data-testid="text-video-title">
{/* Video info always below video */}
<div className="w-full max-w-md mx-auto">
<div className="p-4 bg-gray-800 rounded-lg text-white">
<h3 className="font-bold text-xl mb-3 whitespace-normal break-words" data-testid="text-video-title">
{video.title}
</h3>