From 4d11553a6b06278aa3f1e211e6ce09dd5406fa8d Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 15 Jul 2026 18:54:47 -0400 Subject: [PATCH] refac --- .../components/admin/Settings/Images.svelte | 165 +++++++----------- 1 file changed, 67 insertions(+), 98 deletions(-) diff --git a/src/lib/components/admin/Settings/Images.svelte b/src/lib/components/admin/Settings/Images.svelte index f8cd179ca5..1170855888 100644 --- a/src/lib/components/admin/Settings/Images.svelte +++ b/src/lib/components/admin/Settings/Images.svelte @@ -26,7 +26,7 @@ const dispatch = createEventDispatcher(); - const i18n = getContext('i18n'); + const i18n: any = getContext('i18n'); let loading = false; @@ -616,16 +616,11 @@ {#if config.COMFYUI_WORKFLOW} -
-
-
-
- {$i18n.t('ComfyUI Workflow Nodes')} -
-
-
- -
+ +
{#each REQUIRED_WORKFLOW_NODES as node}
@@ -638,7 +633,7 @@
@@ -668,7 +663,7 @@
{$i18n.t('*Prompt node ID(s) are required for image generation')}
-
+ {/if} {:else if config?.IMAGE_GENERATION_ENGINE === 'gemini'} - + />
{/if} @@ -796,35 +791,35 @@ placeholder={$i18n.t('Enter URL (e.g. http://127.0.0.1:7860/)')} bind:value={config.IMAGES_EDIT_COMFYUI_BASE_URL} /> - + + +
@@ -855,12 +850,14 @@ e.target.value = null; }; - reader.readAsText(file); - }} - /> + reader.readAsText(file); + }} + />
{#if config.IMAGES_EDIT_COMFYUI_WORKFLOW} @@ -906,16 +903,11 @@
{#if config.IMAGES_EDIT_COMFYUI_WORKFLOW} -
-
-
-
- {$i18n.t('ComfyUI Workflow Nodes')} -
-
-
- -
+ +
{#each REQUIRED_EDIT_WORKFLOW_NODES as node}
@@ -928,7 +920,7 @@
@@ -958,49 +950,26 @@
{$i18n.t('*Prompt node ID(s) are required for image generation')}
-
+ {/if} {:else if config?.IMAGE_EDIT_ENGINE === 'gemini'} -
-
-
-
- {$i18n.t('Gemini Base URL')} -
-
+
+ + + -
-
- -
-
-
-
- -
-
-
-
- {$i18n.t('Gemini API Key')} -
-
- -
-
- -
-
-
+ + +
{/if}