From 20b7aadeffacf93862f524f4a7cdee4ccdd2c78a Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Wed, 16 Oct 2024 09:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B0=8F=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EquipmentManagement/index.tsx | 1 + src/components/StupWizard/index.tsx | 1 + .../Meeting/ChatSmallWindow/index.module.scss | 5 ++++ .../ShareScreenWindow/index.module.scss | 20 ++++++++++++-- src/page/Meeting/ShareScreenWindow/index.tsx | 26 +++++++++++++++++-- src/page/Meeting/index.tsx | 7 +++++ 6 files changed, 56 insertions(+), 4 deletions(-) diff --git a/src/components/EquipmentManagement/index.tsx b/src/components/EquipmentManagement/index.tsx index d9f01f9..53c3c46 100644 --- a/src/components/EquipmentManagement/index.tsx +++ b/src/components/EquipmentManagement/index.tsx @@ -26,6 +26,7 @@ const EquipmentManagement = forwardRef((_props: any, ref: any) => { const isOpen = await getKeyOpenChildWindow('shareScreenWindow') if (isOpen) { window.electron.mainWindowHide() + window.electron.setViewStatus('hide') } setEquipmentManagementModal(false) } diff --git a/src/components/StupWizard/index.tsx b/src/components/StupWizard/index.tsx index 38afd49..8f8cb72 100644 --- a/src/components/StupWizard/index.tsx +++ b/src/components/StupWizard/index.tsx @@ -103,6 +103,7 @@ const StupWizard = forwardRef((props: any, ref: any) => { const isOpen = await getKeyOpenChildWindow('shareScreenWindow') if (isOpen) { window.electron.mainWindowHide() + window.electron.setViewStatus('hide') } setIsStupWizard(false) }} diff --git a/src/page/Meeting/ChatSmallWindow/index.module.scss b/src/page/Meeting/ChatSmallWindow/index.module.scss index e386a8c..c5626e8 100644 --- a/src/page/Meeting/ChatSmallWindow/index.module.scss +++ b/src/page/Meeting/ChatSmallWindow/index.module.scss @@ -60,5 +60,10 @@ >div:nth-child(2) { flex-shrink: 0; + opacity: 0.4; + + &:hover { + opacity: 1; + } } } \ No newline at end of file diff --git a/src/page/Meeting/ShareScreenWindow/index.module.scss b/src/page/Meeting/ShareScreenWindow/index.module.scss index d1f0f36..9f90ed8 100644 --- a/src/page/Meeting/ShareScreenWindow/index.module.scss +++ b/src/page/Meeting/ShareScreenWindow/index.module.scss @@ -32,8 +32,24 @@ cursor: pointer; width: calc(100% / 6); - >img { - height: 24px; + >div { + position: relative; + + >img { + height: 24px; + width: 24px; + } + + >div { + position: absolute; + left: 0; + bottom: 0; + background-repeat: no-repeat; + background-position: bottom center; + background-size: cover; + width: 100%; + height: 0%; + } } >span { diff --git a/src/page/Meeting/ShareScreenWindow/index.tsx b/src/page/Meeting/ShareScreenWindow/index.tsx index f588682..8d9164e 100644 --- a/src/page/Meeting/ShareScreenWindow/index.tsx +++ b/src/page/Meeting/ShareScreenWindow/index.tsx @@ -59,7 +59,7 @@ const ShareScreenWindow: React.FC = () => { useEffect(() => { getRoomUser() channel.onmessage = function (event) { - const { type, time, roomUserList, footerList } = event.data; + const { type, time, roomUserList, footerList, currentSpeakUserMe } = event.data; const footerListTemplate = [...footerLists]; switch (type) { case 'time': @@ -77,6 +77,12 @@ const ShareScreenWindow: React.FC = () => { footerListTemplate[5].active = footerList[1][3].active; setFooterLists(footerListTemplate) break; + case 'currentSpeakUserMe': + let domMe = document.getElementById(`micr-item-${userInfo.uid}`) as HTMLDivElement; + if (domMe) { + domMe.style.height = `${currentSpeakUserMe}%` + } + break; } } }, []); @@ -105,6 +111,15 @@ const ShareScreenWindow: React.FC = () => { } }) } + // 底部按钮点击效果 + const changeFooterListSelect = (item: any, index: number, bool: boolean): void => { + let arr = ['静音', '解除静音', '关闭视频', '开启视频'] + if (arr.indexOf(item.title) === -1) { + const footerListTemplate = [...footerLists] + footerListTemplate[index].select = bool; + setFooterLists(footerListTemplate) + } + } return ( <>
@@ -114,6 +129,9 @@ const ShareScreenWindow: React.FC = () => { {footerLists.map((item: any, index: number) => { return (
changeFooterListSelect(item, index, true)} + onMouseUp={() => changeFooterListSelect(item, index, false)} + onMouseLeave={() => changeFooterListSelect(item, index, false)} onClick={async () => { switch (item.title) { case '静音': @@ -159,7 +177,11 @@ const ShareScreenWindow: React.FC = () => { } }} key={index}> - {item.select ? : } +
+ {!item.active ?
+
: ''} + {item.select ? : } +
{item.title}{item.title === '成员列表' ? `(${roomUserLists.filter((item: any) => item.isRoom).length})` : ''}
) diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index 448c23f..409c0d6 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -232,6 +232,7 @@ const Meeting: React.FC = () => { case 'shareScreenWindowSetting': stupWizardRef.current.changeModal(3); window.electron.mainWindowCenter() + window.electron.setViewStatus('show') break; case 'shareScreenWindowfooterListsTitle': switch (shareScreenWindowfooterListsTitle) { @@ -284,6 +285,7 @@ const Meeting: React.FC = () => { case 'shareScreenWindowEquipmentManagement': equipmentManagement(shareScreenWindowEquipmentManagement.uid, shareScreenWindowEquipmentManagement.userName) window.electron.mainWindowCenter() + window.electron.setViewStatus('show') break; case 'chatSmallWindowSendChannelMsg': sendMsg(chatSmallWindowSendChannelMsg.msg) @@ -314,6 +316,7 @@ const Meeting: React.FC = () => { case 'chatBigWindowEquipmentManagement': equipmentManagement(chatBigWindowEquipmentManagement.uid, chatBigWindowEquipmentManagement.userName) window.electron.mainWindowCenter() + window.electron.setViewStatus('show') break; case 'chatBigWindowGetRoomKickout': GetRoomKickout(state.channelId, chatBigWindowGetRoomKickout.uid) @@ -934,6 +937,10 @@ const Meeting: React.FC = () => { if (domMe && !item.uid) { const percentage = (item.volume / 255) * 100 domMe.style.height = `${percentage}%` + channel.postMessage({ + type: 'currentSpeakUserMe', + currentSpeakUserMe: percentage, + }); } }); const uidArr = (speakers.filter((item: any) => item.volume)).map(item => item.uid || userInfo.uid) as number[];