tabs to left at breakpoint

This commit is contained in:
Nate 2025-08-12 20:48:23 -04:00
parent 8eca6d3cf5
commit 099ed2ba25

View file

@ -128,24 +128,28 @@ function ConfigPage() {
];
return (
<div className="flex h-full flex-col overflow-y-auto">
<div className="bg-vsc-background sticky top-0 z-10">
<PageHeader
showBorder
onTitleClick={() => navigate("/")}
title="Chat"
rightContent={<AccountButton />}
/>
<div className="flex h-full flex-col overflow-y-auto lg:flex-row">
{/* Header and tabs section */}
<div className="bg-vsc-background lg:bg-transparent lg:w-48 lg:flex-shrink-0">
{/* Header - only show on mobile/tablet */}
<div className="lg:hidden">
<PageHeader
showBorder
onTitleClick={() => navigate("/")}
title="Chat"
rightContent={<AccountButton />}
/>
</div>
{/* Tab Headers */}
<div className="bg-vsc-input-background flex cursor-pointer flex-wrap justify-center gap-x-2 gap-y-1 border-0 border-b-[1px] border-solid border-b-zinc-700 p-0.5">
<div className="bg-vsc-input-background lg:bg-vsc-background flex cursor-pointer flex-wrap justify-center gap-x-2 gap-y-1 border-0 border-b-[1px] lg:border-r-[1px] lg:border-b-0 border-solid border-b-zinc-700 lg:border-r-zinc-700 p-0.5 lg:flex-col lg:gap-1 lg:p-4 lg:justify-start lg:h-full lg:overflow-y-auto">
{tabs.map((tab) => (
<div
style={{
fontSize: fontSize(-2),
}}
key={tab.id}
className={`flex cursor-pointer items-center justify-center gap-1.5 rounded-md px-2 py-2 hover:brightness-125 ${
className={`flex cursor-pointer items-center justify-center lg:justify-start gap-1.5 rounded-md px-2 py-2 hover:brightness-125 lg:w-full ${
activeTab === tab.id ? "" : "text-gray-400"
}`}
onClick={() => setActiveTab(tab.id)}
@ -157,9 +161,22 @@ function ConfigPage() {
</div>
</div>
{/* Tab Content */}
<div className="flex-1 overflow-y-auto px-4">
{tabs.find((tab) => tab.id === activeTab)?.component}
{/* Main content area */}
<div className="flex-1 flex flex-col overflow-hidden">
{/* Header for desktop */}
<div className="hidden lg:block bg-vsc-background sticky top-0 z-10">
<PageHeader
showBorder
onTitleClick={() => navigate("/")}
title="Chat"
rightContent={<AccountButton />}
/>
</div>
{/* Tab Content */}
<div className="flex-1 overflow-y-auto px-4">
{tabs.find((tab) => tab.id === activeTab)?.component}
</div>
</div>
</div>
);