diff --git a/frontend/app/components/Assist/RequestingWindow/RequestingWindow.tsx b/frontend/app/components/Assist/RequestingWindow/RequestingWindow.tsx index 32f6c7d6f..6d702acdb 100644 --- a/frontend/app/components/Assist/RequestingWindow/RequestingWindow.tsx +++ b/frontend/app/components/Assist/RequestingWindow/RequestingWindow.tsx @@ -1,12 +1,12 @@ -import React from 'react' -import { INDEXES } from 'App/constants/zindex' +import React from 'react'; +import { INDEXES } from 'App/constants/zindex'; import { connect } from 'react-redux'; -import { Button, Loader, Icon } from 'UI' +import { Button, Loader, Icon } from 'UI'; import { initiateCallEnd, releaseRemoteControl } from 'Player'; interface Props { - userDisplayName: string - type: WindowType + userDisplayName: string; + type: WindowType; } export enum WindowType { @@ -18,27 +18,36 @@ const WIN_VARIANTS = { [WindowType.Call]: { text: 'to accept the call', icon: 'call' as const, - action: initiateCallEnd + action: initiateCallEnd, }, [WindowType.Control]: { text: 'to accept remote control request', icon: 'remote-control' as const, - action: releaseRemoteControl - } -} + action: releaseRemoteControl, + }, +}; function RequestingWindow({ userDisplayName, type }: Props) { return ( -
-
- -
Waiting for {userDisplayName}
- {WIN_VARIANTS[type].text} - - +
+
+ +
+ Waiting for {userDisplayName} +
+ {WIN_VARIANTS[type].text} + +
- ) + ); } -export default connect((state) => ({ userDisplayName: state.getIn(['sessions', 'current', 'userDisplayName']) }))(RequestingWindow) +export default connect((state) => ({ + userDisplayName: state.getIn(['sessions', 'current', 'userDisplayName']), +}))(RequestingWindow); diff --git a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx index cc54da5bb..5d8dc557e 100644 --- a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx +++ b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx @@ -19,7 +19,7 @@ import { } from 'Player/MessageDistributor/managers/AssistManager'; import RequestLocalStream from 'Player/MessageDistributor/managers/LocalStream'; import type { LocalStream } from 'Player/MessageDistributor/managers/LocalStream'; - +import { Tooltip } from 'react-tippy'; import { toast } from 'react-toastify'; import { confirm } from 'UI'; import stl from './AassistActions.module.css'; @@ -69,6 +69,8 @@ function AssistActions({ const callRequesting = calling === CallingState.Connecting; const cannotCall = peerConnectionStatus !== ConnectionStatus.Connected || (isEnterprise && !hasPermission); + + const remoteRequesting = remoteControlStatus === RemoteControlStatus.Requesting; const remoteActive = remoteControlStatus === RemoteControlStatus.Enabled; useEffect(() => { @@ -130,7 +132,7 @@ function AssistActions({ } const confirmCall = async () => { - if (callRequesting) return; + if (callRequesting || remoteRequesting) return; if ( await confirm({ @@ -144,7 +146,7 @@ function AssistActions({ }; const requestControl = () => { - if (callRequesting) return; + if (callRequesting || remoteRequesting) return; requestReleaseRemoteControl(); }; @@ -171,22 +173,25 @@ function AssistActions({
)} -
- - {/* */} -
+ +
+
{ case 'calendar-check': return ; case 'calendar-day': return ; case 'calendar': return ; - case 'call': return ; + case 'call': return ; case 'camera-alt': return ; case 'camera-video-off': return ; case 'camera-video': return ; @@ -332,7 +332,7 @@ const SVG = (props: Props) => { case 'quote-right': return ; case 'redo-back': return ; case 'redo': return ; - case 'remote-control': return ; + case 'remote-control': return ; case 'replay-10': return ; case 'resources-icon': return ; case 'safe-fill': return ; diff --git a/frontend/app/svg/icons/call.svg b/frontend/app/svg/icons/call.svg index e95d5c040..aff332ee5 100644 --- a/frontend/app/svg/icons/call.svg +++ b/frontend/app/svg/icons/call.svg @@ -1,5 +1,5 @@ - - + + diff --git a/frontend/app/svg/icons/remote-control.svg b/frontend/app/svg/icons/remote-control.svg index 64087850c..9a0fb6acc 100644 --- a/frontend/app/svg/icons/remote-control.svg +++ b/frontend/app/svg/icons/remote-control.svg @@ -1 +1,5 @@ - \ No newline at end of file + + +