From 3b9017dfadd08d7f0b9ab906f97d2384d8dddb03 Mon Sep 17 00:00:00 2001
From: space-nuko <24979496+space-nuko@users.noreply.github.com>
Date: Sat, 20 May 2023 15:42:43 -0500
Subject: [PATCH] Actual loading screen
---
src/lib/components/ComfyApp.svelte | 479 +-----------------
src/lib/components/ComfyApp.ts | 11 +
src/lib/components/ComfyWorkflowsView.svelte | 484 +++++++++++++++++++
src/lib/components/SidebarItem.svelte | 13 +-
4 files changed, 528 insertions(+), 459 deletions(-)
create mode 100644 src/lib/components/ComfyWorkflowsView.svelte
diff --git a/src/lib/components/ComfyApp.svelte b/src/lib/components/ComfyApp.svelte
index 83bc0ef..9da5eb7 100644
--- a/src/lib/components/ComfyApp.svelte
+++ b/src/lib/components/ComfyApp.svelte
@@ -1,46 +1,22 @@
@@ -214,312 +58,39 @@
{/if}
- ($a1111Prompt = null)}>
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- txt2img
-
-
-
- img2img
-
-
-
- asdflkj
-
-
-
- asdkajw
-
-
-
-
-
-
- {#if $layoutState.attrs.queuePromptButtonName != ""}
-
- {/if}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- UI Edit mode
-
-
-
- Theme
-
-
-
-
-
-
-
-
-
+
-
diff --git a/src/lib/components/ComfyApp.ts b/src/lib/components/ComfyApp.ts
index d49fbe2..ebf3381 100644
--- a/src/lib/components/ComfyApp.ts
+++ b/src/lib/components/ComfyApp.ts
@@ -128,6 +128,17 @@ type BackendComboNode = {
backendNode: ComfyBackendNode
}
+type CanvasState = {
+ canvasEl: HTMLCanvasElement,
+ canvasCtx: CanvasRenderingContext2D,
+ canvas: ComfyGraphCanvas,
+}
+
+type WorkflowState = {
+ title: string,
+ graph: ComfyGraph,
+}
+
export default class ComfyApp {
api: ComfyAPI;
rootEl: HTMLDivElement | null = null;
diff --git a/src/lib/components/ComfyWorkflowsView.svelte b/src/lib/components/ComfyWorkflowsView.svelte
new file mode 100644
index 0000000..ed6dcbc
--- /dev/null
+++ b/src/lib/components/ComfyWorkflowsView.svelte
@@ -0,0 +1,484 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ txt2img
+
+
+
+ img2img
+
+
+
+ asdflkj
+
+
+
+ asdkajw
+
+
+
+
+
+
+ {#if $layoutState.attrs.queuePromptButtonName != ""}
+
+ {/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UI Edit mode
+
+
+
+ Theme
+
+
+
+
+
+
+
+
+
+
+
+{#if appSetupPromise}
+ {#await appSetupPromise}
+
+ Loading...
+
+ {:catch error}
+
+
+ Error loading app
+
+
{error}
+
+ {/await}
+{/if}
+
+
diff --git a/src/lib/components/SidebarItem.svelte b/src/lib/components/SidebarItem.svelte
index 40246e3..9c71fa4 100644
--- a/src/lib/components/SidebarItem.svelte
+++ b/src/lib/components/SidebarItem.svelte
@@ -28,18 +28,21 @@