Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix(ui): remove sidebar Jan label overlapping macOS traffic lights

thinhlpg45e444f605ea
diff --git a/web-app/src/components/left-sidebar/index.tsx b/web-app/src/components/left-sidebar/index.tsx
index ffaf817a8..75af9eef9 100644
--- a/web-app/src/components/left-sidebar/index.tsx
+++ b/web-app/src/components/left-sidebar/index.tsx
@@ -14,8 +14,6 @@ import {
SidebarHeader,
SidebarRail,
} from '@/components/ui/sidebar'
-import { cn } from '@/lib/utils'
-import { useTitlebarLayout } from '@/stores/titlebar-layout-store'
import { useLocation } from '@tanstack/react-router'
import { isCoworkRoute, route } from '@/constants/routes'
@@ -28,21 +26,12 @@ export function LeftSidebar() {
if (!inSettings && lastSurfacePath !== pathname) setLastSurfacePath(pathname)
const surfacePath = inSettings ? lastSurfacePath : pathname
const isCowork = isCoworkRoute(surfacePath)
- // Right-align the header when native controls own the top-left (macOS, or a Linux
- // DE placing buttons left); "Jan" moves into the right cluster except on macOS.
- const leftButtons = useTitlebarLayout((s) => s.layout.left.length)
- const controlsOnLeft = !IS_MACOS && leftButtons > 0
- const reserveLeft = IS_MACOS || controlsOnLeft
return (
<div className='relative z-50'>
<Sidebar variant="floating" collapsible="offcanvas">
<SidebarHeader className="flex px-1">
- <div className={cn("flex items-center w-full justify-between", reserveLeft && "justify-end")}>
- {!reserveLeft && <span className="ml-2 font-medium font-studio">Jan</span>}
+ <div className="flex items-center w-full justify-end">
<div className="flex items-center">
- {controlsOnLeft && (
- <span className="mr-2 font-medium font-studio">Jan</span>
- )}
{isLeftPanelOpen && <DownloadManagement />}
<SidebarTrigger className="text-muted-foreground rounded-full hover:bg-sidebar-foreground/8! -mt-0.5 relative z-50 ml-0.5" />
</div>