This commit is contained in:
parent
225a8c8e71
commit
444568b232
3
main.js
3
main.js
|
|
@ -186,6 +186,9 @@ app.on('ready', () => {
|
||||||
case 'hide':
|
case 'hide':
|
||||||
mainWindow.hide()
|
mainWindow.hide()
|
||||||
break;
|
break;
|
||||||
|
case 'show':
|
||||||
|
mainWindow.show()
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 导出是否全屏
|
// 导出是否全屏
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import styles from '@/components/Operation/index.module.scss'
|
import styles from '@/components/Operation/index.module.scss'
|
||||||
import ImageUrl from '@/utils/package/imageUrl';
|
import ImageUrl from '@/utils/package/imageUrl';
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
type OperationKeyType = 'minimize' | 'quit' | 'maximize' | 'unmaximize' | 'hide';
|
type OperationKeyType = 'minimize' | 'quit' | 'maximize' | 'unmaximize' | 'hide' | 'show';
|
||||||
type OperationType = {
|
type OperationType = {
|
||||||
icon: string;
|
icon: string;
|
||||||
key: OperationKeyType;
|
key: OperationKeyType;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { storage } from '@/utils';
|
||||||
import { InfoCircleOutlined } from '@ant-design/icons';
|
import { InfoCircleOutlined } from '@ant-design/icons';
|
||||||
import { Button, Checkbox, Modal, Radio } from 'antd';
|
import { Button, Checkbox, Modal, Radio } from 'antd';
|
||||||
import { useState, useImperativeHandle, forwardRef } from "react";
|
import { useState, useImperativeHandle, forwardRef } from "react";
|
||||||
type OperationKeyType = 'minimize' | 'quit' | 'maximize' | 'unmaximize' | 'hide';
|
type OperationKeyType = 'minimize' | 'quit' | 'maximize' | 'unmaximize' | 'hide' | 'show';
|
||||||
const QuitTips = forwardRef((props: any, ref: any) => {
|
const QuitTips = forwardRef((props: any, ref: any) => {
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
changeModal: () => {
|
changeModal: () => {
|
||||||
|
|
|
||||||
|
|
@ -1486,6 +1486,7 @@ const Meeting: React.FC = () => {
|
||||||
await allUserLook(user.screenShareId, user.userName)
|
await allUserLook(user.screenShareId, user.userName)
|
||||||
const isOpen = await getKeyOpenChildWindow('shareScreenWindow')
|
const isOpen = await getKeyOpenChildWindow('shareScreenWindow')
|
||||||
setIsScreenCapture(true)
|
setIsScreenCapture(true)
|
||||||
|
window.electron.setViewStatus('hide')
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
window.electron.createChildWindow({
|
window.electron.createChildWindow({
|
||||||
url: location.origin + `/#/shareScreenWindow`,
|
url: location.origin + `/#/shareScreenWindow`,
|
||||||
|
|
@ -1553,8 +1554,9 @@ const Meeting: React.FC = () => {
|
||||||
setFooterList(footerListTemplate)
|
setFooterList(footerListTemplate)
|
||||||
window.electron.closeChildWindow('shareScreenWindow')
|
window.electron.closeChildWindow('shareScreenWindow')
|
||||||
setKeyOpenChildWindow('shareScreenWindow', false)
|
setKeyOpenChildWindow('shareScreenWindow', false)
|
||||||
if (isScreenCapture) {
|
setIsScreenCapture(bool => {
|
||||||
setIsScreenCapture(false)
|
if (bool) {
|
||||||
|
window.electron.setViewStatus('show')
|
||||||
window.electron.getWindowSize().then((res: any) => {
|
window.electron.getWindowSize().then((res: any) => {
|
||||||
window.electron.setMainWindowSize({
|
window.electron.setMainWindowSize({
|
||||||
width: Math.ceil(res.width / 1.5),
|
width: Math.ceil(res.width / 1.5),
|
||||||
|
|
@ -1567,6 +1569,8 @@ const Meeting: React.FC = () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 获取房间用户
|
// 获取房间用户
|
||||||
const getRoomUser = async (): Promise<void> => {
|
const getRoomUser = async (): Promise<void> => {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
export interface IElectronAPI {
|
export interface IElectronAPI {
|
||||||
setMainWindowSize: (config: any) => void;
|
setMainWindowSize: (config: any) => void;
|
||||||
getWindowSize: () => any;
|
getWindowSize: () => any;
|
||||||
setViewStatus: (status: 'quit' | 'maximize' | 'minimize' | 'unmaximize' | 'hide') => void;
|
setViewStatus: (status: 'quit' | 'maximize' | 'minimize' | 'unmaximize' | 'hide' | 'show') => void;
|
||||||
getIsMaximized: () => Promise<boolean>;
|
getIsMaximized: () => Promise<boolean>;
|
||||||
setWriteText: (text: string) => void;
|
setWriteText: (text: string) => void;
|
||||||
onQuit: (callBack: Function) => void;
|
onQuit: (callBack: Function) => void;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue