refactor: change show mask flow - checkbox in params

This commit is contained in:
2026-08-24 06:02:32 +05:00
parent 306c26a360
commit 3a5acfbc45
3 changed files with 24 additions and 17 deletions
+6 -3
View File
@@ -39,6 +39,8 @@
const canChainBase = $derived(
(tool.resultType ?? 'image') === 'image' && tool.sourceMode !== 'text'
);
const hasMask = $derived(typeof tool.preview === 'function');
const shownBase = $derived(showMask && previewResult ? previewResult : result);
const hasFilledSteps = $derived(chain.some((step) => step.toolId !== ''));
function addChainStep() {
@@ -272,15 +274,14 @@
sourceLoaded={isSourceless ? true : !!source}
{status}
{result}
{previewResult}
bind:showMask
displayImage={shownBase}
{info}
{isInfo}
params={sanitized}
textResult={textResult}
onDownloadError={showError}
onChainToggle={canChainBase ? toggleChain : undefined}
hasChain={chain.length > 0}
onDownloadError={showError}
/>
</div>
</div>
@@ -292,6 +293,8 @@
bind:values
{pipetteTargetId}
onPipetteToggle={handlePipetteToggle}
hasMask={hasMask}
bind:showMask
/>
</div>
{/if}