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