Add computer settings pages and restore workspace pages

This commit is contained in:
2026-10-19 13:30:02 +01:00
parent 7667f2bc2f
commit 7b1ccfeb62
36 changed files with 1082 additions and 131 deletions
@@ -1,3 +1,4 @@
import type { ReactNode } from "react";
import Row from "@moduletrace/twui/layout/Row";
import Stack from "@moduletrace/twui/layout/Stack";
import H1 from "@moduletrace/twui/layout/H1";
@@ -6,13 +7,21 @@ import Span from "@moduletrace/twui/layout/Span";
type Props = {
title: string;
description: string;
/**
* Controls at the end of the header, e.g. a settings link.
*/
action?: ReactNode;
};
/**
* Same 64px header as a conversation, so moving between bots and settings
* doesn't shift the page.
*/
export default function SettingsPaneHeader({ title, description }: Props) {
export default function SettingsPaneHeader({
title,
description,
action,
}: Props) {
return (
<Row className="h-16 shrink-0 gap-3! flex-nowrap items-center px-6 border-0 border-b border-solid border-hairline">
<Stack className="min-w-0 gap-0!">
@@ -23,6 +32,11 @@ export default function SettingsPaneHeader({ title, description }: Props) {
{description}
</Span>
</Stack>
{action ? (
<Row className="ml-auto shrink-0 gap-1! flex-nowrap justify-end">
{action}
</Row>
) : null}
</Row>
);
}