Copy assign lists as URL-only lines without anchor names.
Keep export format unchanged with 主播 labels for file downloads. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d37b06f9af
commit
f36bbb80a7
@ -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<boolean> {
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user