auto-save 2026-05-13 00:00 (~5)
This commit is contained in:
@@ -15,7 +15,6 @@ import {
|
||||
import { ThemeToggle } from "@/components/theme-toggle"
|
||||
import { Dashboard } from "@/components/dashboard"
|
||||
import { addManualFrame, analyzeJob, createJob, getJob, uploadJob, type Job } from "@/lib/api"
|
||||
import { FrameLightbox } from "@/components/lightbox"
|
||||
import { VideoLightbox } from "@/components/video-lightbox"
|
||||
|
||||
const NODE_TYPES = {
|
||||
@@ -215,15 +214,18 @@ export default function Home() {
|
||||
submitting,
|
||||
analyzing,
|
||||
selectedFrames,
|
||||
expandedFrame,
|
||||
onSubmitUrl: handleSubmit,
|
||||
onUploadFile: handleUpload,
|
||||
onAnalyze: handleAnalyze,
|
||||
onToggleFrame: handleToggleFrame,
|
||||
onExpandFrame: setExpandedFrame,
|
||||
onCloseExpandedFrame: () => setExpandedFrame(null),
|
||||
onAddManualFrame: handleAddManualFrame,
|
||||
onOpenVideoLightbox: () => setVideoLightboxOpen(true),
|
||||
onSwitchJob: handleSwitchJob,
|
||||
}), [job, jobs, activeJobId, submitting, analyzing, selectedFrames, handleSubmit, handleUpload, handleAnalyze, handleToggleFrame, handleAddManualFrame, handleSwitchJob])
|
||||
onJobUpdate: setJob as any,
|
||||
}), [job, jobs, activeJobId, submitting, analyzing, selectedFrames, expandedFrame, handleSubmit, handleUpload, handleAnalyze, handleToggleFrame, handleAddManualFrame, handleSwitchJob, setJob])
|
||||
|
||||
// 用 useNodesState 让 ReactFlow 自己管位置(避免轮询时重置 drag)
|
||||
const [nodes, setNodes, onNodesChange] = useNodesState<Node>(
|
||||
@@ -305,19 +307,7 @@ export default function Home() {
|
||||
|
||||
<Toaster theme="system" position="bottom-center" />
|
||||
|
||||
{/* Lightbox 看大图 */}
|
||||
{job && (
|
||||
<FrameLightbox
|
||||
jobId={job.id}
|
||||
frames={job.frames}
|
||||
activeIndex={expandedFrame}
|
||||
selected={selectedFrames}
|
||||
onClose={() => setExpandedFrame(null)}
|
||||
onChange={setExpandedFrame}
|
||||
onToggleSelect={handleToggleFrame}
|
||||
onJobUpdate={setJob}
|
||||
/>
|
||||
)}
|
||||
{/* FrameLightbox 已嵌入 dashboard 的 keyframe drawer(embedded mode),不再独立浮动 */}
|
||||
|
||||
{/* Video lightbox — InputNode 缩略图点击进入 */}
|
||||
<VideoLightbox
|
||||
|
||||
Reference in New Issue
Block a user