diff --git a/frontend/src/lib/components/EditorBar.svelte b/frontend/src/lib/components/EditorBar.svelte index 2d3646f0f6..2df3910a97 100644 --- a/frontend/src/lib/components/EditorBar.svelte +++ b/frontend/src/lib/components/EditorBar.svelte @@ -2,11 +2,10 @@ import { ResourceService, ScriptService, VariableService } from '$lib/gen' import { getScriptByPath, loadHubScripts, sendUserToast } from '$lib/utils' - import { faSearch } from '@fortawesome/free-solid-svg-icons' + import { faCode, faCube, faFile, faRotate, faRotateLeft } from '@fortawesome/free-solid-svg-icons' import Icon from 'svelte-awesome' import { hubScripts, workspaceStore } from '$lib/stores' - import { Button } from 'flowbite-svelte' import { Highlight } from 'svelte-highlight' import { python, typescript } from 'svelte-highlight/languages' import type Editor from './Editor.svelte' @@ -170,55 +169,69 @@ - -
-
- - - +
+
+ + + Insert resource + +
- + + Search script +
-
- +
+
+ - +
diff --git a/frontend/src/lib/components/FlowBuilder.svelte b/frontend/src/lib/components/FlowBuilder.svelte index 2100853090..8897e340c0 100644 --- a/frontend/src/lib/components/FlowBuilder.svelte +++ b/frontend/src/lib/components/FlowBuilder.svelte @@ -16,7 +16,7 @@ import { onDestroy, onMount } from 'svelte' import Icon from 'svelte-awesome' import { OFFSET } from './CronInput.svelte' - import Drawer from './Drawer.svelte' + import Drawer from './common/drawer/Drawer.svelte' import FlowEditor from './FlowEditor.svelte' import FlowPreviewContent from './FlowPreviewContent.svelte' import { flowStateStore, flowStateToFlow, type FlowState } from './flows/flowState' diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte index c1152c9d67..e399ea3ebe 100644 --- a/frontend/src/lib/components/ScriptBuilder.svelte +++ b/frontend/src/lib/components/ScriptBuilder.svelte @@ -20,10 +20,10 @@ import Required from './Required.svelte' import ScriptEditor from './ScriptEditor.svelte' import ScriptSchema from './ScriptSchema.svelte' + import CenteredPage from './CenteredPage.svelte' let editor: ScriptEditor let scriptSchema: ScriptSchema - $: step = Number($page.url.searchParams.get('step')) || 1 export let script: Script export let initialPath: string = '' @@ -32,7 +32,7 @@ let pathError = '' $: setQueryWithoutLoad($page.url, 'state', encodeState(script)) - + $: step = Number($page.url.searchParams.get('step')) || 1 $: { if (script.language == 'python3') { script.is_trigger = false @@ -103,11 +103,11 @@ }) -
+
-
-
-
+
+
+
+ Next + {:else} {/if} @@ -151,8 +153,10 @@ class="default-button-secondary px-6 max-h-8 mr-2" on:click={async () => { changeStep(step - 1) - }}>Back + Back + {/if} {#if step == 2} + Save (commit) + {/if}
-
- - sync from github instead - - - {#if script.hash != ''} Editing from {script.hash} with path{/if} - {#if initialPath && initialPath != script.path} {initialPath} → {/if} - {script.path} - -
{#if step === 1} -
- changeStep(2)} - namePlaceholder="my_script" - kind="script" - > -
- Script permissions depend on their path. Select the group all - to share your script, and user to keep it private. - docs -
-
-

Language

-
- initContent(e.detail, template)} - bind:value={script.language} - /> -
- {#if script.language == 'deno'} -

Template

- + +
+ changeStep(2)} + namePlaceholder="my_script" + kind="script" + > +
+ Script permissions depend on their path. Select the group + all + to share your script, and user to keep it private. + docs +
+
+

Language

initContent(script.language, e.detail)} - bind:value={template} + on:change={(e) => initContent(e.detail, template)} + bind:value={script.language} />
- {/if} + {#if script.language == 'deno'} +

Template

-

Metadata

+
+ initContent(script.language, e.detail)} + bind:value={template} + /> +
+ {/if} -