Toasts, logo icons, shared table toolbar with search, and a density toggle

Feedback: toasts confirm common actions, and a page's error or success message
that appears out of view is also shown as a toast. Icons: the tab, app and
home-screen icons are the house from the logo; a dev instance gets a coloured dot
on its tab icon. Tables: Secrets, Admin Links, IP Addresses and Alerts share one
toolbar (search, filters, row count, actions, Export CSV); twelve more tables get
a multi-word search box; long tables keep their column headings in view on wide
screens. Density: Compact / Normal / Roomy in the user menu, remembered per
browser.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-14 23:39:19 +02:00
1 parent 7d56ad18b7
commit 617dc1ea2f
56 files changed
+757 -158

No files matched your search

+32 -32
View File
@@ -8,6 +8,8 @@ import { usePagination } from "../hooks/usePagination";
import Pagination from "../components/Pagination";
import { useSelection } from "../hooks/useSelection";
import { confirmDialog, promptDialog } from "../utils/dialogs";
import { ErrorNotice } from "../components/Notice";
import TableToolbar from "../components/TableToolbar";
const emptyForm: IpamInput = { ipAddress: "", label: "", vendor: "", location: "", notes: "" };
@@ -219,7 +221,7 @@ export default function Ipam({ user }: { user: CurrentUser }) {
return (
<>
<h2 className="page-title mb-3">IP Addresses</h2>
{error && <div className="alert alert-danger">{error}</div>}
<ErrorNotice error={error} />
{syncResult && <div className="alert alert-success">Synced from {syncResult}</div>}
<div className="card mb-3">
@@ -351,38 +353,36 @@ export default function Ipam({ user }: { user: CurrentUser }) {
)}
<div className="card">
<div className="card-header">
<div className="d-flex flex-wrap gap-2 align-items-center w-100">
<input
className="form-control"
style={{ maxWidth: 280 }}
placeholder="Search IP, label, vendor, location…"
value={search}
onChange={(e) => setSearch(e.target.value)}
/>
{canEdit && !showForm && (
<button className="btn btn-primary" onClick={startAdd}>
Add IP address
</button>
)}
{canEdit && (
<>
<button className="btn btn-outline-secondary" onClick={() => runSync("tailscale")} disabled={!!syncing}>
{syncing === "tailscale" ? "Syncing…" : "Sync from Tailscale"}
<TableToolbar
search={search}
onSearch={setSearch}
placeholder="Search IP, label, vendor, location…"
shown={filtered.length}
total={entries?.length}
actions={
<>
{canEdit && !showForm && (
<button className="btn btn-sm btn-primary" onClick={startAdd}>
Add IP address
</button>
<button className="btn btn-outline-secondary" onClick={() => runSync("proxmox")} disabled={!!syncing}>
{syncing === "proxmox" ? "Syncing…" : "Sync from Proxmox"}
</button>
<button className="btn btn-outline-secondary" onClick={() => runSync("phpipam")} disabled={!!syncing}>
{syncing === "phpipam" ? "Syncing…" : "Sync from phpIPAM"}
</button>
</>
)}
<button className="btn btn-outline-secondary ms-auto" onClick={exportCsv}>
Export CSV
</button>
</div>
</div>
)}
{canEdit && (
<>
<button className="btn btn-sm btn-outline-secondary" onClick={() => runSync("tailscale")} disabled={!!syncing}>
{syncing === "tailscale" ? "Syncing…" : "Sync from Tailscale"}
</button>
<button className="btn btn-sm btn-outline-secondary" onClick={() => runSync("proxmox")} disabled={!!syncing}>
{syncing === "proxmox" ? "Syncing…" : "Sync from Proxmox"}
</button>
<button className="btn btn-sm btn-outline-secondary" onClick={() => runSync("phpipam")} disabled={!!syncing}>
{syncing === "phpipam" ? "Syncing…" : "Sync from phpIPAM"}
</button>
</>
)}
</>
}
onExport={exportCsv}
/>
{canEdit && selection.count > 0 && (
<div className="card-header bg-blue-lt d-flex align-items-center gap-2">
<span>{selection.count} selected</span>