fix(webui): hide sidebar pin controls in menu mode

Keep sidebar pinning available in desktop navigation and hide its controls when navigation uses the menu.

Fixes #485
This commit is contained in:
DrSmoothl committed 2026-09-26 15:54:38 +08:00
1 parent 0591b160fb
commit 726fbc6c67
4 files changed
+18 -10

No files matched your search

@@ -7,7 +7,7 @@ import { APP_NAME, APP_VERSION } from '@/types';
import { useAppState } from '@/contexts/AppStateContext';
import { useTheme } from '@/contexts/ThemeContext';
import { reconcileLayoutItems, useLayout } from '@/contexts/LayoutContext';
import { useMediaQuery } from '@/hooks/use-media-query';
import { useDesktopSidebar } from '@/hooks/use-media-query';
import type { AppPath } from '@/router';
import type { UiLayoutItem } from '@/types';
@@ -95,7 +95,7 @@ export function Sidebar({ collapsed = false, onItemClick }: SidebarProps) {
const { updateInfo } = useAppState();
const { navItems, setNavItems, editing, setEditing } = useLayout();
const { appearance, setAppearance } = useTheme();
const isDesktop = useMediaQuery('(min-width: 768px)');
const isDesktop = useDesktopSidebar();
const pinned = appearance.sidebarPinned;
// Full reconciled nav (incl. hidden) — pinned forced visible, forward-compat.