Tom Butcher d16aa373be
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
Implement Navigation Tabs and Dashboard Enhancements
- Introduced NavigationTabsContext to manage tab state and navigation within the dashboard.
- Added DashboardTabs component for improved tabbed navigation, allowing users to add, close, and reorder tabs.
- Enhanced Dashboard layout to conditionally render tab panes based on the active tab, improving user experience.
- Updated various components to utilize navigation tab context, ensuring consistent title management and tab interactions.
- Implemented drag-and-drop functionality for tabs, enabling users to rearrange their workspace effectively.
- Refactored CSS styles for dashboard tabs and panes to ensure proper layout and responsiveness across devices.
2026-09-17 20:39:50 +01:00

38 lines
858 B
JavaScript

let sendToFocusedImpl = () => false
let sendToWindowImpl = () => false
let sendToAllImpl = () => false
export function configureWindowMessaging({
sendToFocused,
sendToWindow,
sendToAll
}) {
if (typeof sendToFocused === 'function') {
sendToFocusedImpl = sendToFocused
}
if (typeof sendToWindow === 'function') {
sendToWindowImpl = sendToWindow
}
if (typeof sendToAll === 'function') {
sendToAllImpl = sendToAll
}
}
export function setMessageSender(sender) {
if (typeof sender === 'function') {
sendToFocusedImpl = sender
}
}
export function sendToRenderer(channel, data) {
return sendToFocusedImpl(channel, data)
}
export function sendToWindow(windowId, channel, data) {
return sendToWindowImpl(windowId, channel, data)
}
export function sendToAllWindows(channel, data) {
return sendToAllImpl(channel, data)
}