feat: reactive tool flow, with debounce

This commit is contained in:
2026-08-22 21:06:50 +05:00
parent 5560435b55
commit d0ee4ec77f
3 changed files with 36 additions and 14 deletions
@@ -1,23 +1,19 @@
<script lang="ts">
import type { ParamDef } from '$lib/registry';
import ParamForm from '../ParamForm.svelte';
import Button from '../ui/Button.svelte';
import type { ParamDef } from '$lib/registry';
interface Props {
params: ParamDef[];
values: Record<string, any>;
busy: boolean;
onApply: () => void;
}
let { params, values = $bindable(), busy, onApply }: Props = $props();
let { params, values = $bindable() }: Props = $props();
</script>
<div class="panel root">
<h2 class="heading-section">Параметры</h2>
{#if params.length > 0}
<ParamForm {params} bind:values />
<Button onclick={onApply} {busy} busyText="Обработка…" fullWidth>Применить</Button>
{:else}
<p class="hint text-caption text-muted">
У этого инструмента нет параметров — результат уже готов.