From 91cdcd74b37e0caa4248338add3700075a10ef71 Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 22 Aug 2026 03:10:10 -0500 Subject: [PATCH] Reorder assign panel columns and add featured button on slot list. Put time-slot list in the middle with featured on the right, and allow promoting slot entries to featured directly. Co-authored-by: Cursor --- frontend/src/components/YtAssignPanel.tsx | 258 ++++++++++++---------- 1 file changed, 137 insertions(+), 121 deletions(-) diff --git a/frontend/src/components/YtAssignPanel.tsx b/frontend/src/components/YtAssignPanel.tsx index 9a1dfae..9798f1b 100644 --- a/frontend/src/components/YtAssignPanel.tsx +++ b/frontend/src/components/YtAssignPanel.tsx @@ -1050,6 +1050,143 @@ export function YtAssignPanel({ channels }: { channels: ManagedChannel[] }) { +
+
+

+ 时间段列表(轮播)· {(selected.slots || []).length} +

+
+ + + +
+
+

+ 本频道 {selectedSchedule?.start_label || "—"}–{selectedSchedule?.end_label || "—"} 内按序轮播抖音源;多频道错开时段,避免同时推流。 +

+
+ {(selected.slots || []).length === 0 ? ( +
+ 从普通列表点时钟图标加入,或点「填充直播」 +
+ ) : ( + (selected.slots || []).map((s, i) => { + const banned = Boolean(s.blacklisted); + const inFeat = s.pool_url_id ? featuredIds.has(s.pool_url_id) : false; + const schSlot = (schedule?.channels || []) + .find((c) => c.group_id === selected.id) + ?.slots?.[i] as SlotUrl | undefined; + const timeLabel = + schSlot?.window_start_label && schSlot?.window_end_label + ? `${schSlot.window_start_label}–${schSlot.window_end_label}` + : null; + return ( +
+ + #{i + 1} + + + setLightbox({ src, title: s.title || "封面", subtitle: s.url }) + } + /> +
+
+
{s.title || "未命名主播"}
+ {timeLabel ? ( + + {timeLabel} + + ) : null} + {banned ? ( + + 黑名单 + + ) : null} +
+ + {s.url || s.pool_url_id} + +
+
+ {s.pool_url_id ? ( + + ) : null} + {s.pool_url_id ? ( + + ) : null} + +
+
+ ); + }) + )} +
+
+

@@ -1147,127 +1284,6 @@ export function YtAssignPanel({ channels }: { channels: ManagedChannel[] }) { )}

- -
-
-

- 时间段列表(轮播)· {(selected.slots || []).length} -

-
- - - -
-
-

- 本频道 {selectedSchedule?.start_label || "—"}–{selectedSchedule?.end_label || "—"} 内按序轮播抖音源;多频道错开时段,避免同时推流。 -

-
- {(selected.slots || []).length === 0 ? ( -
- 从普通列表点时钟图标加入,或点「填充直播」 -
- ) : ( - (selected.slots || []).map((s, i) => { - const banned = Boolean(s.blacklisted); - const schSlot = (schedule?.channels || []) - .find((c) => c.group_id === selected.id) - ?.slots?.[i] as SlotUrl | undefined; - const timeLabel = - schSlot?.window_start_label && schSlot?.window_end_label - ? `${schSlot.window_start_label}–${schSlot.window_end_label}` - : null; - return ( -
- - #{i + 1} - - - setLightbox({ src, title: s.title || "封面", subtitle: s.url }) - } - /> -
-
-
{s.title || "未命名主播"}
- {timeLabel ? ( - - {timeLabel} - - ) : null} - {banned ? ( - - 黑名单 - - ) : null} -
- - {s.url || s.pool_url_id} - -
-
- {s.pool_url_id ? ( - - ) : null} - -
-
- ); - }) - )} -
-
) : null}