From 893a6908aa7443524ef360ddc2bae02a81e599c0 Mon Sep 17 00:00:00 2001 From: Faton Ramadani Date: Tue, 27 Sep 2022 17:52:02 +0200 Subject: [PATCH] fix(frontend): Hide the editor panel when we are editing a PathScript (#631) * fix(frontend): Hide the editor panel when we are editing a PathScript * feat(front): Remove viewCode action and display the code in the Editor panel --- .../flows/content/FlowModule.svelte | 3 ++ .../flows/content/FlowModuleHeader.svelte | 31 +------------------ .../flows/content/FlowModuleScript.svelte | 26 ++++++++++++++++ 3 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 frontend/src/lib/components/flows/content/FlowModuleScript.svelte diff --git a/frontend/src/lib/components/flows/content/FlowModule.svelte b/frontend/src/lib/components/flows/content/FlowModule.svelte index b070b2a358..3d572527d4 100644 --- a/frontend/src/lib/components/flows/content/FlowModule.svelte +++ b/frontend/src/lib/components/flows/content/FlowModule.svelte @@ -30,6 +30,7 @@ import type { FlowEditorContext } from '../types' import FlowModuleAdvancedSettings from './FlowModuleAdvancedSettings.svelte' import { loadSchemaFromModule } from '../utils' + import FlowModuleScript from './FlowModuleScript.svelte' const { selectedId, select } = getContext('FlowEditorContext') @@ -154,6 +155,8 @@ formatAction={() => reload(flowModule)} /> + {:else if flowModule.value.type === 'script'} + {/if} diff --git a/frontend/src/lib/components/flows/content/FlowModuleHeader.svelte b/frontend/src/lib/components/flows/content/FlowModuleHeader.svelte index ec9e2fdb00..2fd871bf20 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleHeader.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleHeader.svelte @@ -1,11 +1,8 @@ @@ -40,10 +22,6 @@ Fork - {/if} {#if module.value.type === 'rawscript' && !shouldPick} @@ -63,10 +41,3 @@ {$selectedId.includes('failure') ? 'Delete error handler' : 'Remove step'} - - -
Script {'path' in module?.value ? module?.value.path : ''}
-
- -
-
diff --git a/frontend/src/lib/components/flows/content/FlowModuleScript.svelte b/frontend/src/lib/components/flows/content/FlowModuleScript.svelte new file mode 100644 index 0000000000..a535e872ab --- /dev/null +++ b/frontend/src/lib/components/flows/content/FlowModuleScript.svelte @@ -0,0 +1,26 @@ + + +
+ +