D2: simplify JobErrorLine — optional props, no retrying state, no icon
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
job: Job;
|
job: Job;
|
||||||
accentColor: string;
|
accentColor: string;
|
||||||
onRetry?: (jobId: string) => void;
|
onRetry?: (jobId: string) => void;
|
||||||
onDelete?: () => void;
|
onDelete?: (jobId: string) => void;
|
||||||
retryLabel?: string;
|
retryLabel?: string;
|
||||||
deleteLabel?: string;
|
deleteLabel?: string;
|
||||||
}
|
}
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<button class="retry-btn" onclick={handleRetry} aria-label={retryLabel}>{retryLabel}</button>
|
<button class="retry-btn" onclick={handleRetry} aria-label={retryLabel}>{retryLabel}</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if onDelete}
|
{#if onDelete}
|
||||||
<button class="delete-btn" onclick={onDelete} aria-label={deleteLabel}>{deleteLabel}</button>
|
<button class="delete-btn" onclick={(e) => { e.preventDefault(); e.stopPropagation(); onDelete?.(job.id); }} aria-label={deleteLabel}>{deleteLabel}</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{:else if job.status === 'cancelled'}
|
{:else if job.status === 'cancelled'}
|
||||||
|
|||||||
Reference in New Issue
Block a user