feat: move material intake into sidebar

This commit is contained in:
2026-05-21 10:51:24 +08:00
parent c805012adc
commit def4900c1d
2 changed files with 88 additions and 74 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2478,6 +2478,7 @@ export function AdRecreationBoard({
<div className="skg-board-ambient pointer-events-none fixed inset-0" /> <div className="skg-board-ambient pointer-events-none fixed inset-0" />
<div className="relative z-10 mx-auto min-h-screen w-full min-w-[1280px] max-w-[1920px] px-4 py-4 xl:px-5"> <div className="relative z-10 mx-auto min-h-screen w-full min-w-[1280px] max-w-[1920px] px-4 py-4 xl:px-5">
<div className="skg-board-shell flex gap-4 p-4"> <div className="skg-board-shell flex gap-4 p-4">
<div className="flex shrink-0 gap-3 self-stretch">
<WorkbenchRail <WorkbenchRail
job={job} job={job}
jobsCount={jobs.length} jobsCount={jobs.length}
@@ -2490,6 +2491,22 @@ export function AdRecreationBoard({
boardTheme={boardTheme} boardTheme={boardTheme}
/> />
<div className="w-[320px] shrink-0">
<MaterialColumn
data={data}
step={workflow.input}
jobs={jobs}
job={job}
activeJobId={activeJobId}
url={url}
setUrl={setUrl}
fileRef={fileRef}
onSubmitUrl={submitUrl}
onStartProduction={startProduction}
/>
</div>
</div>
<div className="flex min-w-0 flex-1 flex-col gap-3"> <div className="flex min-w-0 flex-1 flex-col gap-3">
<header className="skg-board-topbar flex items-center justify-between gap-4 rounded-[20px] border border-white/10 bg-white/[0.04] px-4 py-3"> <header className="skg-board-topbar flex items-center justify-between gap-4 rounded-[20px] border border-white/10 bg-white/[0.04] px-4 py-3">
<div className="min-w-0"> <div className="min-w-0">
@@ -2502,7 +2519,7 @@ export function AdRecreationBoard({
</div> </div>
<p className="mt-2 truncate text-[12px] text-white/42"></p> <p className="mt-2 truncate text-[12px] text-white/42"></p>
</div> </div>
<div className="grid min-w-[560px] grid-cols-5 gap-2 text-[11px]"> <div className="grid min-w-[440px] grid-cols-5 gap-2 text-[11px]">
<Metric label="素材" value={`${jobs.length}`} /> <Metric label="素材" value={`${jobs.length}`} />
<Metric label="当前" value={shortId(activeJobId)} /> <Metric label="当前" value={shortId(activeJobId)} />
<Metric label="视频" value={job?.video_url ? "ready" : "-"} /> <Metric label="视频" value={job?.video_url ? "ready" : "-"} />
@@ -2511,21 +2528,7 @@ export function AdRecreationBoard({
</div> </div>
</header> </header>
<div className="grid min-h-0 flex-1 grid-cols-[340px_minmax(0,1fr)] gap-3"> <section className="skg-board-panel flex min-h-0 flex-1 flex-col rounded-[20px] border border-white/10 bg-white/[0.035] shadow-2xl">
<MaterialColumn
data={data}
step={workflow.input}
jobs={jobs}
job={job}
activeJobId={activeJobId}
url={url}
setUrl={setUrl}
fileRef={fileRef}
onSubmitUrl={submitUrl}
onStartProduction={startProduction}
/>
<section className="skg-board-panel flex min-h-0 flex-col rounded-[20px] border border-white/10 bg-white/[0.035] shadow-2xl">
<header className="shrink-0 border-b border-white/10 p-3"> <header className="shrink-0 border-b border-white/10 p-3">
<div className="flex items-center justify-between gap-4"> <div className="flex items-center justify-between gap-4">
<div className="min-w-0"> <div className="min-w-0">
@@ -2574,7 +2577,6 @@ export function AdRecreationBoard({
</div> </div>
</div> </div>
</div> </div>
</div>
<LibraryDrawer <LibraryDrawer
open={libraryOpen} open={libraryOpen}
currentJobId={job?.id} currentJobId={job?.id}
@@ -2683,7 +2685,7 @@ function MaterialColumn({
? job.video_url ? "重新解析" : "重新下载" ? job.video_url ? "重新解析" : "重新下载"
: "开始分析" : "开始分析"
return ( return (
<section className="skg-board-panel flex min-h-0 flex-col gap-3 rounded-[20px] border border-white/10 bg-white/[0.035] p-3 shadow-2xl"> <section className="skg-board-panel flex h-full min-h-[514px] flex-col gap-3 rounded-[20px] border border-white/10 bg-white/[0.035] p-3 shadow-2xl">
<header className="shrink-0 border-b border-white/10 pb-3"> <header className="shrink-0 border-b border-white/10 pb-3">
<div className="mb-2 flex items-center gap-2"> <div className="mb-2 flex items-center gap-2">
<span className="inline-flex h-8 w-8 items-center justify-center rounded-full border border-white/12 bg-white/[0.07] text-[#c8cd19]"><Plus className="h-4 w-4" /></span> <span className="inline-flex h-8 w-8 items-center justify-center rounded-full border border-white/12 bg-white/[0.07] text-[#c8cd19]"><Plus className="h-4 w-4" /></span>