mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-06 00:02:13 +00:00
nit closing flowgraph
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import { Wand2, Loader2 } from 'lucide-svelte'
|
||||
import SearchItems from '../SearchItems.svelte'
|
||||
import { emptyString } from '$lib/utils'
|
||||
import { onMount } from 'svelte'
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
|
||||
export let funcDesc: string
|
||||
export let trigger = false
|
||||
@@ -17,6 +17,8 @@
|
||||
export let filteredItems: (Script & { marked?: string })[] | (Item & { marked?: string })[] = []
|
||||
$: prefilteredItems = scripts ?? []
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
async function loadScripts(): Promise<void> {
|
||||
const loadedScripts = await ScriptService.listScripts({
|
||||
workspace: $workspaceStore!,
|
||||
@@ -53,6 +55,11 @@
|
||||
<input
|
||||
bind:this={input}
|
||||
type="text"
|
||||
on:keydown={(e) => {
|
||||
if (e.key === 'Escape') {
|
||||
dispatch('escape')
|
||||
}
|
||||
}}
|
||||
bind:value={funcDesc}
|
||||
placeholder="Search {trigger ? 'triggers' : 'scripts'} {disableAi ? '' : 'or AI gen'}"
|
||||
/>
|
||||
|
||||
@@ -95,7 +95,14 @@ shouldUsePortal={true} -->
|
||||
role="none"
|
||||
>
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<StepGenQuick {disableAi} on:insert bind:funcDesc {preFilter} {loading} />
|
||||
<StepGenQuick
|
||||
on:escape={() => close(null)}
|
||||
{disableAi}
|
||||
on:insert
|
||||
bind:funcDesc
|
||||
{preFilter}
|
||||
{loading}
|
||||
/>
|
||||
{#if selectedKind != 'preprocessor' && selectedKind != 'flow'}
|
||||
<ToggleHubWorkspaceQuick bind:selected={preFilter} />
|
||||
{/if}
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
{:else}
|
||||
<SvelteFlow
|
||||
on:paneclick={(e) => {
|
||||
window.dispatchEvent(new Event('focus'))
|
||||
document.dispatchEvent(new Event('focus'))
|
||||
}}
|
||||
{nodes}
|
||||
{edges}
|
||||
|
||||
Reference in New Issue
Block a user