fix import script from hub

This commit is contained in:
Ruben Fiszel
2022-10-21 19:38:33 +02:00
parent 8c2bc1a00b
commit 26cd5ec6f2
3 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -538,7 +538,7 @@ pub struct HubScript {
pub content: String,
pub lockfile: Option<String>,
pub language: ScriptLang,
pub schema: Option<String>,
pub schema: Option<serde_json::Value>,
}
pub async fn get_full_hub_script_by_path(
@@ -8,6 +8,8 @@
import PickScript from '../pickers/PickScript.svelte'
export let shouldDisableTriggerScripts: boolean = false
export let shouldDisableLoopCreation: boolean = false
export let failureModule: boolean
const dispatch = createEventDispatcher()
@@ -103,15 +105,17 @@
/>
</div>
<div class="text-sm font-bold">Flow primitive</div>
{#if !shouldDisableTriggerScripts}
<div class="text-sm font-bold">Flow primitive</div>
<div class="grid sm:grid-col-1 md:grid-col-2 lg:grid-cols-3 gap-4">
<FlowScriptPicker
label={`Create a for-loop`}
icon={faRepeat}
iconColor="text-blue-500"
on:click={() => dispatch('loop')}
/>
</div>
<div class="grid sm:grid-col-1 md:grid-col-2 lg:grid-cols-3 gap-4">
<FlowScriptPicker
label={`Create a for-loop`}
icon={faRepeat}
iconColor="text-blue-500"
on:click={() => dispatch('loop')}
/>
</div>
{/if}
{/if}
</div>
@@ -137,9 +137,7 @@
{#if shouldPick}
<FlowInputs
shouldDisableTriggerScripts={parentIndex != 0}
shouldDisableLoopCreation={childIndex !== undefined ||
parentIndex === 0 ||
$selectedId.includes('failure')}
shouldDisableLoopCreation={childIndex !== undefined || $selectedId.includes('failure')}
on:loop={() => {
applyCreateLoop()
select(['loop', $selectedId].join('-'))