yangjie #22
10
main.js
10
main.js
|
|
@ -307,7 +307,9 @@ app.on('ready', () => {
|
|||
}
|
||||
childWindow[config.key] = child
|
||||
child.once('ready-to-show', () => {
|
||||
if (config.show) {
|
||||
childWindow[config.key].show()
|
||||
}
|
||||
childWindow[config.key].setAlwaysOnTop(true, 'screen-saver')
|
||||
childWindow[config.key].setSkipTaskbar(true)
|
||||
windowOperation(config)
|
||||
|
|
@ -351,6 +353,7 @@ app.on('ready', () => {
|
|||
});
|
||||
// 隐藏显示子窗口
|
||||
ipcMain.handle('setChildWindowShow', (event, config) => {
|
||||
if (config.key === 'shareScreenWindow') {
|
||||
if (config.bool) {
|
||||
childWindow[config.key].show()
|
||||
} else {
|
||||
|
|
@ -358,6 +361,13 @@ app.on('ready', () => {
|
|||
childWindow[config.key].hide()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (childWindow[config.key].isVisible()) {
|
||||
childWindow[config.key].hide()
|
||||
} else {
|
||||
childWindow[config.key].show()
|
||||
}
|
||||
}
|
||||
});
|
||||
// 隐藏主窗口
|
||||
ipcMain.handle('mainWindowHide', () => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import styles from '@/page/Meeting/ChatBigWindow/index.module.scss'
|
|||
import ImageUrl from '@/utils/package/imageUrl';
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { storage } from '@/utils';
|
||||
import { setKeyOpenChildWindow } from '@/utils/package/public';
|
||||
import { Button, Input, Modal, Popover } from 'antd';
|
||||
import { role } from '@/config/role';
|
||||
import { GetRoomUserItem } from '@/api/Meeting';
|
||||
|
|
@ -62,8 +61,9 @@ const ChatBigWindow: React.FC = () => {
|
|||
<div className={styles.chatBigWindowTitle}>
|
||||
<span>聊天</span>
|
||||
<img src={ImageUrl.icon18} className='drag' alt="" onClick={() => {
|
||||
window.electron.closeChildWindow('chatBigWindow')
|
||||
setKeyOpenChildWindow('chatBigWindow', false)
|
||||
window.electron.setChildWindowShow({
|
||||
key: 'chatBigWindow',
|
||||
})
|
||||
}} />
|
||||
</div>
|
||||
<div className={`${styles.chatBigWindowContent} drag`} id='chatBigWindowView'>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { role } from '@/config/role';
|
|||
import styles from '@/page/Meeting/ShareScreenWindow/index.module.scss'
|
||||
import { storage } from '@/utils';
|
||||
import ImageUrl from '@/utils/package/imageUrl';
|
||||
import { getKeyOpenChildWindow, setKeyOpenChildWindow } from '@/utils/package/public';
|
||||
import { CaretDownOutlined, CaretUpOutlined } from '@ant-design/icons';
|
||||
import { Button } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
|
|
@ -164,28 +163,14 @@ const ShareScreenWindow: React.FC = () => {
|
|||
});
|
||||
break;
|
||||
case '聊天':
|
||||
const chatBigWindow = await getKeyOpenChildWindow('chatBigWindow')
|
||||
if (!chatBigWindow) {
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/chatBigWindow`,
|
||||
width: 540,
|
||||
height: 640,
|
||||
window.electron.setChildWindowShow({
|
||||
key: 'chatBigWindow',
|
||||
})
|
||||
setKeyOpenChildWindow('chatBigWindow', true)
|
||||
}
|
||||
break;
|
||||
case '成员':
|
||||
const userListWindow = await getKeyOpenChildWindow('userListWindow')
|
||||
if (!userListWindow) {
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/userListWindow`,
|
||||
width: 440,
|
||||
height: 540,
|
||||
window.electron.setChildWindowShow({
|
||||
key: 'userListWindow',
|
||||
})
|
||||
setKeyOpenChildWindow('userListWindow', true)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { Button, Input, Modal, Popover } from 'antd';
|
|||
import Avatar from '@/components/Avatar';
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { storage } from '@/utils';
|
||||
import { setKeyOpenChildWindow } from '@/utils/package/public';
|
||||
import EquipmentManagement from '@/components/EquipmentManagement';
|
||||
const { confirm } = Modal;
|
||||
|
||||
|
|
@ -47,8 +46,9 @@ const UserListWindow: React.FC = () => {
|
|||
<div className={styles.userListWindowTitle}>
|
||||
<span>成员列表</span>
|
||||
<img src={ImageUrl.icon18} className='drag' alt="" onClick={() => {
|
||||
window.electron.closeChildWindow('userListWindow')
|
||||
setKeyOpenChildWindow('userListWindow', false)
|
||||
window.electron.setChildWindowShow({
|
||||
key: 'userListWindow',
|
||||
})
|
||||
}} />
|
||||
</div>
|
||||
<div className='drag' style={{ padding: '0 10px' }}>
|
||||
|
|
|
|||
|
|
@ -1577,24 +1577,40 @@ const Meeting: React.FC = () => {
|
|||
width: 400,
|
||||
height: 80,
|
||||
key: 'shareScreenWindow',
|
||||
show: true,
|
||||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/chatSmallWindow`,
|
||||
width: 200,
|
||||
height: 150,
|
||||
key: 'chatSmallWindow',
|
||||
show: true,
|
||||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/currentSpeakUserWindow`,
|
||||
width: 200,
|
||||
height: 30,
|
||||
key: 'currentSpeakUserWindow',
|
||||
show: true,
|
||||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/noticeWindow`,
|
||||
width: 388,
|
||||
height: 150,
|
||||
key: 'noticeWindow',
|
||||
show: true,
|
||||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/chatBigWindow`,
|
||||
width: 540,
|
||||
height: 640,
|
||||
key: 'chatBigWindow',
|
||||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/userListWindow`,
|
||||
width: 440,
|
||||
height: 540,
|
||||
key: 'userListWindow',
|
||||
})
|
||||
setKeyOpenChildWindow('shareScreenWindow', true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue