diff --git a/ts/components/session/calling/CallContainer.tsx b/ts/components/session/calling/CallContainer.tsx index 9041ada2b..9ddcd1ead 100644 --- a/ts/components/session/calling/CallContainer.tsx +++ b/ts/components/session/calling/CallContainer.tsx @@ -54,7 +54,7 @@ export const InConvoCallWindow = styled.div` display: flex; height: 50%; - background: radial-gradient(black, #505050); + background-color: hsl(0, 0%, 15.7%); flex-shrink: 0; min-height: 200px; @@ -65,10 +65,11 @@ const InConvoCallWindowControls = styled.div` position: absolute; bottom: 0px; - width: fit-content; + width: 100%; + height: 100%; + align-items: flex-end; padding: 10px; border-radius: 10px; - height: 60px; margin-left: auto; margin-right: auto; left: 0; @@ -77,7 +78,6 @@ const InConvoCallWindowControls = styled.div` display: flex; - align-items: center; justify-content: center; opacity: 0; &:hover { @@ -182,8 +182,10 @@ export const DraggableCallContainer = () => { const VideoInputMenu = ({ triggerId, camerasList, + onUnmute, }: { triggerId: string; + onUnmute: () => void; camerasList: Array; }) => { return ( @@ -193,6 +195,7 @@ const VideoInputMenu = ({ { + onUnmute(); void CallManager.selectCameraByDeviceId(m.deviceId); }} > @@ -207,9 +210,11 @@ const VideoInputMenu = ({ const AudioInputMenu = ({ triggerId, audioInputsList, + onUnmute, }: { triggerId: string; audioInputsList: Array; + onUnmute: () => void; }) => { return ( @@ -218,6 +223,7 @@ const AudioInputMenu = ({ { + onUnmute(); void CallManager.selectAudioInputByDeviceId(m.deviceId); }} > @@ -357,10 +363,11 @@ export const InConversationCallContainer = () => { iconSize={60} iconPadding="20px" iconType="hangup" - backgroundColor="var(--color-cell-background)" + backgroundColor="white" borderRadius="50%" onClick={handleEndCall} iconColor="red" + margin="10px" /> { onArrowClick={showAudioInputMenu} /> - - + setVideoMuted(false)} + camerasList={currentConnectedCameras} + /> + setAudioMuted(false)} + audioInputsList={currentConnectedAudioInputs} + /> ); diff --git a/ts/components/session/icon/DropDownAndToggleButton.tsx b/ts/components/session/icon/DropDownAndToggleButton.tsx index 4b2fd87d7..a462fd6fa 100644 --- a/ts/components/session/icon/DropDownAndToggleButton.tsx +++ b/ts/components/session/icon/DropDownAndToggleButton.tsx @@ -1,6 +1,7 @@ import React from 'react'; import _ from 'lodash'; import styled from 'styled-components'; +import { contextMenu } from 'react-contexify'; type SProps = { onArrowClick: (e: React.MouseEvent) => void; @@ -10,11 +11,10 @@ type SProps = { iconType: 'microphone' | 'camera'; }; -const StyledRoundedButton = styled.div` - background-color: var(--color-cell-background); - color: var(--color-text); +const StyledRoundedButton = styled.div<{ isMuted: boolean }>` + background-color: ${props => (props.isMuted ? 'black' : 'white')}; + color: ${props => (props.isMuted ? 'white' : 'black')}; border-radius: 50%; - box-shadow: var(--color-session-shadow); cursor: pointer; transition-duration: 0.25s; @@ -44,6 +44,7 @@ const StyledArrowIcon = styled(StyledRoundedButton)` position: relative; top: -35%; right: -65%; + box-shadow: 0 0 4px 0 #b4b4b4; `; const CameraIcon = ( @@ -67,16 +68,17 @@ export const DropDownAndToggleButton = (props: SProps) => { const mainButtonClickHandler = (e: React.MouseEvent) => { e.stopPropagation(); + contextMenu.hideAll(); onMainButtonClick(e); }; const iconToRender = iconType === 'microphone' ? MicrophoneIcon : iconType === 'camera' ? CameraIcon : null; return ( - + {iconToRender} {!hidePopoverArrow && ( - + diff --git a/ts/components/session/icon/SessionIconButton.tsx b/ts/components/session/icon/SessionIconButton.tsx index e56c92415..f0cd37585 100644 --- a/ts/components/session/icon/SessionIconButton.tsx +++ b/ts/components/session/icon/SessionIconButton.tsx @@ -9,6 +9,7 @@ interface SProps extends SessionIconProps { notificationCount?: number; isSelected?: boolean; isHidden?: boolean; + margin?: string; } const SessionIconButtonInner = (props: SProps) => { @@ -26,6 +27,7 @@ const SessionIconButtonInner = (props: SProps) => { backgroundColor, borderRadius, iconPadding, + margin, } = props; const clickHandler = (e: React.MouseEvent) => { if (props.onClick) { @@ -39,7 +41,7 @@ const SessionIconButtonInner = (props: SProps) => { className={classNames('session-icon-button', iconSize, isSelected ? 'no-opacity' : '')} role="button" onClick={clickHandler} - style={{ display: isHidden ? 'none' : 'flex' }} + style={{ display: isHidden ? 'none' : 'flex', margin: margin ? margin : '' }} >