feat: implement macOS-specific title bar adjustments and enhance RightPanel with toggle functionality

This commit is contained in:
Anish Sarkar 2026-05-19 18:57:06 +05:30
parent ee3a6dc45f
commit cd4e5ae7f2
5 changed files with 322 additions and 200 deletions

View file

@ -6,17 +6,22 @@ import { Button } from "@/components/ui/button";
import { ShortcutKbd } from "@/components/ui/shortcut-kbd";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { usePlatformShortcut } from "@/hooks/use-platform-shortcut";
import { cn } from "@/lib/utils";
interface SidebarCollapseButtonProps {
isCollapsed: boolean;
onToggle: () => void;
disableTooltip?: boolean;
className?: string;
iconClassName?: string;
}
export function SidebarCollapseButton({
isCollapsed,
onToggle,
disableTooltip = false,
className,
iconClassName,
}: SidebarCollapseButtonProps) {
const t = useTranslations("sidebar");
const { shortcutKeys } = usePlatformShortcut();
@ -26,9 +31,12 @@ export function SidebarCollapseButton({
variant="ghost"
size="icon"
onClick={onToggle}
className="h-8 w-8 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground"
className={cn(
"h-8 w-8 shrink-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground",
className
)}
>
<PanelLeft className="h-4 w-4" />
<PanelLeft className={cn("h-4 w-4", iconClassName)} />
<span className="sr-only">{isCollapsed ? t("expand_sidebar") : t("collapse_sidebar")}</span>
</Button>
);