From 2e0ed4476325b0f8f7c4c5b1f56387c86d73a51c Mon Sep 17 00:00:00 2001 From: aforge Date: Tue, 15 Mar 2022 22:02:00 -0700 Subject: [PATCH] Clean up video calls ui a bit. --- css/base.css | 38 ++++++++++++++++------- src/views/messages-view.jsx | 5 ++++ src/widgets/rtc-panel.jsx | 60 ++++++++++++++++++++++++++----------- 3 files changed, 75 insertions(+), 28 deletions(-) diff --git a/css/base.css b/css/base.css index 257a032d..ecfc7fbe 100644 --- a/css/base.css +++ b/css/base.css @@ -2591,32 +2591,48 @@ ul.tabbar li.active > a { } } -.h-100 { - height: 100%!important; -} - -#video_container { +#video-container { display: flex; + flex-direction: column; + justify-content: center; + height: 100%!important; width: 85%; margin: auto; - height: 80% + height: 80%; } video { width:100%; } -.align-items-center { +#video-container-panel { -ms-flex-align: center!important; align-items: center!important; + margin-top: 10%; } -.local_div { +.local-video { width:50%; - float:left + float:left; } -.remote_div { +.remote-video { width:50%; - float:left + float:left; +} + +#video-container-controls { + display: flex; + justify-content: center; + padding: 20px; +} + +#video-call-hangup { + border-radius: 10px; + background-color: red; +} + +.video-call-toggle-media { + border-radius: 10px; + background-color: gray; } diff --git a/src/views/messages-view.jsx b/src/views/messages-view.jsx index 61033422..68ac9875 100644 --- a/src/views/messages-view.jsx +++ b/src/views/messages-view.jsx @@ -984,6 +984,11 @@ class MessagesView extends React.Component { topic={topic} seq={this.props.callSeq} callState={this.props.callState} + displayMobile={this.props.displayMobile} + tinode={this.props.tinode} + title={this.state.title} + avatar={this.state.avatar || true} + onError={this.props.onError} onHangup={this.handleTeleHangup} onInvite={this.props.onTeleInvite} diff --git a/src/widgets/rtc-panel.jsx b/src/widgets/rtc-panel.jsx index d08d4e18..b4ca9d32 100644 --- a/src/widgets/rtc-panel.jsx +++ b/src/widgets/rtc-panel.jsx @@ -1,5 +1,7 @@ import React from 'react'; +import LetterTile from '../widgets/letter-tile.jsx'; + export default class RtcPanel extends React.PureComponent { constructor(props) { super(props); @@ -342,24 +344,48 @@ export default class RtcPanel extends React.PureComponent { } return ( -
-
-
- -
-
- -
-
-
- - - + <> +
+ {this.props.displayMobile ? + {e.preventDefault(); this.props.onHideMessagesView();}}> + arrow_back + + : + null} +
+ +
+
+
{ + this.props.title || + + }
+
- -
+
+
+
+ +
+
+ +
+
+
+ + + +
+ +
+ ); } };