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

+21
View File
@@ -39,6 +39,7 @@ import {
import { api, type CurrentUser, type MaintenanceWindow } from "../api/client";
import { formatRemaining } from "../utils/duration";
import { getTheme, setTheme, type Theme } from "../utils/theme";
import { DENSITIES, getDensity, setDensity, type Density } from "../utils/density";
import CommandPalette from "../components/CommandPalette";
import { isLightColor, useEnvironment } from "../utils/environment";
import { alertBadge, useAlertsReport } from "../hooks/useAlertsReport";
@@ -178,6 +179,7 @@ function isCurrent(pathname: string, to: string): boolean {
export default function AppShell({ user, children }: { user: CurrentUser; children: ReactNode }) {
const [sidebarOpen, setSidebarOpen] = useState(false);
const [theme, setThemeState] = useState<Theme>(() => getTheme());
const [density, setDensityState] = useState<Density>(() => getDensity());
const [maintenance, setMaintenance] = useState<MaintenanceWindow[]>([]);
const environment = useEnvironment();
const { report } = useAlertsReport();
@@ -361,6 +363,25 @@ export default function AppShell({ user, children }: { user: CurrentUser; childr
<div className="navbar-footer px-3 user-menu" ref={menuRef}>
{menuOpen && (
<div className="user-menu-list" role="menu">
<div className="user-menu-density" role="group" aria-label="How tightly pages are packed">
<span className="small opacity-75">Density</span>
<div className="btn-group btn-group-sm w-100">
{DENSITIES.map((d) => (
<button
key={d.value}
type="button"
className={`btn ${density === d.value ? "active" : ""}`}
aria-pressed={density === d.value}
onClick={() => {
setDensity(d.value);
setDensityState(d.value);
}}
>
{d.label}
</button>
))}
</div>
</div>
<button type="button" className="user-menu-item" role="menuitem" onClick={toggleTheme}>
{theme === "dark" ? <IconSun size={16} /> : <IconMoon size={16} />}
{theme === "dark" ? "Light mode" : "Dark mode"}