forked from unom/punktfunk
Web console - Pairing/Library/Stats refactored into self-contained subsections that each own their own queries + mutations; a shared slot-based layout (view.tsx) is filled by the live page (containers) and Storybook (pure cards + fixtures) so the layout can't drift. - All paired devices in one list on Pairing with a protocol column (punktfunk/1 + Moonlight), routing each unpair to the right endpoint; the redundant Clients page is removed. - Library: overview grid split from the add/edit form into separate files. - Login screen links out to the docs. Docs - "Console login password" section on every host page (apt/RPM/Bazzite/SteamOS/Windows) plus a new "Forgot your Password?" troubleshooting page, linked from the login screen. - Console served as HTTP/1.1 over TLS (drop the unusable HTTP/3 advertising) across the Bun entry, launchers, systemd units, and packaging. Tooling - Biome now respects .gitignore (stops linting generated code), config migrated to 2.5.1; all lint issues fixed cleanly. Also includes this branch's in-progress host, Apple client, packaging, and CI changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
84 lines
2.0 KiB
TypeScript
84 lines
2.0 KiB
TypeScript
import * as React from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const Table = React.forwardRef<
|
|
HTMLTableElement,
|
|
React.HTMLAttributes<HTMLTableElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<div className="relative w-full overflow-auto">
|
|
<table
|
|
ref={ref}
|
|
className={cn("w-full caption-bottom text-sm", className)}
|
|
{...props}
|
|
/>
|
|
</div>
|
|
));
|
|
Table.displayName = "Table";
|
|
|
|
const TableHeader = React.forwardRef<
|
|
HTMLTableSectionElement,
|
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
));
|
|
TableHeader.displayName = "TableHeader";
|
|
|
|
const TableBody = React.forwardRef<
|
|
HTMLTableSectionElement,
|
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<tbody
|
|
ref={ref}
|
|
className={cn("[&_tr:last-child]:border-0", className)}
|
|
{...props}
|
|
/>
|
|
));
|
|
TableBody.displayName = "TableBody";
|
|
|
|
const TableRow = React.forwardRef<
|
|
HTMLTableRowElement,
|
|
React.HTMLAttributes<HTMLTableRowElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<tr
|
|
ref={ref}
|
|
className={cn(
|
|
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
));
|
|
TableRow.displayName = "TableRow";
|
|
|
|
const TableHead = React.forwardRef<
|
|
HTMLTableCellElement,
|
|
React.ThHTMLAttributes<HTMLTableCellElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<th
|
|
ref={ref}
|
|
className={cn(
|
|
"h-10 px-card text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
));
|
|
TableHead.displayName = "TableHead";
|
|
|
|
const TableCell = React.forwardRef<
|
|
HTMLTableCellElement,
|
|
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<td
|
|
ref={ref}
|
|
className={cn(
|
|
"p-card py-2 align-middle [&:has([role=checkbox])]:pr-0",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
));
|
|
TableCell.displayName = "TableCell";
|
|
|
|
export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow };
|