Compare commits

...

2 Commits

Author SHA1 Message Date
0ebc6b4897 Remove z-index from electron navigation wrapper in App.css to simplify styling and improve layout consistency.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
2026-08-09 14:53:13 +01:00
3a8239c92d Enhance MessageContext for desktop compatibility
- Updated MessageContext to adjust message positioning in the Electrobun desktop application, ensuring messages clear the custom title bar.
- Introduced a conditional MESSAGE_TOP value based on the desktop environment, improving the user experience for desktop users.
2026-08-09 14:52:06 +01:00
2 changed files with 6 additions and 2 deletions

View File

@ -105,7 +105,6 @@
}
.electron-navigation-wrapper {
z-index: 10000;
user-select: none;
--webkit-user-select: none;
}

View File

@ -1,11 +1,16 @@
import { createContext, useContext } from 'react'
import PropTypes from 'prop-types'
import { message } from 'antd'
import { isElectrobunDesktop } from '../../../electrobun-bridge'
const MessageContext = createContext()
// antd's default message top is 8px; push messages down an extra 40px in the
// desktop app so they clear the custom title bar / drag region.
const MESSAGE_TOP = isElectrobunDesktop() ? 48 : undefined
export const MessageProvider = ({ children }) => {
const [msgApi, contextHolder] = message.useMessage()
const [msgApi, contextHolder] = message.useMessage({ top: MESSAGE_TOP })
const showMessage = (type, content, options = {}) => {
return msgApi.open({