mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 08:02:26 +00:00
c9ae5905a8
* feature(frontend): Flow rework WIP * feature(frontend): Right panel behavior done * feature(frontend): Split panel working * feature(frontend): Flows working * feature(frontend): Add inputs + adapt style + remove duplicate library * feature(frontend): remove old implementation * feature(frontend): revert package-lock * feature(frontend): revert old FlowBuilder component * feature(frontend): Fix margins + add remove button on the minimap * feature(frontend): Fix wording * feature(frontend): add PR UI comments * feature(frontend): Display the module title * feature(frontend): Previews working * feature(frontend): Fix schedule load + update * feature(frontend): fix build * feature(frontend): UI fix * fix just this step * feature(frontend): for loop iterator and skip failures * just this step * script helpers Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
37 lines
1.1 KiB
Svelte
37 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import { getContext } from 'svelte'
|
|
import FlowCard from '../common/FlowCard.svelte'
|
|
import { flowStateStore } from '../flowState'
|
|
import type { FlowEditorContext } from '../types'
|
|
import Toggle from '$lib/components/Toggle.svelte'
|
|
|
|
import SimpleEditor from '$lib/components/SimpleEditor.svelte'
|
|
|
|
const { selectedId } = getContext<FlowEditorContext>('FlowEditorContext')
|
|
|
|
const [prefix, index] = $selectedId.split('-')
|
|
</script>
|
|
|
|
<FlowCard title="For loop">
|
|
<div>
|
|
<div class="p-6 flex flex-col">
|
|
{#if $flowStateStore.modules[index].flowModule.value.type === 'forloopflow'}
|
|
<span class="mb-2 text-sm font-bold">Iterator expression</span>
|
|
<SimpleEditor
|
|
lang="javascript"
|
|
bind:code={$flowStateStore.modules[index].flowModule.value.iterator.expr}
|
|
class="few-lines-editor"
|
|
/>
|
|
<span class="mb-2 text-sm font-bold">Skip failures</span>
|
|
|
|
<Toggle
|
|
bind:checked={$flowStateStore.modules[index].flowModule.value.skip_failures}
|
|
options={{
|
|
right: 'Skip failures'
|
|
}}
|
|
/>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</FlowCard>
|