From 12e4fbf14ee521036b27945825536292ead9c1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Wed, 15 Apr 2026 07:04:06 +0200 Subject: [PATCH] pipeline: batch controls move to queued column header --- src/features/pipeline/PipelinePage.tsx | 13 +------------ src/features/pipeline/QueueColumn.tsx | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/features/pipeline/PipelinePage.tsx b/src/features/pipeline/PipelinePage.tsx index 281ae75..d32a6b8 100644 --- a/src/features/pipeline/PipelinePage.tsx +++ b/src/features/pipeline/PipelinePage.tsx @@ -1,5 +1,4 @@ import { useCallback, useEffect, useRef, useState } from "react"; -import { Button } from "~/shared/components/ui/button"; import { api } from "~/shared/lib/api"; import type { PipelineData } from "~/shared/lib/types"; import { DoneColumn } from "./DoneColumn"; @@ -31,11 +30,6 @@ export function PipelinePage() { setLoading(false); }, []); - const startQueue = useCallback(async () => { - await api.post("/api/execute/start"); - load(); - }, [load]); - useEffect(() => { load(); }, [load]); @@ -88,12 +82,7 @@ export function PipelinePage() {

Pipeline

-
- {data.doneCount} files in desired state - -
+ {data.doneCount} files in desired state
diff --git a/src/features/pipeline/QueueColumn.tsx b/src/features/pipeline/QueueColumn.tsx index 1322afe..86588d8 100644 --- a/src/features/pipeline/QueueColumn.tsx +++ b/src/features/pipeline/QueueColumn.tsx @@ -10,23 +10,30 @@ interface QueueColumnProps { } export function QueueColumn({ items, jellyfinUrl, onMutate }: QueueColumnProps) { + const runAll = async () => { + await api.post("/api/execute/start"); + onMutate(); + }; const clear = async () => { if (!confirm(`Cancel all ${items.length} pending jobs?`)) return; await api.post("/api/execute/clear"); onMutate(); }; - const unapprove = async (itemId: number) => { await api.post(`/api/review/${itemId}/unapprove`); onMutate(); }; + const actions = + items.length > 0 + ? [ + { label: "Run all", onClick: runAll, primary: true }, + { label: "Clear", onClick: clear }, + ] + : undefined; + return ( - 0 ? [{ label: "Clear", onClick: clear }] : undefined} - > +
{items.map((item) => ( unapprove(item.item_id)} />