yangjie #22
7
main.js
7
main.js
|
|
@ -437,7 +437,7 @@ function windowOperation(config) {
|
|||
break;
|
||||
case 'currentSpeakUserWindow':
|
||||
x = width - child.getSize()[0];
|
||||
child.setPosition(x - 40, 250);
|
||||
child.setPosition(x - 40, 40);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -450,8 +450,5 @@ function mainWindowCenter() {
|
|||
}
|
||||
// 主窗口隐藏
|
||||
function mainWindowHide() {
|
||||
const display = screen.getDisplayMatching({ ...mainWindow.getBounds() });
|
||||
const { width, height } = display.size
|
||||
x = width - mainWindow.getSize()[0];
|
||||
mainWindow.setPosition(x - 40, 40);
|
||||
mainWindow.setPosition(-999999, -999999);
|
||||
}
|
||||
|
|
@ -11,33 +11,27 @@
|
|||
max-height: 80%;
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
|
||||
.chatSmallWindowContentLeft {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
|
||||
>div:nth-child(1) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
>span {
|
||||
font-size: 14px;
|
||||
>div {
|
||||
background-color: #5574f25d;
|
||||
color: black;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
>div {}
|
||||
}
|
||||
|
||||
>div:nth-child(2) {
|
||||
background-color: #5575F2;
|
||||
color: #F3F3F5;
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 15px 15px 15px;
|
||||
margin: 0 0 10px 40px;
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
|
||||
>span:nth-child(1) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -46,29 +40,20 @@
|
|||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
|
||||
>div:nth-child(1) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
>span {
|
||||
font-size: 14px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
>div {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
>div:nth-child(2) {
|
||||
background-color: #464E6B;
|
||||
color: #F3F3F5;
|
||||
background-color: #464e6b55;
|
||||
color: black;
|
||||
padding: 4px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 15px 0 15px 15px;
|
||||
margin: 0 40px 10px 0;
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
>span:nth-child(1) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import styles from '@/page/Meeting/ChatSmallWindow/index.module.scss'
|
||||
import { Input } from 'antd';
|
||||
import { useEffect, useState } from "react";
|
||||
import Avatar from '@/components/Avatar';
|
||||
import { storage } from '@/utils';
|
||||
const ChatSmallWindow: React.FC = () => {
|
||||
const [inputValue, setInputValue] = useState<string>('')
|
||||
|
|
@ -13,7 +12,7 @@ const ChatSmallWindow: React.FC = () => {
|
|||
const { type, chatList } = event.data;
|
||||
switch (type) {
|
||||
case 'chatList':
|
||||
setChatLists(chatList)
|
||||
setChatLists(chatList.reverse())
|
||||
setTimeout(() => {
|
||||
const chatSmallWindowView = document.getElementById('chatSmallWindowView') as HTMLElement;
|
||||
if (chatSmallWindowView) {
|
||||
|
|
@ -33,10 +32,10 @@ const ChatSmallWindow: React.FC = () => {
|
|||
{chatLists.map((item: any) =>
|
||||
<div className={`${item.uid !== userInfo.uid ? styles.chatSmallWindowContentLeft : styles.chatSmallWindowContentRight}`}>
|
||||
<div>
|
||||
<div><Avatar name={item.userName} /></div>
|
||||
<span>{item.userName}</span>
|
||||
<span>:</span>
|
||||
<span>{item.message}</span>
|
||||
</div>
|
||||
<div>{item.message}</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -94,17 +94,6 @@
|
|||
background-color: #1F2022;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.meetingAbsolute {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #1F2022;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.meetingHeader {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -1445,24 +1445,11 @@ const Meeting: React.FC = () => {
|
|||
})
|
||||
window.electron.createChildWindow({
|
||||
url: location.origin + `/#/currentSpeakUserWindow`,
|
||||
width: 350,
|
||||
width: 200,
|
||||
height: 30,
|
||||
key: 'currentSpeakUserWindow',
|
||||
})
|
||||
setKeyOpenChildWindow('shareScreenWindow', true)
|
||||
window.electron.setMainWindowSize({
|
||||
width: 350,
|
||||
height: 200,
|
||||
})
|
||||
setTimeout(() => {
|
||||
agora.setupLocalVideo({
|
||||
uid: Number(user.screenShareId),
|
||||
view: document.getElementById(`meetingAbsoluteVideo`) as HTMLElement,
|
||||
channelId: state.channelId,
|
||||
sourceType: VideoSourceType.VideoSourceScreen,
|
||||
type: true
|
||||
})
|
||||
}, 1500);
|
||||
}
|
||||
} else {
|
||||
message.error('请选择应用!')
|
||||
|
|
@ -1503,7 +1490,6 @@ const Meeting: React.FC = () => {
|
|||
const stopScreenCapture = async (): Promise<void> => {
|
||||
const footerListTemplate = [...footerList]
|
||||
await agora.leaveChannelEx(userInfo.screenShareId)
|
||||
await agora.destroyRendererByConfig(Number(userInfo.screenShareId), state.channelId)
|
||||
agora.stopScreenCapture()
|
||||
footerListTemplate[1][0].title = '共享屏幕'
|
||||
setFooterList(footerListTemplate)
|
||||
|
|
@ -1857,9 +1843,6 @@ const Meeting: React.FC = () => {
|
|||
return (
|
||||
<>
|
||||
<div className={styles.meeting}>
|
||||
{isShare == user.screenShareId ? <div className={styles.meetingAbsolute} id='meetingAbsoluteVideo'>
|
||||
|
||||
</div> : null}
|
||||
{contextHolder}
|
||||
<div className={styles.meetingHeader}>
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue