auto-save 2026-05-13 16:23 (~6)

This commit is contained in:
2026-05-13 16:23:35 +08:00
parent f891cbc2e2
commit 467e8f600b
6 changed files with 62 additions and 36 deletions

View File

@@ -3,8 +3,8 @@ import { useEffect, useState, useRef, type ReactNode } from "react"
import { createPortal } from "react-dom"
import { X, LayoutGrid, Loader2, Check, Sparkle, Wand2 } from "lucide-react"
import {
type Job, type StoryboardScene,
effectiveFrameUrl, cutoutUrl, updateStoryboard,
type Job, type StoryboardScene, type ImageRef,
effectiveFrameUrl, updateStoryboard, resolveImageRefUrl,
} from "@/lib/api"
import { toast } from "sonner"
@@ -14,13 +14,14 @@ interface Props {
open: boolean
onClose: () => void
onJobUpdate?: (j: Job) => void
clipboard: ImageRef | null // 全局剪贴板page.tsx 提供)
}
const emptyScene = (): StoryboardScene => ({
subject: "", product: "", scene: "", action: "", duration: 0, reference_ids: [],
})
export function StoryboardWorkbench({ job, selectedFrames, open, onClose, onJobUpdate }: Props) {
export function StoryboardWorkbench({ job, selectedFrames, open, onClose, onJobUpdate, clipboard }: Props) {
const [mounted, setMounted] = useState(false)
useEffect(() => setMounted(true), [])