From df72b5e65e4223df6a55d1955cb4e7983121e0a0 Mon Sep 17 00:00:00 2001 From: JSR Date: Wed, 18 Mar 2026 21:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=AA=E7=AB=96=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E5=A4=8D=E4=BE=A7=E6=A0=8F=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 2 +- src/components/Sidebar.tsx | 50 +++++++++++++++++-------------- src/components/WindowControls.tsx | 18 +++++------ 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 282ba2e..07740f6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -141,7 +141,7 @@ function MainContent(): React.JSX.Element { } if (nextPortraitMode) { await api.windowSetResizable(false) - await api.windowResize(940, 1280) + await api.windowResize(940, 1380) setSidebarCollapsed(true) } else { await api.windowSetResizable(true) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 73bf6b5..29ff1b0 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -193,7 +193,11 @@ export function Sidebar({ const showFloatingPanel = floatingExpand && collapsed && floatingExpanded - const renderSidebarBody = (isCollapsedView: boolean, isFloatingPanel = false) => ( + const renderSidebarBody = ( + isCollapsedView: boolean, + isFloatingPanel = false, + hideMenu = false + ) => ( <>
-
- { - onMenuChange(key) - if (floatingExpand && collapsed) { - setFloatingExpanded(false) - } - }} - style={{ - width: "100%", - border: "none", - backgroundColor: "transparent", - }} - items={menuItems} - /> -
+ {!hideMenu && ( +
+ { + onMenuChange(key) + if (floatingExpand && collapsed) { + setFloatingExpanded(false) + } + }} + style={{ + width: "100%", + border: "none", + backgroundColor: "transparent", + }} + items={menuItems} + /> +
+ )} - {!isCollapsedView && dbStatus.type === "postgresql" && ( + {!isCollapsedView && !hideMenu && dbStatus.type === "postgresql" && ( {contextHolder} - {renderSidebarBody(collapsed)} + {renderSidebarBody(collapsed, false, showFloatingPanel)} {showFloatingPanel && (
- +