auto-save 2026-05-14 07:01 (+1, ~4)
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
type Job, type StoryboardScene, type ImageRef,
|
||||
updateStoryboard, resolveImageRefUrl, uploadStoryboardAsset,
|
||||
} from "@/lib/api"
|
||||
import { ProductLibraryPicker } from "@/components/product-library-picker"
|
||||
import { toast } from "sonner"
|
||||
|
||||
interface Props {
|
||||
@@ -145,6 +146,13 @@ export function StoryboardWorkbench({ job, selectedFrames, open, onClose, onJobU
|
||||
const next = refs.slice(0, 6)
|
||||
queueSave({ ...form, product_image: next[0] ?? null, product_images: next })
|
||||
}
|
||||
const addProductRef = (ref: ImageRef) => {
|
||||
if (productRefs.length >= 6) {
|
||||
toast.error("最多添加 6 张产品参考")
|
||||
return
|
||||
}
|
||||
setProductRefs([...productRefs, ref])
|
||||
}
|
||||
const addProductFiles = async (files: FileList | File[]) => {
|
||||
if (!job) return
|
||||
const room = 6 - productRefs.length
|
||||
@@ -299,7 +307,7 @@ export function StoryboardWorkbench({ job, selectedFrames, open, onClose, onJobU
|
||||
toast.error("最多添加 6 张产品参考")
|
||||
return
|
||||
}
|
||||
setProductRefs([...productRefs, clipboard])
|
||||
addProductRef(clipboard)
|
||||
toast.success("已添加产品参考")
|
||||
}}
|
||||
disabled={!clipboard || productRefs.length >= 6}
|
||||
@@ -374,6 +382,15 @@ export function StoryboardWorkbench({ job, selectedFrames, open, onClose, onJobU
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<ProductLibraryPicker
|
||||
jobId={job.id}
|
||||
compact
|
||||
buttonLabel="加入"
|
||||
title="产品融合 · SKG 白底图库"
|
||||
disabled={productRefs.length >= 6}
|
||||
onPick={(ref) => addProductRef(ref)}
|
||||
/>
|
||||
|
||||
{/* 改造 brief:明确“借鉴参考 → 变成 SKG 产品视频”,避免直接复刻 */}
|
||||
<section className="rounded-lg bg-white/[0.035] border border-white/10 p-3">
|
||||
<div className="text-[12.5px] font-semibold text-white mb-2">
|
||||
|
||||
Reference in New Issue
Block a user