fix: 修复 PanelTitleConfig 未使用导入导致的 TS6133 编译错误,完整实现 TextArea + TitleLibraryAutoComplete
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Build Staging API Image (push) Successful in 20s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 24s
CI/CD Pipeline / Integration Tests (push) Successful in 1m55s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 2m9s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 2m10s
CI/CD Pipeline / Validate - Style (push) Successful in 2m29s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1m44s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m5s
CI/CD Pipeline / Validate - Security (push) Successful in 6m51s
CI/CD Pipeline / Unit Tests (push) Successful in 8m8s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Failing after 164h49m17s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 164h49m19s
CI/CD Pipeline / Build Production Web Image (push) Failing after 164h49m19s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 164h53m27s
CI/CD Pipeline / Deploy Production (push) Failing after 164h49m17s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 164h53m27s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 164h55m15s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 164h55m15s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 164h57m30s
CI/CD Pipeline / PR Build Web Image (push) Failing after 164h57m30s
CI/CD Pipeline / Frontend Lint (push) Failing after 164h57m30s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 164h57m34s
CI/CD Pipeline / CI Gate (push) Failing after 165h24m5s
CI/CD Pipeline / Build Production API Image (push) Failing after 165h24m5s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 165h28m13s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 165h30m2s
CI/CD Pipeline / PR Build API Image (push) Failing after 165h32m16s

This commit is contained in:
CI Bot
2026-09-09 18:26:27 +08:00
parent 5f54ac3707
commit c06c095b74
@@ -33,6 +33,14 @@ const PanelTitleConfig: React.FC<PanelTitleConfigProps> = ({ titleConfig, onUpda
/** TitleStylePanel 内部高亮的预设 key(面板本地状态) */
const [activePreset, setActivePreset] = useState<string | null>(null)
/** 标题库选项(复用智能剪辑的标题库) */
const [titleOptions, setTitleOptions] = useState<TitleOption[]>([])
useEffect(() => {
getTitles()
.then((items) => setTitleOptions(items.map((t) => ({ label: t.content, value: t.content }))))
.catch(() => setTitleOptions([]))
}, [])
/** AiAvatarTitleConfig → TitleSettings(补齐 aiAutoSelect / 自由坐标字段) */
const titleSettings: TitleSettings = useMemo(
() => ({
@@ -66,52 +74,32 @@ const PanelTitleConfig: React.FC<PanelTitleConfigProps> = ({ titleConfig, onUpda
})
}
const [showTitleLibrary, setShowTitleLibrary] = useState(false)
return (
<div className="aa-title-config">
{/* 主标题输入 */}
{/* 主标题输入 — TextArea 多行 + 标题库选择 */}
<div className="aa-form-field">
<label className="aa-label">主标题</label>
<div style={{ display: "flex", gap: 8 }}>
<input
className="aa-input aa-title-input"
<TextArea
className="aa-title-input"
placeholder="输入视频标题(支持 / 分行)"
value={titleConfig.title}
autoSize={{ minRows: 2, maxRows: 4 }}
maxLength={200}
onChange={(e) => onUpdate({ title: e.target.value })}
style={{ fontSize: 15 }}
/>
<div style={{ marginTop: 8, display: "flex", alignItems: "center", gap: 8 }}>
<span style={{ fontSize: 12, color: "#8c8ca1", whiteSpace: "nowrap" }}>📚 标题库</span>
<TitleLibraryAutoComplete
key={titleConfig.title}
placeholder="选择标题填入上方"
value=""
onChange={(val) => { if (val) onUpdate({ title: val }) }}
options={titleOptions}
maxLength={200}
style={{ flex: 1 }}
type="text"
placeholder="输入视频标题(留空则不显示标题)"
value={titleConfig.title}
maxLength={30}
onChange={(e) => onUpdate({ title: e.target.value })}
/>
<button
type="button"
className="aa-btn aa-btn--ghost"
style={{ whiteSpace: "nowrap" }}
onClick={() => setShowTitleLibrary(true)}
>
📚 从标题库选择
</button>
</div>
{titleConfig.title && (
<div
style={{
fontSize: 13,
padding: "6px 8px",
background: "#f8f8fc",
borderRadius: 6,
fontFamily: getFontFamily(titleConfig.font),
fontWeight: titleConfig.bold ? 700 : 400,
fontStyle: titleConfig.italic ? "italic" : "normal",
color: titleConfig.color,
textShadow: titleConfig.shadow ? "1px 1px 3px rgba(0,0,0,0.6)" : undefined,
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
}}
>
{titleConfig.title}
</div>
)}
</div>
{/* 标题样式:直接复用智能剪辑 TitleStylePanel(位置/字体/字号/样式/预设) */}
@@ -142,8 +130,6 @@ const PanelTitleConfig: React.FC<PanelTitleConfigProps> = ({ titleConfig, onUpda
自动生成字幕
</label>
</div>
</div>
)
}