AI media harness for planning, generating, and editing locally
TypeScript
Image editor bar: generator then Generate on the left, canvas tools on the right
Bittic8b759d21bd2
diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsxindex 3c93912..08e9e8d 100644--- a/src/components/workspace/ImageEditor.tsx+++ b/src/components/workspace/ImageEditor.tsx@@ -472,7 +472,6 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGene]} />}<section className="image-center" aria-label="Image panel"><div className="image-canvas-tools" role="toolbar" aria-label="Image tools">- <button className="primary-button image-generate-button" data-tooltip={editPlan?.error ?? undefined} disabled={active ? work.cancelling || work.status === "encoding" : !isTauri() || !template || templateNeedsDownload(template) || (imageRoot ? Boolean(editPlan?.error) : !imageScenePrompt(scene))} onClick={() => attempt(() => active ? onCancel(work.id) : onGenerate(template!))}>{active ? <Stop14 aria-hidden="true" /> : <Sparkle16 aria-hidden="true" />}{active ? work.cancelling ? "Cancelling…" : "Cancel" : "Generate"}</button><ComboBoxclassName="image-generator"aria-label="Generator"@@ -483,7 +482,9 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGeneoptions={imageTemplates.map((item) => ({ value: item.id, label: item.name, disabled: templateNeedsDownload(item), description: templateNeedsDownload(item) ? "Download in Settings" : undefined }))}onChange={(id) => { setTemplateId(id); localStorage.setItem("slopus.image-generator-template.v1", id); const next = imageTemplates.find((candidate) => candidate.id === id); if (next) commit({ ...scene, steps: next.defaultSteps }); }}/>- <span className="image-tools__separator" role="separator" aria-orientation="vertical" />+ <button className="primary-button image-generate-button" data-tooltip={editPlan?.error ?? undefined} disabled={active ? work.cancelling || work.status === "encoding" : !isTauri() || !template || templateNeedsDownload(template) || (imageRoot ? Boolean(editPlan?.error) : !imageScenePrompt(scene))} onClick={() => attempt(() => active ? onCancel(work.id) : onGenerate(template!))}>{active ? <Stop14 aria-hidden="true" /> : <Sparkle16 aria-hidden="true" />}{active ? work.cancelling ? "Cancelling…" : "Cancel" : "Generate"}</button>+ {/* The canvas tools sit at the trailing edge; the generator and Generate lead. */}+ <span className="image-tools__spacer" aria-hidden="true" /><button className={`image-tool${boxes ? " image-tool--on" : ""}`} aria-label="Show placement boxes" aria-pressed={boxes} data-tooltip="Show placement boxes" onClick={() => { setBoxes(!boxes); setDrawKind(null); }}>{boxes ? <Boxes16Filled aria-hidden="true" /> : <Boxes16 aria-hidden="true" />}</button><div className="image-tools__group" role="radiogroup" aria-label="Canvas tool" onKeyDown={(event) => {if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;diff --git a/src/styles/image-editor.css b/src/styles/image-editor.cssindex 34da3bb..d29315b 100644--- a/src/styles/image-editor.css+++ b/src/styles/image-editor.css@@ -44,6 +44,7 @@.image-generator { width: 200px; max-width: 32%; }/* Editable: typed percentages up to "800%" plus the 32px drop-down button. */.image-zoom { width: 112px; min-width: 112px; }+.image-tools__spacer { flex: 1 1 auto; }.image-tools__separator { width: 1px; height: 20px; margin: 0 var(--space-1); background: var(--line); }.image-tools__group { display: inline-flex; gap: 2px; }/* 32px icon toggles; the checked tool is an accent-soft fill. */