From c1501f6e1612cb19fd692bc34b8d4d0e07f9683f Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 1 Sep 2026 11:52:00 -0500 Subject: [PATCH] Extend Douyin/YouTube live badge styling to dashboard, groups, and shorts. Co-authored-by: Cursor --- frontend/src/app/anchors/page.tsx | 4 ++-- frontend/src/app/groups/page.tsx | 11 ++++++++--- frontend/src/app/page.tsx | 17 +++++++---------- frontend/src/app/shorts/page.tsx | 11 ++++++++--- frontend/src/components/YtRelayLiveLogCard.tsx | 2 +- scripts/_deploy_live_badge_ui.py | 5 +++++ 6 files changed, 31 insertions(+), 19 deletions(-) diff --git a/frontend/src/app/anchors/page.tsx b/frontend/src/app/anchors/page.tsx index f9554a9..dba095c 100644 --- a/frontend/src/app/anchors/page.tsx +++ b/frontend/src/app/anchors/page.tsx @@ -251,7 +251,7 @@ export default function AnchorsPage() { {a.room_id ? ( ) : a.active ? ( - + ) : null}
@@ -275,7 +275,7 @@ export default function AnchorsPage() { {profile.room_id ? ( ) : profile.overview.active ? ( - + ) : null}

{profile.room_id || "—"}

diff --git a/frontend/src/app/groups/page.tsx b/frontend/src/app/groups/page.tsx index 9f772e5..2d1f668 100644 --- a/frontend/src/app/groups/page.tsx +++ b/frontend/src/app/groups/page.tsx @@ -518,9 +518,14 @@ export default function GroupsPage() {
{ch.channel_id || ch.room_id || "—"}
- 0 || ch.last_status === "live" ? "text-rose-300" : "text-slate-500"}> - {Number(ch.active) > 0 || ch.last_status === "live" ? "LIVE" : ch.last_status || "offline"} - + {Number(ch.active) > 0 || ch.last_status === "live" ? ( + + + YT·LIVE + + ) : ( + {ch.last_status || "offline"} + )} {ch.sessions ?? 0} {Number(ch.hours_total || 0).toFixed(1)} diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index a2b8ae2..098aef5 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -328,13 +328,10 @@ export default function HomePage() { {status?.monitor_enabled ? : ( ⏸ 已暂停 )} - {liveRooms.length > 0 ? : null} + {liveRooms.length > 0 ? : null} {ytLiveCount > 0 ? ( - - - - YT 在播 {ytLiveCount} - + + ) : ytStatus?.yt_monitor_enabled !== false && ytStatus?.running ? ( @@ -686,8 +683,8 @@ export default function HomePage() { {(liveRooms.length > 0 || events.length > 0) ? (
-
- +
+ 实时动态条
@@ -697,9 +694,9 @@ export default function HomePage() { if ("last_status" in item) { return ( - 🔴 + {item.last_anchor || item.room_id} - 在播中 + 抖音·在播 ); } diff --git a/frontend/src/app/shorts/page.tsx b/frontend/src/app/shorts/page.tsx index 2a5a815..8219b18 100644 --- a/frontend/src/app/shorts/page.tsx +++ b/frontend/src/app/shorts/page.tsx @@ -861,9 +861,14 @@ export default function ShortsPage() { ) : null} - 0 || ch.last_status === "live" ? "text-rose-300" : "text-slate-500"}> - {Number(ch.active) > 0 || ch.last_status === "live" ? "LIVE" : ch.last_status || "offline"} - + {Number(ch.active) > 0 || ch.last_status === "live" ? ( + + + YT·LIVE + + ) : ( + {ch.last_status || "offline"} + )} {ch.sessions ?? 0} {Number(ch.hours_total || 0).toFixed(1)} diff --git a/frontend/src/components/YtRelayLiveLogCard.tsx b/frontend/src/components/YtRelayLiveLogCard.tsx index e3bdac9..c0dcfb5 100644 --- a/frontend/src/components/YtRelayLiveLogCard.tsx +++ b/frontend/src/components/YtRelayLiveLogCard.tsx @@ -50,7 +50,7 @@ export function YtRelayLiveLogCard({ row, pollMs = 3500, onRefresh }: Props) {

当前直播日志

- {pushingNow ? : null} + {pushingNow ? : null} {statusLabel} diff --git a/scripts/_deploy_live_badge_ui.py b/scripts/_deploy_live_badge_ui.py index 6724f00..1158847 100644 --- a/scripts/_deploy_live_badge_ui.py +++ b/scripts/_deploy_live_badge_ui.py @@ -15,6 +15,11 @@ FILES = [ "frontend/src/components/Shell.tsx", "frontend/src/components/YouTubeLiveTicker.tsx", "frontend/src/app/youtube/health/page.tsx", + "frontend/src/app/page.tsx", + "frontend/src/app/anchors/page.tsx", + "frontend/src/components/YtRelayLiveLogCard.tsx", + "frontend/src/app/groups/page.tsx", + "frontend/src/app/shorts/page.tsx", ] c = paramiko.SSHClient() c.set_missing_host_key_policy(paramiko.AutoAddPolicy())