From 517f11c897eeaede4fd598307fb16bf60dba78b9 Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Fri, 24 Jul 2026 21:55:28 +0300 Subject: [PATCH] Enhance ShowDetail component: display season and episode information alongside asset names in a more structured format, improving user experience. Update AirPage to simplify program labels by removing episode index display, ensuring clarity in the streaming interface. --- .../src/features/admin/shows/ShowDetail.tsx | 18 +++++++++++++++--- frontend/src/features/streaming/AirPage.tsx | 4 ++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/admin/shows/ShowDetail.tsx b/frontend/src/features/admin/shows/ShowDetail.tsx index 7d03dce..3523eda 100644 --- a/frontend/src/features/admin/shows/ShowDetail.tsx +++ b/frontend/src/features/admin/shows/ShowDetail.tsx @@ -188,10 +188,21 @@ export function ShowDetail({ showId }: { showId: string }) { - {show.episodes.map((episode, index) => ( + {show.episodes.map((episode, index) => { + const se = parseEpisode(episode.assetName ?? '') + return ( {index + 1} - {episode.assetName ?? '—'} + +
+ {se && ( + + S{pad2(se.season)}E{pad2(se.episode)} + + )} + {episode.assetName ?? '—'} +
+ {formatDuration(episode.durationSeconds)} @@ -212,7 +223,8 @@ export function ShowDetail({ showId }: { showId: string }) { - ))} + ) + })} {show.episodes.length === 0 && ( diff --git a/frontend/src/features/streaming/AirPage.tsx b/frontend/src/features/streaming/AirPage.tsx index c5101f2..73149ea 100644 --- a/frontend/src/features/streaming/AirPage.tsx +++ b/frontend/src/features/streaming/AirPage.tsx @@ -167,7 +167,7 @@ function splitEpg(entries: ScheduleEntryDto[]) { } function programLabel(entry: ScheduleEntryDto, t: (key: string) => string) { + // На странице эфира — только название шоу (сезон/серия видны в админке). if (entry.kind === 'Ad') return t('air.ad') - const name = entry.showName ?? '—' - return entry.episodeIndex != null ? `${name} · ${t('air.episode')} ${entry.episodeIndex + 1}` : name + return entry.showName ?? '—' }