auto-save 2026-05-17 20:20 (~4)

This commit is contained in:
2026-05-17 20:20:36 +08:00
parent 72aef99592
commit 8990db4e46
4 changed files with 67 additions and 27 deletions

View File

@@ -1214,6 +1214,8 @@ function AudioStoryboardPlanPanel({
analysis?.note,
analysis?.background ?? "unknown",
analysis?.use_tags,
analysis?.orientation,
analysis?.landmarks,
analysis?.risk ?? "",
analysis?.confidence,
)
@@ -1236,7 +1238,7 @@ function AudioStoryboardPlanPanel({
})
working = [
...working,
createProductRefItem(ref, working.length, "ai", slot.value, `AI 补齐:${slot.hint}`, "white", undefined, "", 1),
createProductRefItem(ref, working.length, "ai", slot.value, `AI 补齐:${slot.hint}`, "white", undefined, undefined, undefined, "", 1),
]
setProductItems(working)
} catch (e) {
@@ -1338,7 +1340,7 @@ function AudioStoryboardPlanPanel({
target_view: slot.label,
note: slot.hint,
})
setProductItems((prev) => [...prev, createProductRefItem(ref, prev.length, "ai", slot.value, `AI 补齐:${slot.hint}`, "white", undefined, "", 1)])
setProductItems((prev) => [...prev, createProductRefItem(ref, prev.length, "ai", slot.value, `AI 补齐:${slot.hint}`, "white", undefined, undefined, undefined, "", 1)])
toast.success(`AI 已补全产品视角:${slot.label}`)
} catch (e) {
toast.error("AI 补角度失败:" + (e instanceof Error ? e.message : String(e)))
@@ -1394,7 +1396,7 @@ function AudioStoryboardPlanPanel({
)}
</div>
<p className="mt-1 max-w-[760px] text-[11px] leading-snug text-white/42">
1200-2000px 600px 1600pxJPEG 92 AI / {MAX_PRODUCT_REFS_PER_VIDEO}
U // 1200-2000px 600px 1600pxJPEG 92 AI {MAX_PRODUCT_REFS_PER_VIDEO}
</p>
</div>
<div className="flex shrink-0 items-center gap-2">
@@ -1559,6 +1561,7 @@ function ProductReferenceCard({
const tagLabels = item.useTags.map((tag) => PRODUCT_USE_TAG_LABELS[tag]).filter(Boolean)
const assetWarnings = item.assetMeta?.warnings ?? []
const assetActions = item.assetMeta?.actions ?? []
const orientationText = formatProductOrientation(item.orientation)
const [previewPos, setPreviewPos] = useState<{ left: number; top: number } | null>(null)
function updatePreviewPosition(event: ReactMouseEvent<HTMLDivElement>) {
@@ -1590,6 +1593,8 @@ function ProductReferenceCard({
{productViewLabel(item.view)} · {productBackgroundLabel(item.background)} · {tagLabels.join(" / ")}
<br />
{item.note}
{orientationText ? <><br />{orientationText}</> : null}
{item.landmarks.length ? <><br />{item.landmarks.join(" / ")}</> : null}
{item.risk ? <><br />{item.risk}</> : null}
{assetWarnings.length ? <><br />{assetWarnings.join("")}</> : null}
</div>
@@ -1623,13 +1628,17 @@ function ProductReferenceCard({
{tagLabels.slice(0, 3).map((tag) => (
<span key={tag} className="rounded border border-cyan-300/14 bg-cyan-300/[0.07] px-1.5 py-0.5 text-[9.5px] leading-none text-cyan-100/58">{tag}</span>
))}
{orientationText ? <span className="rounded border border-violet-300/14 bg-violet-300/[0.07] px-1.5 py-0.5 text-[9.5px] leading-none text-violet-100/60"></span> : null}
{item.landmarks.slice(0, 2).map((landmark) => (
<span key={landmark} className="rounded border border-white/10 bg-white/[0.045] px-1.5 py-0.5 text-[9.5px] leading-none text-white/44">{landmark}</span>
))}
{item.risk || assetWarnings.length ? <span className="rounded border border-amber-300/18 bg-amber-300/[0.08] px-1.5 py-0.5 text-[9.5px] leading-none text-amber-100/68"></span> : null}
{assetActions.length ? <span className="rounded border border-emerald-300/14 bg-emerald-300/[0.07] px-1.5 py-0.5 text-[9.5px] leading-none text-emerald-100/58"></span> : null}
</div>
<input
value={item.note}
onChange={(event) => onPatch({ note: event.target.value })}
placeholder="检查备注:结构差异、触点、尺寸比例"
placeholder="检查备注:佩戴者左/右、上/下、触点、尺寸比例"
className="mt-1 h-8 w-full rounded-md border border-white/10 bg-black/35 px-2 text-[11px] text-white outline-none placeholder:text-white/25 focus:border-cyan-300/50"
/>
<div className="mt-1 truncate text-[10px] text-white/32">{item.ref.label || "产品参考图"}</div>