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

+7 -2
View File
@@ -9,6 +9,9 @@ import { usePagination } from "../hooks/usePagination";
import SortableTh from "../components/SortableTh";
import Pagination from "../components/Pagination";
import { confirmDialog } from "../utils/dialogs";
import { ErrorNotice } from "../components/Notice";
import { SearchBox } from "../components/TableToolbar";
import { useTableSearch } from "../hooks/useTableSearch";
function statusBadge(d: DomainRecord) {
switch (d.status) {
@@ -40,7 +43,8 @@ export default function Domains({ user }: { user: CurrentUser }) {
.catch((err) => setError(readableError(err)));
}, []);
const { sorted, sortKey, sortDir, requestSort } = useSortable(data?.domains, "expiresAt");
const tableSearch = useTableSearch(data?.domains);
const { sorted, sortKey, sortDir, requestSort } = useSortable(tableSearch.filtered, "expiresAt");
const { pageItems, page, setPage, pageCount, totalCount } = usePagination(sorted);
async function add(e: React.FormEvent) {
@@ -130,7 +134,7 @@ export default function Domains({ user }: { user: CurrentUser }) {
When each domain registration expires, read from the registry itself. Domains for the DNS zones you've added show up
here automatically; add any others by hand.
</div>
{error && <div className="alert alert-danger">{error}</div>}
<ErrorNotice error={error} />
{notice && <div className="alert alert-info">{notice}</div>}
{canEdit && (
@@ -158,6 +162,7 @@ export default function Domains({ user }: { user: CurrentUser }) {
<div className="card mb-3">
<div className="card-header">
<h3 className="card-title">Registrations</h3>
<SearchBox value={tableSearch.query} onChange={tableSearch.setQuery} className="ms-3" />
<div className="card-actions">
<button className="btn btn-sm btn-outline-secondary" onClick={exportCsv} disabled={!sorted || sorted.length === 0}>
Export CSV