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