From 09845e0515482a4f1a94784dcdbdc822e0ad7820 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Sat, 6 Jun 2026 22:48:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(shell):=20ConsoleShell=20=E4=BC=A0?= =?UTF-8?q?=E9=80=92=20compact=20=E7=BB=99=20buildThemeConfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/web/shared/components/ConsoleShell/ConsoleShell.tsx | 4 ++-- tests/web/components/ConsoleShell.test.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/shared/components/ConsoleShell/ConsoleShell.tsx b/src/web/shared/components/ConsoleShell/ConsoleShell.tsx index e9259d0..d1f8972 100644 --- a/src/web/shared/components/ConsoleShell/ConsoleShell.tsx +++ b/src/web/shared/components/ConsoleShell/ConsoleShell.tsx @@ -18,7 +18,7 @@ import { ConsoleOutlet } from "./ConsoleOutlet"; const { Content, Header, Sider } = Layout; export function ConsoleShell({ headerExtra, menuItems, title }: ConsoleShellProps) { - const { effectiveTheme } = useThemePreference(); + const { compact, effectiveTheme } = useThemePreference(); const { collapsed, setCollapsed } = useSidebarCollapsed(); const { data: meta } = useMeta(); @@ -26,7 +26,7 @@ export function ConsoleShell({ headerExtra, menuItems, title }: ConsoleShellProp const locale = useMemo(() => ({ ...zhCN, ...zhCN_X }), []); return ( - +
diff --git a/tests/web/components/ConsoleShell.test.tsx b/tests/web/components/ConsoleShell.test.tsx index 1d2895e..835af20 100644 --- a/tests/web/components/ConsoleShell.test.tsx +++ b/tests/web/components/ConsoleShell.test.tsx @@ -6,7 +6,7 @@ import { ConsoleShell } from "../../../src/web/shared/components/ConsoleShell/Co import { installFetchMock, jsonResponse, mockMetaResponse, renderWithProviders } from "../test-utils"; function mockSettingsResponse(): Response { - return jsonResponse({ theme: "system" }); + return jsonResponse({ compact: false, theme: "system" }); } describe("ConsoleShell", () => {