diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte
index 2304daa092..1c7007d91d 100644
--- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte
+++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte
@@ -13,12 +13,16 @@
import InlineScriptEditor from './InlineScriptEditor.svelte'
import { computeFields } from './utils'
import { deepEqual } from 'fast-equals'
+ import { getContext } from 'svelte'
+ import type { AppViewerContext } from '../../types'
export let componentInput: AppInput | undefined
export let defaultUserInput = false
export let id: string
export let transformer: boolean
+ const { app } = getContext
('AppViewerContext')
+
async function fork(path: string) {
let { content, language, schema } = await getScriptByPath(path)
if (componentInput && componentInput.type == 'runnable') {
@@ -121,6 +125,7 @@
componentInput?.runnable?.type === 'runnableByName'
) {
componentInput.runnable.inlineScript = e.detail
+ $app = $app
}
}}
/>
@@ -139,6 +144,7 @@
componentInput.runnable?.type === 'runnableByPath'
) {
fork(componentInput.runnable.path)
+ $app = $app
}
}}
>
@@ -157,8 +163,10 @@
on:click={() => {
flowPath = componentInput?.['runnable']?.path
drawerFlowViewer.openDrawer()
- }}>Expand
+ Expand
+
+ Details page
+
@@ -159,7 +178,7 @@
{/if}
- {#if component.type === 'tabscomponent'}
-
- {:else if component.type === 'verticalsplitpanescomponent' || component.type === 'horizontalsplitpanescomponent'}
-
- {:else if component.type === 'tablecomponent' && Array.isArray(component.actionButtons)}
-
+ {#if componentSettings.item.data.type === 'tabscomponent'}
+
+ {:else if componentSettings.item.data.type === 'verticalsplitpanescomponent' || componentSettings.item.data.type === 'horizontalsplitpanescomponent'}
+
+ {:else if componentSettings.item.data.type === 'tablecomponent' && Array.isArray(componentSettings.item.data.actionButtons)}
+
{/if}
-
- {#if component.type === 'buttoncomponent' || component.type === 'formcomponent' || component.type === 'formbuttoncomponent'}
-
+
+ {#if componentSettings.item.data.type === 'buttoncomponent' || componentSettings.item.data.type === 'formcomponent' || componentSettings.item.data.type === 'formbuttoncomponent'}
+
{/if}
@@ -213,13 +235,13 @@
{#if viewCssOptions}
{#each Object.keys(ccomponents[component.type].customCss ?? {}) as name}
- {#if component?.customCss != undefined}
+ {#if componentSettings.item.data?.customCss != undefined}
{/if}
diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte
index 6ac8fd5a2a..d0b6649591 100644
--- a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte
+++ b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte
@@ -8,12 +8,10 @@
export let appInput: ResultAppInput
export let defaultUserInput = false
export let appComponent: AppComponent
-
- $: isRunnableSelected = isScriptByPathDefined(appInput) || isScriptByNameDefined(appInput)
-{#if isRunnableSelected}
+{#if isScriptByPathDefined(appInput) || isScriptByNameDefined(appInput)}
-{:else}
+{:else if appInput !== undefined}
{/if}