diff --git a/web/src/lib/modals/AddWorkflowStepModal.svelte b/web/src/lib/modals/AddWorkflowStepModal.svelte index 5ae2e6bfc0..5cf8231d49 100644 --- a/web/src/lib/modals/AddWorkflowStepModal.svelte +++ b/web/src/lib/modals/AddWorkflowStepModal.svelte @@ -1,6 +1,6 @@ - onClose()}> +{#snippet stepButton(title: string, description?: string, onclick?: () => void)} + + + {title} + {#if description} + {description} + {/if} + + +{/snippet} + + onClose()}> {#if filters.length > 0 && (!type || type === 'filter')} - - - - - Filters - {#each filters as filter (filter.id)} - handleSelect('filter', filter)} - class="flex items-start gap-3 p-3 rounded-lg border bg-light-100 hover:border-warning-500 dark:hover:border-warning-500 text-left" - > - - {filter.title} - {#if filter.description} - {filter.description} - {/if} - - + {@render stepButton(filter.title, filter.description, () => handleSelect('filter', filter))} {/each} {/if} {#if actions.length > 0 && (!type || type === 'action')} - - - - - - Actions - - - {#each actions as action (action.id)} - handleSelect('action', action)} - class="flex items-start gap-3 p-3 rounded-lg border bg-light-100 hover:border-success-500 dark:hover:border-success-500 text-left" - > - - {action.title} - {#if action.description} - {action.description} - {/if} - - - {/each} - + + {#each actions as action (action.id)} + {@render stepButton(action.title, action.description, () => handleSelect('action', action))} + {/each} {/if} diff --git a/web/src/routes/(user)/utilities/workflows/+page.svelte b/web/src/routes/(user)/utilities/workflows/+page.svelte index ea9126f3f5..ce57ae87ce 100644 --- a/web/src/routes/(user)/utilities/workflows/+page.svelte +++ b/web/src/routes/(user)/utilities/workflows/+page.svelte @@ -203,7 +203,7 @@ {#each workflows as workflow (workflow.id)} - + {$t('created_at')} {formatTimestamp(workflow.createdAt)}
{filter.title}
{filter.description}
{action.title}