From ed941904a6d1ce4f59c2198f019f2710cd1896ac Mon Sep 17 00:00:00 2001 From: npeter83 Date: Tue, 16 Jun 2026 09:36:51 +0200 Subject: [PATCH] feat(card): show LIVE/upcoming badge where duration is absent Live streams and upcoming/premiere videos have no fixed duration, so the playlist row and video card left a blank where the runtime usually sits. Show a LIVE (red) or upcoming badge instead, so it's clear the missing time is by design, not a sync gap. --- frontend/src/components/Playlists.tsx | 15 +++++++++++++-- frontend/src/components/VideoCard.tsx | 12 ++++++++++-- frontend/src/i18n/locales/de/card.json | 2 ++ frontend/src/i18n/locales/en/card.json | 2 ++ frontend/src/i18n/locales/hu/card.json | 2 ++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Playlists.tsx b/frontend/src/components/Playlists.tsx index 910d9d8..93512f0 100644 --- a/frontend/src/components/Playlists.tsx +++ b/frontend/src/components/Playlists.tsx @@ -110,6 +110,7 @@ function Row({ onPlay: () => void; onRemove: () => void; }) { + const { t } = useTranslation(); const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: video.id, disabled: readOnly }); const style = { @@ -151,11 +152,21 @@ function Row({
{video.title}
{video.channel_title}
- {video.duration_seconds != null && ( + {video.duration_seconds != null ? ( {formatDuration(video.duration_seconds)} - )} + ) : video.live_status === "live" || video.live_status === "upcoming" ? ( + + {t(`card.${video.live_status}`)} + + ) : null} {!readOnly && (