@@ -443,8 +443,6 @@ function ManagementPage(props) {
443
443
return Setting . isMobile ( ) || window . location . pathname . startsWith ( "/trees" ) ;
444
444
}
445
445
446
- const menuStyleRight = Setting . isAdminUser ( props . account ) && ! Setting . isMobile ( ) ? "calc(180px + 280px)" : "320px" ;
447
-
448
446
const onClose = ( ) => {
449
447
setMenuVisible ( false ) ;
450
448
} ;
@@ -456,34 +454,40 @@ function ManagementPage(props) {
456
454
return (
457
455
< React . Fragment >
458
456
< EnableMfaNotification account = { props . account } />
459
- < Header style = { { padding : "0" , marginBottom : "3px" , backgroundColor : props . themeAlgorithm . includes ( "dark" ) ? "black" : "white" } } >
460
- { props . requiredEnableMfa || ( Setting . isMobile ( ) ?
461
- < React . Fragment >
462
- < Drawer title = { i18next . t ( "general:Close" ) } placement = "left" open = { menuVisible } onClose = { onClose } >
457
+ < Header style = { { display : "flex" , justifyContent : "space-between" , alignItems : "center" , padding : "0" , marginBottom : "4px" , backgroundColor : props . themeAlgorithm . includes ( "dark" ) ? "black" : "white" } } >
458
+ {
459
+ props . requiredEnableMfa || ( Setting . isMobile ( ) ? (
460
+ < React . Fragment >
461
+ < Drawer title = { i18next . t ( "general:Close" ) } placement = "left" open = { menuVisible } onClose = { onClose } >
462
+ < Menu
463
+ items = { getMenuItems ( ) }
464
+ mode = { "inline" }
465
+ selectedKeys = { [ props . selectedMenuKey ] }
466
+ style = { { lineHeight : "64px" } }
467
+ onClick = { onClose }
468
+ >
469
+ </ Menu >
470
+ </ Drawer >
471
+ < Button icon = { < BarsOutlined /> } onClick = { showMenu } type = "text" >
472
+ { i18next . t ( "general:Menu" ) }
473
+ </ Button >
474
+ </ React . Fragment >
475
+ ) : (
476
+ // Padding 1px for Menu Item Highlight border
477
+ < div style = { { flex : 1 , overflow : "hidden" , paddingBottom : "1px" } } >
463
478
< Menu
479
+ onClick = { onClose }
464
480
items = { getMenuItems ( ) }
465
- mode = { "inline " }
481
+ mode = { "horizontal " }
466
482
selectedKeys = { [ props . selectedMenuKey ] }
467
- style = { { lineHeight : "64px" } }
468
- onClick = { onClose }
469
- >
470
- </ Menu >
471
- </ Drawer >
472
- < Button icon = { < BarsOutlined /> } onClick = { showMenu } type = "text" >
473
- { i18next . t ( "general:Menu" ) }
474
- </ Button >
475
- </ React . Fragment > :
476
- < Menu
477
- onClick = { onClose }
478
- items = { getMenuItems ( ) }
479
- mode = { "horizontal" }
480
- selectedKeys = { [ props . selectedMenuKey ] }
481
- style = { { position : "absolute" , left : 0 , right : menuStyleRight , backgroundColor : props . themeAlgorithm . includes ( "dark" ) ? "black" : "white" } }
482
- />
483
- ) }
484
- {
485
- renderAccountMenu ( )
483
+ style = { { backgroundColor : props . themeAlgorithm . includes ( "dark" ) ? "black" : "white" } }
484
+ />
485
+ </ div >
486
+ ) )
486
487
}
488
+ < div style = { { flexShrink : 0 } } >
489
+ { renderAccountMenu ( ) }
490
+ </ div >
487
491
</ Header >
488
492
< Content style = { { display : "flex" , flexDirection : "column" } } >
489
493
{ isWithoutCard ( ) ?
0 commit comments