From 6bbd18a261916acecdda7490d7ae23eafe860732 Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Wed, 24 May 2023 09:26:18 -0500 Subject: [PATCH] Hide output sends if no images --- src/lib/ComfyBoxTemplate.ts | 8 +++---- src/lib/components/PromptDisplay.svelte | 28 +++++++++++++------------ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/lib/ComfyBoxTemplate.ts b/src/lib/ComfyBoxTemplate.ts index 5210b00..c9ba0e8 100644 --- a/src/lib/ComfyBoxTemplate.ts +++ b/src/lib/ComfyBoxTemplate.ts @@ -6,8 +6,8 @@ import C2S from "canvas-to-svg"; import { download } from "./utils"; /* - * InComfyBox a template contains a subgraph and the set of components it - * represents in the UI. + * In ComfyBox a template contains a subset of nodes in the graph and the set of + * components they represent in the UI. */ export type ComfyBoxTemplate = { nodes: LGraphNode[], @@ -16,8 +16,8 @@ export type ComfyBoxTemplate = { } /* - * InComfyBox a template contains a subgraph and the set of components it - * represents in the UI. + * In ComfyBox a template contains a subset of nodes in the graph and the set of + * components they represent in the UI. */ export type SerializedComfyBoxTemplate = { /* diff --git a/src/lib/components/PromptDisplay.svelte b/src/lib/components/PromptDisplay.svelte index 5c0f7f0..dec22d9 100644 --- a/src/lib/components/PromptDisplay.svelte +++ b/src/lib/components/PromptDisplay.svelte @@ -128,7 +128,7 @@
- +
{#each Object.entries(prompt) as [nodeID, inputs], i} @@ -180,18 +180,20 @@
- - - - Output type: {litegraphType} - {#if receiveTargets.length > 0} - sendOutput(e.detail.workflow, e.detail.targetNode)} /> - {:else} -
No receive output targets found across all workflows.
- {/if} -
-
-
+ {#if comfyBoxImages.length > 0} + + + + Output type: {litegraphType} + {#if receiveTargets.length > 0} + sendOutput(e.detail.workflow, e.detail.targetNode)} /> + {:else} +
No receive output targets found across all workflows.
+ {/if} +
+
+
+ {/if}
{#if images.length > 0}