mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 21:46:35 +00:00
fix: update search flow - first tool search
This commit is contained in:
@@ -364,7 +364,7 @@
|
||||
✕
|
||||
</button>
|
||||
</header>
|
||||
<ToolSearch onSelect={(id) => applyChainTool(index, id)} />
|
||||
<ToolSearch onSelect={(id) => applyChainTool(index, id)} chainableOnly />
|
||||
</div>
|
||||
{:else if getTool(step.toolId)}
|
||||
{@const stepTool = getTool(step.toolId)!}
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
|
||||
interface Props {
|
||||
onSelect: (toolId: string) => void;
|
||||
/** true — только инструменты, пригодные в шаг цепочки (слот добавления шага). */
|
||||
chainableOnly?: boolean;
|
||||
}
|
||||
|
||||
let { onSelect }: Props = $props();
|
||||
let { onSelect, chainableOnly = false }: Props = $props();
|
||||
|
||||
const candidates = TOOLS.filter(isChainable);
|
||||
const candidates = chainableOnly ? TOOLS.filter(isChainable) : TOOLS;
|
||||
|
||||
let query = $state('');
|
||||
let activeIndex = $state(0);
|
||||
|
||||
Reference in New Issue
Block a user