fix: give ai-cad a dedicated shell layout
This commit is contained in:
parent
9d3ba9b353
commit
450e998d3f
@ -3595,7 +3595,7 @@ export function AiCadWorkbench() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col overflow-hidden bg-[#1b1b1b] text-white">
|
||||
<div className="flex min-h-svh flex-col overflow-hidden bg-[#1b1b1b] text-white">
|
||||
<div className="border-white/10 border-b bg-[#252525] px-3 py-2.5 xl:px-4">
|
||||
<div className="space-y-2.5">
|
||||
<div className="flex flex-col gap-2.5 border-white/10 border-b pb-2.5 xl:flex-row xl:items-center xl:justify-between">
|
||||
|
||||
@ -68,6 +68,7 @@ export function ChatShell({
|
||||
}: ChatShellProps) {
|
||||
const pathname = usePathname();
|
||||
const isLovartHome = pathname === "/" && homeVariant === "lovart";
|
||||
const isAiCadWorkspace = pathname === "/ai-cad";
|
||||
|
||||
if (isLovartHome) {
|
||||
return <div className="h-svh w-full overflow-y-auto">{children}</div>;
|
||||
@ -75,26 +76,38 @@ export function ChatShell({
|
||||
|
||||
return (
|
||||
<SidebarProvider defaultOpen={!isCollapsed}>
|
||||
<TopNavbar
|
||||
siteName={siteName}
|
||||
siteLogo={siteLogo}
|
||||
siteLogoDark={siteLogoDark}
|
||||
isAdmin={isAdmin}
|
||||
settingsHref={settingsHref}
|
||||
customLinks={customLinks}
|
||||
toolbox1Name={toolbox1Name}
|
||||
toolbox1Enabled={toolbox1Enabled}
|
||||
toolbox2Name={toolbox2Name}
|
||||
toolbox2Enabled={toolbox2Enabled}
|
||||
tutorialVideos={tutorialVideos}
|
||||
tutorialEnabled={tutorialEnabled}
|
||||
rankingEnabled={rankingEnabled}
|
||||
productPlanningEnabled={productPlanningEnabled}
|
||||
agentEnabled={agentEnabled}
|
||||
/>
|
||||
<div className="flex h-svh w-full overflow-hidden pl-16 [--sidebar-offset:4rem]">
|
||||
{isAiCadWorkspace ? null : (
|
||||
<TopNavbar
|
||||
agentEnabled={agentEnabled}
|
||||
customLinks={customLinks}
|
||||
isAdmin={isAdmin}
|
||||
productPlanningEnabled={productPlanningEnabled}
|
||||
rankingEnabled={rankingEnabled}
|
||||
settingsHref={settingsHref}
|
||||
siteLogo={siteLogo}
|
||||
siteLogoDark={siteLogoDark}
|
||||
siteName={siteName}
|
||||
toolbox1Enabled={toolbox1Enabled}
|
||||
toolbox1Name={toolbox1Name}
|
||||
toolbox2Enabled={toolbox2Enabled}
|
||||
toolbox2Name={toolbox2Name}
|
||||
tutorialEnabled={tutorialEnabled}
|
||||
tutorialVideos={tutorialVideos}
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
className={
|
||||
isAiCadWorkspace
|
||||
? "flex min-h-svh w-full pl-16 [--sidebar-offset:4rem]"
|
||||
: "flex h-svh w-full overflow-hidden pl-16 [--sidebar-offset:4rem]"
|
||||
}
|
||||
>
|
||||
<AppSidebar user={user} />
|
||||
<SidebarInset className="h-full">{children}</SidebarInset>
|
||||
<SidebarInset
|
||||
className={isAiCadWorkspace ? "min-h-svh overflow-visible" : "h-full"}
|
||||
>
|
||||
{children}
|
||||
</SidebarInset>
|
||||
</div>
|
||||
</SidebarProvider>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user