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 (
|
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="border-white/10 border-b bg-[#252525] px-3 py-2.5 xl:px-4">
|
||||||
<div className="space-y-2.5">
|
<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">
|
<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) {
|
}: ChatShellProps) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const isLovartHome = pathname === "/" && homeVariant === "lovart";
|
const isLovartHome = pathname === "/" && homeVariant === "lovart";
|
||||||
|
const isAiCadWorkspace = pathname === "/ai-cad";
|
||||||
|
|
||||||
if (isLovartHome) {
|
if (isLovartHome) {
|
||||||
return <div className="h-svh w-full overflow-y-auto">{children}</div>;
|
return <div className="h-svh w-full overflow-y-auto">{children}</div>;
|
||||||
@ -75,26 +76,38 @@ export function ChatShell({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SidebarProvider defaultOpen={!isCollapsed}>
|
<SidebarProvider defaultOpen={!isCollapsed}>
|
||||||
<TopNavbar
|
{isAiCadWorkspace ? null : (
|
||||||
siteName={siteName}
|
<TopNavbar
|
||||||
siteLogo={siteLogo}
|
agentEnabled={agentEnabled}
|
||||||
siteLogoDark={siteLogoDark}
|
customLinks={customLinks}
|
||||||
isAdmin={isAdmin}
|
isAdmin={isAdmin}
|
||||||
settingsHref={settingsHref}
|
productPlanningEnabled={productPlanningEnabled}
|
||||||
customLinks={customLinks}
|
rankingEnabled={rankingEnabled}
|
||||||
toolbox1Name={toolbox1Name}
|
settingsHref={settingsHref}
|
||||||
toolbox1Enabled={toolbox1Enabled}
|
siteLogo={siteLogo}
|
||||||
toolbox2Name={toolbox2Name}
|
siteLogoDark={siteLogoDark}
|
||||||
toolbox2Enabled={toolbox2Enabled}
|
siteName={siteName}
|
||||||
tutorialVideos={tutorialVideos}
|
toolbox1Enabled={toolbox1Enabled}
|
||||||
tutorialEnabled={tutorialEnabled}
|
toolbox1Name={toolbox1Name}
|
||||||
rankingEnabled={rankingEnabled}
|
toolbox2Enabled={toolbox2Enabled}
|
||||||
productPlanningEnabled={productPlanningEnabled}
|
toolbox2Name={toolbox2Name}
|
||||||
agentEnabled={agentEnabled}
|
tutorialEnabled={tutorialEnabled}
|
||||||
/>
|
tutorialVideos={tutorialVideos}
|
||||||
<div className="flex h-svh w-full overflow-hidden pl-16 [--sidebar-offset:4rem]">
|
/>
|
||||||
|
)}
|
||||||
|
<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} />
|
<AppSidebar user={user} />
|
||||||
<SidebarInset className="h-full">{children}</SidebarInset>
|
<SidebarInset
|
||||||
|
className={isAiCadWorkspace ? "min-h-svh overflow-visible" : "h-full"}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</SidebarInset>
|
||||||
</div>
|
</div>
|
||||||
</SidebarProvider>
|
</SidebarProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user