From f36bbb80a7886b84f62359bd32c0c7749b811a2f Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 22 Aug 2026 03:18:19 -0500 Subject: [PATCH] Copy assign lists as URL-only lines without anchor names. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep export format unchanged with 主播 labels for file downloads. Co-authored-by: Cursor --- frontend/src/components/YtAssignPanel.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/YtAssignPanel.tsx b/frontend/src/components/YtAssignPanel.tsx index 9654eac..f46aa53 100644 --- a/frontend/src/components/YtAssignPanel.tsx +++ b/frontend/src/components/YtAssignPanel.tsx @@ -117,6 +117,13 @@ function exportText(rows: Array<{ url?: string; title?: string }>): string { .join("\n"); } +function copyUrlText(rows: Array<{ url?: string }>): string { + return rows + .map((r) => String(r.url || "").trim()) + .filter(Boolean) + .join("\n"); +} + async function copyText(text: string): Promise { try { await navigator.clipboard.writeText(text); @@ -613,7 +620,7 @@ export function YtAssignPanel({ channels }: { channels: ManagedChannel[] }) { ? (selected.featured || []).map((f) => ({ url: f.url, title: f.title })) : (selected.slots || []).map((s) => ({ url: s.url, title: s.title })); const label = kind === "pool" ? "普通" : kind === "featured" ? "精选" : "时间段"; - const text = exportText(rows); + const text = copyUrlText(rows); if (!text) { toast.push("列表为空", "err"); return;