feat: implement document actions for managing artboards, zoom, and history; update UI components to utilize new actions

This commit is contained in:
syntaxbullet
2026-07-11 11:26:27 +02:00
parent 1236b6dd2f
commit 53cf25c132
12 changed files with 168 additions and 59 deletions

View File

@@ -10,9 +10,10 @@ export type GenerateActionControlsProps = {
generation: GenerationState;
dispatch: AppStore["dispatch"];
workflow: GenerationWorkflow;
generate: () => Promise<void>;
};
export function GenerateActionControls({ settings, generation, dispatch, workflow }: GenerateActionControlsProps) {
export function GenerateActionControls({ settings, generation, dispatch, workflow, generate }: GenerateActionControlsProps) {
const job = currentGenerationJob(generation);
const busy = job?.status === "running";
const candidate = selectedCandidate(generation);
@@ -28,7 +29,7 @@ export function GenerateActionControls({ settings, generation, dispatch, workflo
className="h-12 rounded-full bg-white px-7 text-base font-semibold !text-black transition hover:bg-white/90 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/40 disabled:pointer-events-none disabled:opacity-35"
title={job?.status === "failed" ? job.error : preconditionMessage ?? "Generate with ComfyUI"}
onClick={() => {
void workflow.generate();
void generate();
}}
>
{busy && job?.kind === "generate" ? "Generating..." : "Generate"}