Enhance DashboardNavigation component with drag-and-drop support
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

- Added 'electrobun-webkit-app-region-no-drag' class to navigation items for improved drag-and-drop functionality in Electron.
- Updated layout structure to ensure proper flex behavior in the navigation component.
This commit is contained in:
Tom Butcher 2026-08-02 02:52:28 +01:00
parent 274852b895
commit b1ca3818e3

View File

@ -72,26 +72,31 @@ const DashboardNavigation = () => {
{
key: 'production',
label: 'Production',
className: 'electrobun-webkit-app-region-no-drag',
icon: <ProductionIcon />
},
{
key: 'inventory',
label: 'Inventory',
className: 'electrobun-webkit-app-region-no-drag',
icon: <InventoryIcon />
},
{
key: 'sales',
label: 'Sales',
className: 'electrobun-webkit-app-region-no-drag',
icon: <SalesIcon />
},
{
key: 'finance',
label: 'Finance',
className: 'electrobun-webkit-app-region-no-drag',
icon: <FinanceIcon />
},
{
key: 'management',
label: 'Management',
className: 'electrobun-webkit-app-region-no-drag',
icon: <SettingsIcon />
}
],
@ -199,7 +204,7 @@ const DashboardNavigation = () => {
</Text>
</Flex>
)}
<div className='electrobun-webkit-app-region-no-drag'>
<div style={{ flexGrow: 1 }}>
<Menu
mode='horizontal'
className={isElectron ? 'electron-navigation' : null}
@ -222,6 +227,7 @@ const DashboardNavigation = () => {
/>
</div>
{isMobile && <div style={{ flexGrow: 1 }} />}
<div className='electrobun-webkit-app-region-no-drag'>
<Flex
gap={'small'}