From 148e4b195739774c5e892dbfd16f5a83617b93dc Mon Sep 17 00:00:00 2001 From: Ku6epXBOCTuK Date: Tue, 25 Aug 2026 15:48:16 +0500 Subject: [PATCH] feat: inline tool page - parameters beetween source and result images --- web/src/lib/components/ToolPage.svelte | 4 +- .../components/stage/ToolStageInline.svelte | 208 ++++++++++++++++++ 2 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 web/src/lib/components/stage/ToolStageInline.svelte diff --git a/web/src/lib/components/ToolPage.svelte b/web/src/lib/components/ToolPage.svelte index 3b41797..67dc3be 100644 --- a/web/src/lib/components/ToolPage.svelte +++ b/web/src/lib/components/ToolPage.svelte @@ -15,7 +15,7 @@ import { t } from '$lib/i18n/t'; import { toolDescription, toolTitle } from '$lib/i18n/tool-strings'; import type { StageStatus } from './stage/stage-props'; - import ToolStageClassic from './stage/ToolStageClassic.svelte'; + import ToolStageInline from './stage/ToolStageInline.svelte'; let { tool, restoreChain = false }: { tool: ToolEntry; restoreChain?: boolean } = $props(); @@ -265,7 +265,7 @@ {/if} - + import { t } from '$lib/i18n/t'; + import ParamsCard from '../tool/ParamsCard.svelte'; + import ResultCard from '../tool/ResultCard.svelte'; + import SourceCard from '../tool/SourceCard.svelte'; + import TextInputCard from '../tool/TextInputCard.svelte'; + import type { StageProps } from './stage-props'; + + let { + tool, + source, + result, + displayImage, + info, + status, + isInfo, + isSourceless, + isTextSource, + textResult, + sanitized, + canChainBase, + hasChain, + hasMask, + showMask = $bindable(false), + values = $bindable(), + pipetteTargetId, + handleFile, + onTextSubmit, + onSourceError, + reset, + toggleChain, + handlePipetteToggle, + handlePickColor, + showError + }: StageProps = $props(); + + const showParams = $derived( + (source !== null || isSourceless) && !isInfo && (tool.params.length > 0 || hasMask) + ); + + +
+ {#if !isSourceless} +
+ +
+ {#if isTextSource && !source} + + {:else} + + {/if} +
+
+ {/if} + + {#if showParams} +
+ +
+ +
+
+ {/if} + +
+ +
+ +
+
+
+ +