Enhance styling and functionality in App.css and DashboardNavigation component

- Added user-select properties to prevent text selection in the electron body, while allowing text selection in specific components.
- Updated z-index handling in the electron navigation wrapper for better layering.
- Modified the DashboardNavigation component to include isMaximized state, improving drag region logic for fullscreen and maximized states.
This commit is contained in:
Tom Butcher 2026-08-09 13:14:20 +01:00
parent 84a6a86bf3
commit 0592f8e322
2 changed files with 31 additions and 4 deletions

View File

@ -105,9 +105,26 @@
}
.electron-navigation-wrapper {
z-index: 10000;
user-select: none;
--webkit-user-select: none;
z-index: 10000;
}
.electron-body * {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
.electron-body .ant-descriptions-item-content *,
.electron-body .ant-table-cell * {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-o-user-select: text;
user-select: text;
}
/* Native macOS vibrancy — transparent web content over NSVisualEffectView */
@ -949,3 +966,8 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
width: 100%;
height: 100%;
}
.electron-body .ant-modal-wrap,
.electron-body .ant-modal-mask {
top: 41px;
}

View File

@ -66,8 +66,13 @@ const DashboardNavigation = () => {
icon: <ProductionIcon />
})
const isMobile = useMediaQuery({ maxWidth: 768 })
const { platform, isElectron, setSidebarViewMenu, isFullScreen } =
useContext(ElectronContext)
const {
platform,
isElectron,
setSidebarViewMenu,
isFullScreen,
isMaximized
} = useContext(ElectronContext)
const { availableUpdate, checkForUpdates } = useAppUpdateContext()
const mainMenuItems = useMemo(
() => [
@ -362,7 +367,7 @@ const DashboardNavigation = () => {
<>
{isElectron ? (
<Flex
className={`ant-menu-horizontal electron-navigation-wrapper ant-menu-light ${!isFullScreen ? 'electrobun-webkit-app-region-drag' : 'electrobun-webkit-app-region-no-drag'}`}
className={`ant-menu-horizontal electron-navigation-wrapper ant-menu-light ${isFullScreen || (isMaximized && isOtherApp) ? 'electrobun-webkit-app-region-no-drag' : 'electrobun-webkit-app-region-drag'}`}
style={{ lineHeight: '40px', padding: '0 2px 0 2px' }}
>
{navigationContents}