Files
windmill/frontend/src/lib/components/flows/content/FlowLoop.svelte
T
Faton Ramadani c9ae5905a8 feat(frontend): Flow UX entire rework (#552)
* 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>
2022-09-14 12:34:51 +02:00

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>