diff --git a/webui/src/features/tasks/TasksPage.tsx b/webui/src/features/tasks/TasksPage.tsx
index 5eefe35..04b79aa 100644
--- a/webui/src/features/tasks/TasksPage.tsx
+++ b/webui/src/features/tasks/TasksPage.tsx
@@ -6,15 +6,12 @@ import {
ExternalLink,
ListChecks,
Plus,
- RefreshCw,
RotateCcw,
Search,
XCircle
} from "lucide-react";
import { Link } from "react-router";
-import { FormGrid, ToolbarGroup,
- ActionToolbar,
- AdminIconButton,
+import { FormGrid,
Button,
DateTimeField,
Dialog,
@@ -27,6 +24,7 @@ import { FormGrid, ToolbarGroup,
SelectionListItem,
StatePanel,
StatusBadge,
+ WorkspaceActionBar,
WorkspaceFrame,
WorkspaceLayout,
hasScope,
@@ -140,26 +138,24 @@ export default function TasksPage({ settings, auth }: { settings: ApiSettings; a
helpContextId="tasks.page.inbox"
helpModuleId="tasks"
primary={<>
-
- i18n:govoplan-tasks.work
-
- }
- onClick={() => void load()}
- disabled={loading || busy}
- />
- {canWrite ? (
- }
- onClick={() => setCreateOpen(true)}
- disabled={busy}
- helpContextId="tasks.action.create"
- />
- ) : null}
-
-
+ void load(), loading: loading || busy, label: "i18n:govoplan-tasks.refresh" }}
+ className="tasks-sidebar-bar"
+ contextActions={i18n:govoplan-tasks.work}
+ createAction={canWrite ? (
+
+ ) : undefined}
+ />
}
>
-
- {selected?.title ?? "i18n:govoplan-tasks.work_details"}
-
-
- {selected?.provider_id === "tasks.explicit" && canWrite ? action === "defer" ? setDeferOpen(true) : void runAction(action)} /> : null}
-
-
+ {selected?.title ?? "i18n:govoplan-tasks.work_details"}}
+ helpAction={}
+ primaryActions={selected?.provider_id === "tasks.explicit" && canWrite ? (
+ action === "defer" ? setDeferOpen(true) : void runAction(action)} />
+ ) : undefined}
+ destructiveActions={selected?.provider_id === "tasks.explicit" && canWrite && !["completed", "cancelled"].includes(selected.status) ? (
+
+ ) : undefined}
+ />
{error ? {error} : null}
{diagnostics.map((message) => {message})}
@@ -250,7 +253,7 @@ export default function TasksPage({ settings, auth }: { settings: ApiSettings; a
);
}
-function TaskActions({ item, busy, onAction }: { item: WorkItem; busy: boolean; onAction: (action: "start" | "complete" | "defer" | "reopen" | "cancel") => void }) {
+function TaskPrimaryActions({ item, busy, onAction }: { item: WorkItem; busy: boolean; onAction: (action: "start" | "complete" | "defer" | "reopen") => void }) {
if (["completed", "cancelled"].includes(item.status)) {
return ;
}
@@ -259,7 +262,6 @@ function TaskActions({ item, busy, onAction }: { item: WorkItem; busy: boolean;
{["open", "deferred"].includes(item.status) ? : null}
-
>
);
}