-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(frontend): split early stop + fix highlight code
- Loading branch information
1 parent
895fe10
commit e8f2d38
Showing
5 changed files
with
65 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts"> | ||
import Toggle from '$lib/components/Toggle.svelte' | ||
import type { FlowModule } from '$lib/gen' | ||
export let flowModule: FlowModule | ||
$: isSuspendEnabled = Boolean(flowModule.suspend) | ||
</script> | ||
|
||
<Toggle | ||
checked={isSuspendEnabled} | ||
on:change={() => { | ||
if (isSuspendEnabled && flowModule.suspend != undefined) { | ||
flowModule.suspend = undefined | ||
} else { | ||
flowModule.suspend = 1 | ||
} | ||
}} | ||
options={{ | ||
right: 'Suspend flow execution until events received' | ||
}} | ||
/> | ||
<span class="text-xs font-bold">Number of events to wait for</span> | ||
|
||
{#if flowModule.suspend} | ||
<input bind:value={flowModule.suspend} type="number" min="1" placeholder="1" /> | ||
{:else} | ||
<input type="number" disabled /> | ||
{/if} |