Add auto-start functionality and related triggers for processes (#8478)

This commit is contained in:
Denis Bykhov
2025-04-07 11:06:58 +07:00
committed by GitHub
parent d2bdf88249
commit 507078d7ac
17 changed files with 116 additions and 6 deletions
@@ -29,6 +29,7 @@
IconDescription,
navigate,
NavItem,
ToggleWithLabel,
Scroller,
secondNavSeparators,
Separator,
@@ -77,6 +78,12 @@
}
}
async function saveAutoStart (e: CustomEvent<boolean>): Promise<void> {
if (value !== undefined) {
await client.update(value, { autoStart: e.detail })
}
}
async function addState (): Promise<void> {
if (value === undefined) return
const prevState = states[states.length - 1]
@@ -160,6 +167,13 @@
<EditBox bind:value={value.name} on:change={saveName} placeholder={process.string.Untitled} />
<ButtonIcon icon={IconDelete} size="small" kind="secondary" on:click={handleDelete} />
</div>
<div>
<ToggleWithLabel
on={value.autoStart ?? false}
on:change={saveAutoStart}
label={process.string.StartAutomatically}
/>
</div>
<div class="hulyComponent-content flex-col-center">
<div class="flex-col-center">
{#each sortedStates as state (state._id)}