diff --git a/frontend/src/lib/components/FlowPreviewContent.svelte b/frontend/src/lib/components/FlowPreviewContent.svelte index 5d60d57475..b958de6c45 100644 --- a/frontend/src/lib/components/FlowPreviewContent.svelte +++ b/frontend/src/lib/components/FlowPreviewContent.svelte @@ -135,7 +135,8 @@ btnClasses="w-full max-w-lg" on:click={() => runPreview($previewArgs)} > - Test flow {getModifierKey()}+Enter + Test flow  {getModifierKey()} + {/if} Run  {getModifierKey()} + {/if} diff --git a/frontend/src/lib/components/ScriptEditor.svelte b/frontend/src/lib/components/ScriptEditor.svelte index 88519296a8..674bfbe464 100644 --- a/frontend/src/lib/components/ScriptEditor.svelte +++ b/frontend/src/lib/components/ScriptEditor.svelte @@ -2,7 +2,7 @@ import type { Schema } from '$lib/common' import { CompletedJob, Job, JobService } from '$lib/gen' import { userStore, workspaceStore } from '$lib/stores' - import { emptySchema, scriptLangToEditorLang } from '$lib/utils' + import { emptySchema, getModifierKey, scriptLangToEditorLang } from '$lib/utils' import { faPlay } from '@fortawesome/free-solid-svg-icons' import Editor from './Editor.svelte' import { inferArgs } from '$lib/infer' @@ -209,7 +209,8 @@ {#if testIsLoading} Running {:else} - Test CtrlEnter + Test {getModifierKey()} + {/if} {/if} diff --git a/frontend/src/lib/components/apps/components/helpers/HiddenComponent.svelte b/frontend/src/lib/components/apps/components/helpers/HiddenComponent.svelte index 47f57289fb..8b39e68b09 100644 --- a/frontend/src/lib/components/apps/components/helpers/HiddenComponent.svelte +++ b/frontend/src/lib/components/apps/components/helpers/HiddenComponent.svelte @@ -9,6 +9,7 @@ } from '../../inputType' import type { AppViewerContext, InlineScript } from '../../types' import RunnableComponent from './RunnableComponent.svelte' + import InitializeComponent from './InitializeComponent.svelte' export let id: string export let name: string @@ -34,21 +35,25 @@ }) - - - +{#if inlineScript} + + + +{:else} + +{/if} diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte index 93bcb0a8eb..5b9bed53af 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte @@ -19,6 +19,7 @@ export let name: string export let componentType: string | undefined = undefined + export let cancelable = true let tab = 'inlinescripts' let filter: string = '' @@ -146,21 +147,24 @@ - + {#if cancelable} + + {/if} diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte index 877c6b77b6..dc34ba2c95 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte @@ -3,7 +3,7 @@ import type { Preview } from '$lib/gen' import { createEventDispatcher, getContext, onMount } from 'svelte' import type { AppViewerContext, CancelablePromise, InlineScript } from '../../types' - import { CornerDownLeft, Loader2, Maximize2, Trash2 } from 'lucide-svelte' + import { Loader2, Maximize2, Trash2 } from 'lucide-svelte' import InlineScriptEditorDrawer from './InlineScriptEditorDrawer.svelte' import { inferArgs } from '$lib/infer' import type { Schema } from '$lib/common' @@ -161,9 +161,9 @@
Format -
- {getModifierKey()} - S +
+ {getModifierKey()} + S
@@ -189,13 +189,9 @@
Run -
- {getModifierKey()} - -
- -
-
+
+ {getModifierKey()} +
diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte index 8677fdda48..5e72d41d31 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte @@ -87,6 +87,7 @@ $app.hiddenInlineScripts[hiddenInlineScript].inlineScript = e.detail } }} + cancelable={false} /> {/if} {/key} diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte index 90f0f28e36..67e16cf76d 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte @@ -60,7 +60,6 @@
-
Inline scripts
{#if runnables.inline.length > 0}
@@ -93,6 +92,32 @@ {/each}
{/if} + {#each runnables.imported as { name, id, transformer }, index (index)} + + {#if transformer} +
+ +
+ {/if} + {/each} + {#if $app.unusedInlineScripts?.length > 0}
{#each $app.unusedInlineScripts as unusedInlineScript, index (index)} @@ -110,49 +135,14 @@
{/if} {#if runnables.inline.length == 0 && $app.unusedInlineScripts?.length == 0} -
No inline scripts
- {/if} -
-
- -
-
Workspace/Hub
-
- {#if runnables.imported.length > 0} - {#each runnables.imported as { name, id, transformer }, index (index)} - - {#if transformer} -
- -
- {/if} - {/each} - {:else} -
No imported scripts/flows
+
No scripts/flows
{/if}
-
+
Background scripts Background scripts are triggered upon global refresh or when their input changes. The diff --git a/frontend/src/routes/(root)/(logged)/flows/run/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/flows/run/[...path]/+page.svelte index e65a86a084..f73a26c6cf 100644 --- a/frontend/src/routes/(root)/(logged)/flows/run/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/flows/run/[...path]/+page.svelte @@ -133,7 +133,8 @@ startIcon={{ icon: faPlay }} disabled={runForm == undefined || !isValid} on:click={() => runForm?.run()} - >Run {getModifierKey()}+EnterRun  {getModifierKey()} +
diff --git a/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte b/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte index 6e4dfe1f5d..08345bc49d 100644 --- a/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte @@ -166,7 +166,8 @@ disabled={runForm == undefined || !isValid} on:click={() => runForm?.run()} > - Run {getModifierKey()}+Enter + Run  {getModifierKey()} +