diff --git a/web/components/workflows/DualListBox.tsx b/web/components/workflows/DualListBox.tsx new file mode 100644 index 0000000..a1bbff3 --- /dev/null +++ b/web/components/workflows/DualListBox.tsx @@ -0,0 +1,152 @@ +"use client"; + +import { useMemo, useState } from "react"; + +/* + * A two-pane picker: everything available on the left, everything chosen on the + * right, moved across with the four buttons between them. + * + * The panes are divs rather than toggle(s.server_id)} /> - {s.hostname} - - ); - })} - {servers && servers.length === 0 &&

No servers registered.

} - + {servers && servers.length === 0 ? ( +

No servers registered.

+ ) : ( + ({ id: s.server_id, label: s.hostname, hint: s.status === "active" ? undefined : s.status }))} + selected={targets} + onChange={setTargets} + selectedLabel="Targets" + emptyAvailable="Every server is a target." + emptySelected="No servers targeted." + /> + )} +

Click to highlight, ctrl-click for several, double-click to move. Tag selectors are set on the workflow page.

{/* The schedule saves through its own endpoint, so it sits above the footer rather than under it — the footer's Save covers the