feat: reactive tool flow, with debounce
This commit is contained in:
@@ -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">
|
||||
У этого инструмента нет параметров — результат уже готов.
|
||||
|
||||
Reference in New Issue
Block a user