File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { NavigateOptions } from '@tanstack/react-router' ;
2- import { cn } from '@/lib/utils' ;
2+ import { cn , isMac } from '@/lib/utils' ;
33import { AutomakerLogo } from './automaker-logo' ;
44import { BugReportButton } from './bug-report-button' ;
55
@@ -20,7 +20,9 @@ export function SidebarHeader({ sidebarOpen, navigate }: SidebarHeaderProps) {
2020 // Background gradient for depth
2121 'bg-gradient-to-b from-transparent to-background/5' ,
2222 'flex items-center' ,
23- sidebarOpen ? 'px-3 lg:px-5 justify-start' : 'px-3 justify-center'
23+ sidebarOpen ? 'px-3 lg:px-5 justify-start' : 'px-3 justify-center' ,
24+ // Add left padding on macOS to avoid overlapping with traffic light buttons
25+ isMac && 'pt-4 pl-20'
2426 ) }
2527 >
2628 < AutomakerLogo sidebarOpen = { sidebarOpen } navigate = { navigate } />
Original file line number Diff line number Diff line change @@ -52,3 +52,14 @@ export function pathsEqual(p1: string | undefined | null, p2: string | undefined
5252 if ( ! p1 || ! p2 ) return p1 === p2 ;
5353 return normalizePath ( p1 ) === normalizePath ( p2 ) ;
5454}
55+
56+ /**
57+ * Detect if running on macOS.
58+ * Checks Electron process.platform first, then falls back to navigator APIs.
59+ */
60+ export const isMac =
61+ typeof process !== 'undefined' && process . platform === 'darwin'
62+ ? true
63+ : typeof navigator !== 'undefined' &&
64+ ( / M a c / . test ( navigator . userAgent ) ||
65+ ( navigator . platform ? navigator . platform . toLowerCase ( ) . includes ( 'mac' ) : false ) ) ;
You can’t perform that action at this time.
0 commit comments