This commit is contained in:
yj 2024-10-18 13:51:34 +08:00
parent e362145da9
commit d70f09f82d
3 changed files with 23 additions and 23 deletions

View File

@ -338,6 +338,9 @@ app.on('ready', () => {
case 'chatSmallWindow': case 'chatSmallWindow':
childWindow[config.key].setBounds({ height: config.height }) childWindow[config.key].setBounds({ height: config.height })
break; break;
case 'noticeWindow':
childWindow[config.key].setBounds({ width: config.width, height: config.height })
break;
} }
}); });
// 隐藏主窗口 // 隐藏主窗口

View File

@ -79,8 +79,11 @@ const NoticeWindow: React.FC = () => {
time = setInterval(() => { time = setInterval(() => {
const dom = document.getElementsByClassName('ant-notification') const dom = document.getElementsByClassName('ant-notification')
if (dom.length === 0) { if (dom.length === 0) {
window.electron.closeChildWindow('noticeWindow') window.electron.setChildWindow({
setKeyOpenChildWindow('noticeWindow', false) height: 0,
window: 0,
key: 'noticeWindow',
})
} }
}, 1000) }, 1000)
}, 4000); }, 4000);

View File

@ -627,29 +627,17 @@ const Meeting: React.FC = () => {
break; break;
// 申请发言 // 申请发言
case 'ApplyToSpeak': case 'ApplyToSpeak':
const noticeWindow = await getKeyOpenChildWindow('noticeWindow')
setIsScreenCapture(bool => { setIsScreenCapture(bool => {
if (bool) { if (bool) {
if (noticeWindow) { window.electron.setChildWindow({
channel.postMessage({ width: 388,
type: 'noticeItem', height: 150,
noticeItem: item key: 'noticeWindow',
}); })
} else { channel.postMessage({
window.electron.createChildWindow({ type: 'noticeItem',
url: location.origin + `/#/noticeWindow`, noticeItem: item
width: 388, });
height: 150,
key: 'noticeWindow',
})
setTimeout(() => {
channel.postMessage({
type: 'noticeItem',
noticeItem: item
});
}, 2000);
setKeyOpenChildWindow('noticeWindow', true)
}
} else { } else {
api.open({ api.open({
message: '', message: '',
@ -1545,6 +1533,12 @@ const Meeting: React.FC = () => {
height: 30, height: 30,
key: 'currentSpeakUserWindow', key: 'currentSpeakUserWindow',
}) })
window.electron.createChildWindow({
url: location.origin + `/#/noticeWindow`,
width: 388,
height: 150,
key: 'noticeWindow',
})
setKeyOpenChildWindow('shareScreenWindow', true) setKeyOpenChildWindow('shareScreenWindow', true)
} }
} else { } else {