summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_header.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmood@users.noreply.github.com>2016-11-11 18:23:43 +0500
committerJoram Wilander <jwawilander@gmail.com>2016-11-11 08:23:43 -0500
commit7c1fe7a765ef6383d1730a5e377bc22066231b06 (patch)
treedc9970a5c021010e2d01a80ea35466c6a784cc0b /webapp/components/channel_header.jsx
parentc0a631000e20b504c8f264b5863f2c1d5e08706c (diff)
downloadchat-7c1fe7a765ef6383d1730a5e377bc22066231b06.tar.gz
chat-7c1fe7a765ef6383d1730a5e377bc22066231b06.tar.bz2
chat-7c1fe7a765ef6383d1730a5e377bc22066231b06.zip
PLT-4316 - Webrtc improvements (#4525)
Diffstat (limited to 'webapp/components/channel_header.jsx')
-rw-r--r--webapp/components/channel_header.jsx41
1 files changed, 21 insertions, 20 deletions
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index 1ce7b4a0e..a281e8e1b 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -300,6 +300,13 @@ export default class ChannelHeader extends React.Component {
if (isOffline || busy) {
circleClass = 'offline';
+ webrtcMessage = (
+ <FormattedMessage
+ id='channel_header.webrtc.offline'
+ defaultMessage='The user is offline'
+ />
+ );
+
if (busy) {
webrtcMessage = (
<FormattedMessage
@@ -317,6 +324,10 @@ export default class ChannelHeader extends React.Component {
);
}
+ const webrtcTooltip = (
+ <Tooltip id='webrtcTooltip'>{webrtcMessage}</Tooltip>
+ );
+
webrtc = (
<div className='webrtc__header'>
<a
@@ -324,28 +335,18 @@ export default class ChannelHeader extends React.Component {
onClick={() => this.initWebrtc(contact.id, !isOffline)}
disabled={isOffline}
>
- <svg
- id='webrtc-btn'
- className='webrtc__button'
- xmlns='http://www.w3.org/2000/svg'
+ <OverlayTrigger
+ delayShow={Constants.WEBRTC_TIME_DELAY}
+ placement='bottom'
+ overlay={webrtcTooltip}
>
- <circle
- className={circleClass}
- cx='16'
- cy='16'
- r='18'
+ <div
+ id='webrtc-btn'
+ className={'webrtc__button ' + circleClass}
>
- <title>
- {webrtcMessage}
- </title>
- </circle>
- <path
- className='off'
- transform='scale(0.4), translate(17,16)'
- d='M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm-4 24l-8-6.4V32H12V16h16v6.4l8-6.4v16z'
- fill='white'
- />
- </svg>
+ <span dangerouslySetInnerHTML={{__html: Constants.VIDEO_ICON}}/>
+ </div>
+ </OverlayTrigger>
</a>
</div>
);