From bc906abd6672efbe9b755a4edd5dbc5f7a39761f Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Wed, 19 Apr 2017 03:21:52 +0200 Subject: Move "Start Video Call" option to the bottom of the profile popover (#5853) --- webapp/components/profile_popover.jsx | 29 +++++++---------------------- webapp/sass/components/_popover.scss | 19 +++++++++++++++++-- webapp/sass/components/_webrtc.scss | 13 ------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/webapp/components/profile_popover.jsx b/webapp/components/profile_popover.jsx index c86de514e..63bd99ac4 100644 --- a/webapp/components/profile_popover.jsx +++ b/webapp/components/profile_popover.jsx @@ -118,9 +118,7 @@ export default class ProfilePopover extends React.Component { if (webrtcEnabled && this.props.user.id !== this.state.currentUserId) { const isOnline = this.props.status !== UserStatuses.OFFLINE; let webrtcMessage; - let circleClass = 'offline'; if (isOnline && !this.props.isBusy) { - circleClass = ''; webrtcMessage = ( {webrtcMessage} - ); - webrtc = (
this.initWebrtc()} disabled={!isOnline} > - -
- -
-
+ + {webrtcMessage}
); @@ -219,8 +205,6 @@ export default class ProfilePopover extends React.Component { ); } - dataContent.push(webrtc); - const email = this.props.user.email; if (global.window.mm_config.ShowEmailAddress === 'true' || UserStore.isSystemAdminForCurrentUser() || this.props.user === UserStore.getCurrentUser()) { dataContent.push( @@ -244,7 +228,7 @@ export default class ProfilePopover extends React.Component {
); + dataContent.push(webrtc); } return ( diff --git a/webapp/sass/components/_popover.scss b/webapp/sass/components/_popover.scss index 93b567ad3..610cdb31d 100644 --- a/webapp/sass/components/_popover.scss +++ b/webapp/sass/components/_popover.scss @@ -36,10 +36,14 @@ } .popover__row { - border-top: 1px solid transparent; - margin: 9px -15px 0; + margin: 0 -15px 0; padding: 9px 15px 0; + &.first { + border-top: 1px solid transparent; + margin-top: 9px; + } + > a { > i { margin-right: 5px; @@ -80,6 +84,17 @@ max-width: 200px; overflow: hidden; text-overflow: ellipsis; + + &[disabled] { + color: $video-circle-offline; + + &:focus, + &:hover { + color: $video-circle-offline; + text-decoration: none; + } + } + } .search-help-popover { diff --git a/webapp/sass/components/_webrtc.scss b/webapp/sass/components/_webrtc.scss index a36fb1c95..c127bc5cc 100644 --- a/webapp/sass/components/_webrtc.scss +++ b/webapp/sass/components/_webrtc.scss @@ -1,18 +1,5 @@ @charset 'UTF-8'; -.webrtc__user-profile { - @include webrtc-button; - position: absolute; - right: 7px; - text-align: center; - top: 5px; - - #webrtc-btn { - height: 23px; - width: 23px; - } -} - .webrtc__header { @include webrtc-button; float: left; -- cgit v1.2.3-1-g7c22