From dc8f76080526789536fa240fcae1e266881d2c5d Mon Sep 17 00:00:00 2001 From: AlexRV12 <71396855+AlexRV12@users.noreply.github.com> Date: Thu, 3 Sep 2026 10:24:17 +0200 Subject: [PATCH] refactor: drop the job status icon props nothing passes --- .../lib/components/runs/JobStatusIcon.svelte | 60 +++++++------------ 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/frontend/src/lib/components/runs/JobStatusIcon.svelte b/frontend/src/lib/components/runs/JobStatusIcon.svelte index 0a99530609..5f93f8b6dd 100644 --- a/frontend/src/lib/components/runs/JobStatusIcon.svelte +++ b/frontend/src/lib/components/runs/JobStatusIcon.svelte @@ -18,43 +18,28 @@ job: Job isExternal?: boolean roundedFull?: boolean - /** Icon size in px, and the padding around it. Defaults are the runs page's; the chat's - * tool rows ask for a smaller one, since a 30px badge would set the height of a row of - * 11px text. */ - size?: number - badgeClass?: string } - let { - job, - isExternal = false, - roundedFull = false, - size = 14, - badgeClass = undefined - }: Props = $props() + let { job, isExternal = false, roundedFull = false }: Props = $props()
{#if isExternal} - - + + {:else if job.canceled && 'success' in job} - - + + {:else if 'success' in job && job.success} {#if job.is_skipped} - - + + {:else} - - + + {/if} {:else if 'success' in job && job.resolved} @@ -62,34 +47,29 @@ color="orange" {roundedFull} baseClass={roundedFull ? '' : '!px-1.5'} - class={badgeClass} title="Failed, marked as resolved" > - + {:else if 'success' in job} - - + + {:else if 'running' in job && job.running && job.suspend} - - + + {:else if 'running' in job && job.running} - - + + {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} - - + + {:else} - - + + {/if}