diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index aaab8084d4..1bc08cbed6 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -62,7 +62,7 @@ var LeftPanel = React.createClass({ // audio/video not crap out var activeCall = CallHandler.getAnyActiveCall(); var callForRoom = CallHandler.getCallForRoom(selectedRoomId); - var showCall = (activeCall && !callForRoom); + var showCall = (activeCall && activeCall.call_state === 'connected' && !callForRoom); this.setState({ showCallElement: showCall }); @@ -87,7 +87,6 @@ var LeftPanel = React.createClass({ render: function() { var RoomList = sdk.getComponent('rooms.RoomList'); var BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu'); - var IncomingCallBox = sdk.getComponent('voip.IncomingCallBox'); var collapseButton; var classes = "mx_LeftPanel"; @@ -100,7 +99,7 @@ var LeftPanel = React.createClass({ } var callPreview; - if (this.state.showCallElement) { + if (this.state.showCallElement && !this.props.collapsed) { var CallView = sdk.getComponent('voip.CallView'); callPreview = ( { collapseButton } - { callPreview } + isInvite={ self.props.label === 'Invites' } + incomingCall={ self.props.incomingCall && (self.props.incomingCall.roomId === room.roomId) ? self.props.incomingCall : null } + /> ); }); }, diff --git a/src/skins/vector/css/molecules/voip/IncomingCallbox.css b/src/skins/vector/css/molecules/voip/IncomingCallbox.css index 24b24cc20a..163ec43fcf 100644 --- a/src/skins/vector/css/molecules/voip/IncomingCallbox.css +++ b/src/skins/vector/css/molecules/voip/IncomingCallbox.css @@ -19,11 +19,12 @@ limitations under the License. border: 1px solid #a4a4a4; border-radius: 8px; background-color: #fff; - position: absolute; + position: fixed; z-index: 1000; - left: 235px; - top: 155px; padding: 6px; + margin-top: -3px; + margin-left: -20px; + width: 200px; } .mx_IncomingCallBox_chevron { @@ -39,14 +40,13 @@ limitations under the License. } .mx_IncomingCallBox_buttons { - display: table-row; + display: flex; } .mx_IncomingCallBox_buttons_cell { vertical-align: middle; - display: table-cell; padding: 6px; - width: 50%; + flex: 1; } .mx_IncomingCallBox_buttons_decline, @@ -57,6 +57,7 @@ limitations under the License. line-height: 36px; border-radius: 36px; color: #fff; + margin: auto; } .mx_IncomingCallBox_buttons_decline { diff --git a/vector/index.html b/vector/index.html index 273cb4394f..f926cea58d 100644 --- a/vector/index.html +++ b/vector/index.html @@ -27,6 +27,14 @@ +
+ + + + -
- - -