From e6c8c140d89bf1fac4ca6fd8850885a19ddffe13 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 18 Apr 2026 14:57:14 +0800 Subject: [PATCH] Match LibTV settings modals --- .../canvas/LiblibVideoCanvasReplica.tsx | 74 ++++++++++++++++--- 1 file changed, 65 insertions(+), 9 deletions(-) diff --git a/components/canvas/LiblibVideoCanvasReplica.tsx b/components/canvas/LiblibVideoCanvasReplica.tsx index c433ec579..6a40a16e1 100644 --- a/components/canvas/LiblibVideoCanvasReplica.tsx +++ b/components/canvas/LiblibVideoCanvasReplica.tsx @@ -380,6 +380,14 @@ function getDefaultValue(key: string, config: unknown) { return ""; } +function getInspectorTitle(node: CloneNode) { + if (node.kind !== "input") return node.title; + if (node.inputType === "video") return "视频输入"; + if (node.inputType === "audio") return "音频输入"; + if (node.inputType === "text") return "文本输入"; + return "图片输入"; +} + function makeId(prefix: string) { return `${prefix}-${crypto.randomUUID()}`; } @@ -1155,9 +1163,7 @@ export function LiblibVideoCanvasReplica({ canvasId, isLoading = false }: Liblib ) : null} {activePanel === "skills" ? ( - setActivePanel(null)} title="LibTV Skills"> - - + setActivePanel(null)} /> ) : null} {activePanel === "share" ? ( @@ -2690,7 +2696,9 @@ function InspectorPanel({ const tool = node.tool; const type = getToolType(tool); const properties = getToolProperties(tool); - const showUpload = node.kind === "input" || requiresMedia(tool); + const showUpload = Boolean(tool && requiresMedia(tool)); + const inspectorTitle = getInspectorTitle(node); + const primaryTab = node.inputType || type || node.kind; return (