This commit is contained in:
parent
e362145da9
commit
d70f09f82d
3
main.js
3
main.js
|
|
@ -338,6 +338,9 @@ app.on('ready', () => {
|
|||
case 'chatSmallWindow':
|
||||
childWindow[config.key].setBounds({ height: config.height })
|
||||
break;
|
||||
case 'noticeWindow':
|
||||
childWindow[config.key].setBounds({ width: config.width, height: config.height })
|
||||
break;
|
||||
}
|
||||
});
|
||||
// 隐藏主窗口
|
||||
|
|
|
|||
|
|
@ -79,8 +79,11 @@ const NoticeWindow: React.FC = () => {
|
|||
time = setInterval(() => {
|
||||
const dom = document.getElementsByClassName('ant-notification')
|
||||
if (dom.length === 0) {
|
||||
window.electron.closeChildWindow('noticeWindow')
|
||||
setKeyOpenChildWindow('noticeWindow', false)
|
||||
window.electron.setChildWindow({
|
||||
height: 0,
|
||||
window: 0,
|
||||
key: 'noticeWindow',
|
||||
})
|
||||
}
|
||||
}, 1000)
|
||||
}, 4000);
|
||||
|
|
|
|||
|
|
@ -627,29 +627,17 @@ const Meeting: React.FC = () => {
|
|||
break;
|
||||
// 申请发言
|
||||
case 'ApplyToSpeak':
|
||||
const noticeWindow = await getKeyOpenChildWindow('noticeWindow')
|
||||
setIsScreenCapture(bool => {
|
||||
if (bool) {
|
||||
if (noticeWindow) {
|
||||
channel.postMessage({
|
||||
type: 'noticeItem',
|
||||
noticeItem: item
|
||||
});
|
||||
} else {
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/noticeWindow`,
|
||||
width: 388,
|
||||
height: 150,
|
||||
key: 'noticeWindow',
|
||||
})
|
||||
setTimeout(() => {
|
||||
channel.postMessage({
|
||||
type: 'noticeItem',
|
||||
noticeItem: item
|
||||
});
|
||||
}, 2000);
|
||||
setKeyOpenChildWindow('noticeWindow', true)
|
||||
}
|
||||
window.electron.setChildWindow({
|
||||
width: 388,
|
||||
height: 150,
|
||||
key: 'noticeWindow',
|
||||
})
|
||||
channel.postMessage({
|
||||
type: 'noticeItem',
|
||||
noticeItem: item
|
||||
});
|
||||
} else {
|
||||
api.open({
|
||||
message: '',
|
||||
|
|
@ -1545,6 +1533,12 @@ const Meeting: React.FC = () => {
|
|||
height: 30,
|
||||
key: 'currentSpeakUserWindow',
|
||||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/noticeWindow`,
|
||||
width: 388,
|
||||
height: 150,
|
||||
key: 'noticeWindow',
|
||||
})
|
||||
setKeyOpenChildWindow('shareScreenWindow', true)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue