From 942dd25d59b04cf7259ece9284b191565b4cb0b1 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 13 Oct 2025 12:01:34 +0000 Subject: [PATCH 1/6] Improve media preview to show videos correctly in the interface Fix an issue in the MediaUpload component where videos were not being rendered correctly in the preview, ensuring all media types are displayed as expected. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/nlpElis --- client/src/components/media-upload.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/media-upload.tsx b/client/src/components/media-upload.tsx index c33e865..a6f8d7c 100644 --- a/client/src/components/media-upload.tsx +++ b/client/src/components/media-upload.tsx @@ -250,15 +250,15 @@ export default function MediaUpload() { - ) as any)} + ))} {/* Élément sentinelle pour le scroll infini */} - {mediaList && visibleCount < (mediaList as any[]).length && ( + {(mediaList && visibleCount < (mediaList as any[]).length) ? (
- )} + ) : null} From 68ed5d52d4cb81e81e3fc9d87bd4110bea9fe7e9 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 13 Oct 2025 12:03:11 +0000 Subject: [PATCH 2/6] Enable video playback in post previews for better visualization Update `PreviewModal.tsx` to conditionally render either a video element with controls or an image based on the media type, resolving an issue where videos were not displayed in previews. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/nlpElis --- client/src/components/preview-modal.tsx | 42 ++++++++++++++++--------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/client/src/components/preview-modal.tsx b/client/src/components/preview-modal.tsx index 9b796f9..b47ee99 100644 --- a/client/src/components/preview-modal.tsx +++ b/client/src/components/preview-modal.tsx @@ -64,6 +64,30 @@ export function PreviewModal({ } }; + const renderMedia = (media: Media, className: string = "w-full h-auto") => { + const url = getMediaUrl(media); + + if (media.type === 'video') { + return ( +