From aafc16e4f43d2f19bd5f3f00d462e7016a2919d9 Mon Sep 17 00:00:00 2001 From: WindSpiritSR Date: Sun, 16 Mar 2025 16:12:58 +0800 Subject: [PATCH] feat: fix dynamic width of navbar UI (#3664) --- web/src/ManagementPage.js | 60 +++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/web/src/ManagementPage.js b/web/src/ManagementPage.js index f3731910..7dde062c 100644 --- a/web/src/ManagementPage.js +++ b/web/src/ManagementPage.js @@ -443,8 +443,6 @@ function ManagementPage(props) { return Setting.isMobile() || window.location.pathname.startsWith("/trees"); } - const menuStyleRight = Setting.isAdminUser(props.account) && !Setting.isMobile() ? "calc(180px + 280px)" : "320px"; - const onClose = () => { setMenuVisible(false); }; @@ -456,34 +454,40 @@ function ManagementPage(props) { return ( -
- {props.requiredEnableMfa || (Setting.isMobile() ? - - - - - - - : - - )} +
{ - renderAccountMenu() + props.requiredEnableMfa || (Setting.isMobile() ? ( + + + + + + + + ) : ( + // Padding 1px for Menu Item Highlight border +
+ +
+ )) } +
+ {renderAccountMenu()} +
{isWithoutCard() ?