Compare commits
No commits in common. "0ebc6b4897619aa4dea509fd0cfff93151d06f01" and "3caa62d67502d9b938a3e11bd4071021a87e8d41" have entirely different histories.
0ebc6b4897
...
3caa62d675
@ -105,6 +105,7 @@
|
||||
}
|
||||
|
||||
.electron-navigation-wrapper {
|
||||
z-index: 10000;
|
||||
user-select: none;
|
||||
--webkit-user-select: none;
|
||||
}
|
||||
|
||||
@ -1,16 +1,11 @@
|
||||
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({ top: MESSAGE_TOP })
|
||||
const [msgApi, contextHolder] = message.useMessage()
|
||||
|
||||
const showMessage = (type, content, options = {}) => {
|
||||
return msgApi.open({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user