Adds a pink/purple/blue SVG brand mark (favicon + header) and reworks the visual language around the app's actual interaction - fader-driven device control - via LED-style indicators, mono instrument readouts, hairline-framed cards, console-tab nav, and an oscilloscope-style session timeline. Leaves components/ui/* untouched, restyling only via design tokens and the app's own composed components. Also fixes a proxy.ts matcher gap that was gating /icon.svg behind auth. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W8WkFF5ppURBAB918593Eb
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
|
|
|
export interface DeviceUsageRow {
|
|
deviceId: number;
|
|
displayName: string | null;
|
|
bleName: string;
|
|
sessionCount: number;
|
|
totalActiveMs: number;
|
|
commandCount: number;
|
|
lastUsedAt: number | null;
|
|
}
|
|
|
|
export function DeviceUsageTable({ devices }: { devices: DeviceUsageRow[] }) {
|
|
if (devices.length === 0) {
|
|
return <p className="text-sm text-muted-foreground">No device activity yet.</p>;
|
|
}
|
|
|
|
return (
|
|
<Table>
|
|
<TableHeader>
|
|
<TableRow>
|
|
<TableHead>Device</TableHead>
|
|
<TableHead>Sessions</TableHead>
|
|
<TableHead>Active time</TableHead>
|
|
<TableHead>Commands</TableHead>
|
|
<TableHead>Last used</TableHead>
|
|
</TableRow>
|
|
</TableHeader>
|
|
<TableBody>
|
|
{devices.map((d) => (
|
|
<TableRow key={d.deviceId}>
|
|
<TableCell className="font-medium">{d.displayName ?? d.bleName}</TableCell>
|
|
<TableCell className="bp-readout">{d.sessionCount}</TableCell>
|
|
<TableCell className="bp-readout">{(d.totalActiveMs / 60_000).toFixed(1)}m</TableCell>
|
|
<TableCell className="bp-readout">{d.commandCount}</TableCell>
|
|
<TableCell className="bp-readout text-muted-foreground">
|
|
{d.lastUsedAt ? new Date(d.lastUsedAt).toLocaleString() : "Never"}
|
|
</TableCell>
|
|
</TableRow>
|
|
))}
|
|
</TableBody>
|
|
</Table>
|
|
);
|
|
}
|