fix(frontend): background script not showing inputs
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import PanelSection from './settingsPanel/common/PanelSection.svelte'
|
||||
import InputsSpecsEditor from './settingsPanel/InputsSpecsEditor.svelte'
|
||||
|
||||
const { selectedComponent, app } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { selectedComponent, app, stateId } = getContext<AppEditorContext>('AppEditorContext')
|
||||
</script>
|
||||
|
||||
{#if $app.grid}
|
||||
@@ -21,12 +21,14 @@
|
||||
{#each $app?.hiddenInlineScripts ?? [] as script, index (script.name)}
|
||||
{#if $selectedComponent === `bg_${index}`}
|
||||
<PanelSection title={`Background script inputs`}>
|
||||
<InputsSpecsEditor
|
||||
id={`bg_${index}`}
|
||||
shouldCapitalize={false}
|
||||
bind:inputSpecs={script.fields}
|
||||
userInputEnabled={false}
|
||||
/>
|
||||
{#key $stateId}
|
||||
<InputsSpecsEditor
|
||||
id={`bg_${index}`}
|
||||
shouldCapitalize={false}
|
||||
bind:inputSpecs={script.fields}
|
||||
userInputEnabled={false}
|
||||
/>
|
||||
{/key}
|
||||
</PanelSection>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
emptySchema()
|
||||
)
|
||||
}
|
||||
if (inlineScript.schema) {
|
||||
loadSchemaAndInputsByName()
|
||||
}
|
||||
})
|
||||
const dispatch = createEventDispatcher()
|
||||
let runLoading = false
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
id={`bg_${index}`}
|
||||
bind:inlineScript={hiddenInlineScript.inlineScript}
|
||||
bind:name={hiddenInlineScript.name}
|
||||
bind:fields={hiddenInlineScript.fields}
|
||||
syncFields
|
||||
on:delete={() => {
|
||||
// remove the script from the array at the index
|
||||
$app.hiddenInlineScripts.splice(index, 1)
|
||||
|
||||
Reference in New Issue
Block a user