diff --git a/src/lib/components/ComfyApp.svelte b/src/lib/components/ComfyApp.svelte index ce9bd40..3f9970c 100644 --- a/src/lib/components/ComfyApp.svelte +++ b/src/lib/components/ComfyApp.svelte @@ -22,6 +22,7 @@ import ComfyUnlockUIButton from "./ComfyUnlockUIButton.svelte"; import ComfyGraphView from "./ComfyGraphView.svelte"; import { download } from "$lib/utils"; + import notify from "$lib/notify"; export let app: ComfyApp = undefined; let imageViewer: ImageViewer; @@ -141,7 +142,7 @@ return; app.saveStateToLocalStorage(); - toast.push("Saved to local storage.") + notify("Saved to local storage.") // // const date = new Date(); // const formattedDate = date.toISOString().replace(/:/g, '-').replace(/\.\d{3}/g, '').replace('T', '_').replace("Z", ""); @@ -165,7 +166,7 @@ $: if ($uiState.uiUnlocked && !hasShownUIHelpToast) { hasShownUIHelpToast = true; - toast.push("Right-click to open context menu.") + notify("Right-click to open context menu.") } if (debugLayout) { diff --git a/src/lib/components/ComfyApp.ts b/src/lib/components/ComfyApp.ts index 69cdcde..c2e9595 100644 --- a/src/lib/components/ComfyApp.ts +++ b/src/lib/components/ComfyApp.ts @@ -28,6 +28,7 @@ import { ComfyBackendNode } from "$lib/nodes/ComfyBackendNode"; import { get } from "svelte/store"; import uiState from "$lib/stores/uiState"; import { promptToGraphVis, workflowToGraphVis } from "$lib/utils"; +import notify from "$lib/notify"; export const COMFYBOX_SERIAL_VERSION = 1; @@ -601,11 +602,7 @@ export default class ComfyApp { } catch (error) { // this.ui.dialog.show(error.response || error.toString()); const mes = error.response || error.toString() - toast.push(`Error queuing prompt:\n${mes}`, { - theme: { - '--toastBackground': 'var(--color-red-500)', - } - }) + notify(`Error queuing prompt:\n${mes}`, null, "error") console.error(promptToGraphVis(p)) console.error("Error queuing prompt", mes, num, p) break; @@ -643,7 +640,7 @@ export default class ComfyApp { } else { console.error("No metadata found in image file.", pngInfo) - toast.push("No metadata found in image file.") + notify("No metadata found in image file.") } } } else if (file.type === "application/json" || file.name.endsWith(".json")) { diff --git a/src/lib/components/ComfyQueue.svelte b/src/lib/components/ComfyQueue.svelte index 291b082..0c627f2 100644 --- a/src/lib/components/ComfyQueue.svelte +++ b/src/lib/components/ComfyQueue.svelte @@ -1,15 +1,7 @@ +
+ {#if $queueState.runningNodeId || $queueState.progress} +
+ Node: {getNodeInfo($queueState.runningNodeId)} +
+
+ +
+ {/if} + {#if typeof $queueState.queueRemaining === "number" && $queueState.queueRemaining > 0} +
+
+ Queued prompts: {$queueState.queueRemaining}. +
+
+ {/if} +
Queue Prompt + app.refreshComboInNodes()}>🔄 + Load + + + diff --git a/src/mobile/routes/graph.svelte b/src/mobile/routes/graph.svelte index ca39002..b1c0fd0 100644 --- a/src/mobile/routes/graph.svelte +++ b/src/mobile/routes/graph.svelte @@ -7,7 +7,7 @@ import uiState from "$lib/stores/uiState" let app: ComfyApp | null = null; - let lCanvas: LGraphCanvas | null = null; + let lCanvas: ComfyGraphCanvas | null = null; let canvasEl: HTMLCanvasElement | null = null; $: if (!app) @@ -21,13 +21,14 @@ lCanvas.draw(true, true); } - $: if (app && canvasEl) { + $: if (app != null && canvasEl != null) { if (!lCanvas) { lCanvas = new ComfyGraphCanvas(app, canvasEl); lCanvas.allow_interaction = false; LiteGraph.dialog_close_on_mouse_leave = false; LiteGraph.search_hide_on_mouse_leave = false; LiteGraph.pointerevents_method = "pointer"; + app.lGraph.eventBus.on("afterExecute", () => lCanvas.draw(true)) } resizeCanvas(); } diff --git a/src/mobile/routes/subworkflow.svelte b/src/mobile/routes/subworkflow.svelte index 88840b8..5062983 100644 --- a/src/mobile/routes/subworkflow.svelte +++ b/src/mobile/routes/subworkflow.svelte @@ -1,26 +1,22 @@ -
Workflow!
+
-