diff --git a/frontend/src/lib/components/ArgInput.svelte b/frontend/src/lib/components/ArgInput.svelte index 62a6928880..854212e5d5 100644 --- a/frontend/src/lib/components/ArgInput.svelte +++ b/frontend/src/lib/components/ArgInput.svelte @@ -8,7 +8,7 @@ import type { SchemaProperty } from '$lib/common' import { setInputCat as computeInputCat } from '$lib/utils' - import { X } from 'lucide-svelte' + import { DollarSign, Pen, X } from 'lucide-svelte' import { createEventDispatcher } from 'svelte' import autosize from 'svelte-autosize' import Icon from 'svelte-awesome' @@ -28,6 +28,7 @@ import StringTypeNarrowing from './StringTypeNarrowing.svelte' import Toggle from './Toggle.svelte' import type VariableEditor from './VariableEditor.svelte' + import Popover from './Popover.svelte' export let label: string = '' export let value: any @@ -170,6 +171,8 @@ let redraw = 0 let itemsLimit = 50 + + let customValue = false @@ -361,18 +364,45 @@ /> {/if} {:else if inputCat == 'enum'} - +
+ {#if !customValue} + + {:else} + + {/if} + + {#if !disabled} + + {/if} +
{:else if inputCat == 'date'} {:else if inputCat == 'sql' || inputCat == 'yaml'} @@ -404,7 +434,7 @@ /> {:else if inputCat == 'string'}
-
+
{#if password} {:else} @@ -419,26 +449,24 @@ on:keydown={onKeyDown} type="text" {disabled} - class="col-span-10 {valid + class="w-full {valid ? '' : 'border border-red-700 border-opacity-30 focus:border-red-700 focus:border-opacity-30 bg-red-100'}" placeholder={defaultValue ?? ''} bind:value /> {#if itemPicker} -
- -
{ - pickForField = label - itemPicker?.openDrawer?.() - }} - title="Use Variable" - > - -
-
+ + {/if} {/if}
diff --git a/frontend/src/lib/components/apps/editor/AppEditor.svelte b/frontend/src/lib/components/apps/editor/AppEditor.svelte index c9cd1e1eea..ef4b74e765 100644 --- a/frontend/src/lib/components/apps/editor/AppEditor.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditor.svelte @@ -337,7 +337,7 @@ pickCallback={(path, _) => { $pickVariableCallback?.(path) }} - itemName="Variablo" + itemName="Variable" extraField="path" loadItems={async () => (await VariableService.listVariable({ workspace: $workspaceStore ?? '' })).map((x) => ({ diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte index 3887e7a1ca..17f7ffd89a 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte @@ -126,7 +126,7 @@ /> {#if !noVariablePicker} -
{ $pickVariableCallback = (variable) => { @@ -135,12 +135,10 @@ } } }} + title="Use a Variable" > - - - Insert a variable - -
+ + {/if}
{/if}