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:
parent
84a6a86bf3
commit
0592f8e322
@ -105,9 +105,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.electron-navigation-wrapper {
|
.electron-navigation-wrapper {
|
||||||
|
z-index: 10000;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
--webkit-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 */
|
/* Native macOS vibrancy — transparent web content over NSVisualEffectView */
|
||||||
@ -949,3 +966,8 @@ span.ant-skeleton-input.ant-skeleton-input-sm.text-skeleton {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.electron-body .ant-modal-wrap,
|
||||||
|
.electron-body .ant-modal-mask {
|
||||||
|
top: 41px;
|
||||||
|
}
|
||||||
|
|||||||
@ -66,8 +66,13 @@ const DashboardNavigation = () => {
|
|||||||
icon: <ProductionIcon />
|
icon: <ProductionIcon />
|
||||||
})
|
})
|
||||||
const isMobile = useMediaQuery({ maxWidth: 768 })
|
const isMobile = useMediaQuery({ maxWidth: 768 })
|
||||||
const { platform, isElectron, setSidebarViewMenu, isFullScreen } =
|
const {
|
||||||
useContext(ElectronContext)
|
platform,
|
||||||
|
isElectron,
|
||||||
|
setSidebarViewMenu,
|
||||||
|
isFullScreen,
|
||||||
|
isMaximized
|
||||||
|
} = useContext(ElectronContext)
|
||||||
const { availableUpdate, checkForUpdates } = useAppUpdateContext()
|
const { availableUpdate, checkForUpdates } = useAppUpdateContext()
|
||||||
const mainMenuItems = useMemo(
|
const mainMenuItems = useMemo(
|
||||||
() => [
|
() => [
|
||||||
@ -362,7 +367,7 @@ const DashboardNavigation = () => {
|
|||||||
<>
|
<>
|
||||||
{isElectron ? (
|
{isElectron ? (
|
||||||
<Flex
|
<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' }}
|
style={{ lineHeight: '40px', padding: '0 2px 0 2px' }}
|
||||||
>
|
>
|
||||||
{navigationContents}
|
{navigationContents}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user