mirror of
https://github.com/docmost/docmost.git
synced 2026-08-28 17:27:06 +08:00
fix sidebar
This commit is contained in:
@@ -78,7 +78,7 @@ export default function GlobalAppShell({
|
|||||||
const isHomeRoute = location.pathname.startsWith("/home");
|
const isHomeRoute = location.pathname.startsWith("/home");
|
||||||
const isSpacesRoute = location.pathname === "/spaces";
|
const isSpacesRoute = location.pathname === "/spaces";
|
||||||
const isPageRoute = location.pathname.includes("/p/");
|
const isPageRoute = location.pathname.includes("/p/");
|
||||||
const showGlobalSidebar = !isSpaceRoute && !isSettingsRoute;
|
const showGlobalSidebar = !isSpaceRoute && !isSettingsRoute && !isAiRoute;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppShell
|
<AppShell
|
||||||
@@ -103,19 +103,19 @@ export default function GlobalAppShell({
|
|||||||
<AppShell.Header px="md" className={classes.header}>
|
<AppShell.Header px="md" className={classes.header}>
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
</AppShell.Header>
|
</AppShell.Header>
|
||||||
{!hideSidebar && (
|
<AppShell.Navbar
|
||||||
<AppShell.Navbar
|
className={classes.navbar}
|
||||||
className={classes.navbar}
|
withBorder={false}
|
||||||
withBorder={false}
|
ref={sidebarRef}
|
||||||
ref={sidebarRef}
|
>
|
||||||
>
|
{isSpaceRoute && (
|
||||||
{!isAiRoute && <div className={classes.resizeHandle} onMouseDown={startResizing} />}
|
<div className={classes.resizeHandle} onMouseDown={startResizing} />
|
||||||
{isSpaceRoute && <SpaceSidebar />}
|
)}
|
||||||
{isSettingsRoute && <SettingsSidebar />}
|
{isSpaceRoute && <SpaceSidebar />}
|
||||||
{isAiRoute && <AiChatSidebar />}
|
{isSettingsRoute && <SettingsSidebar />}
|
||||||
{showGlobalSidebar && <GlobalSidebar />}
|
{isAiRoute && <AiChatSidebar />}
|
||||||
</AppShell.Navbar>
|
{showGlobalSidebar && <GlobalSidebar />}
|
||||||
)}
|
</AppShell.Navbar>
|
||||||
<AppShell.Main>
|
<AppShell.Main>
|
||||||
{isSettingsRoute ? (
|
{isSettingsRoute ? (
|
||||||
<Container size={850}>{children}</Container>
|
<Container size={850}>{children}</Container>
|
||||||
|
|||||||
Reference in New Issue
Block a user