Move "Start Video Call" option to the bottom of the profile popover (#5853)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
5398c82e1b
Коммит
bc906abd66
@@ -118,9 +118,7 @@ export default class ProfilePopover extends React.Component {
|
|||||||
if (webrtcEnabled && this.props.user.id !== this.state.currentUserId) {
|
if (webrtcEnabled && this.props.user.id !== this.state.currentUserId) {
|
||||||
const isOnline = this.props.status !== UserStatuses.OFFLINE;
|
const isOnline = this.props.status !== UserStatuses.OFFLINE;
|
||||||
let webrtcMessage;
|
let webrtcMessage;
|
||||||
let circleClass = 'offline';
|
|
||||||
if (isOnline && !this.props.isBusy) {
|
if (isOnline && !this.props.isBusy) {
|
||||||
circleClass = '';
|
|
||||||
webrtcMessage = (
|
webrtcMessage = (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='user_profile.webrtc.call'
|
id='user_profile.webrtc.call'
|
||||||
@@ -143,32 +141,20 @@ export default class ProfilePopover extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const webrtcTooltip = (
|
|
||||||
<Tooltip id='webrtcTooltip'>{webrtcMessage}</Tooltip>
|
|
||||||
);
|
|
||||||
|
|
||||||
webrtc = (
|
webrtc = (
|
||||||
<div
|
<div
|
||||||
className='webrtc__user-profile'
|
data-toggle='tooltip'
|
||||||
key='makeCall'
|
key='makeCall'
|
||||||
|
className='popover__row'
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
|
className='text-nowrap user-popover__email'
|
||||||
onClick={() => this.initWebrtc()}
|
onClick={() => this.initWebrtc()}
|
||||||
disabled={!isOnline}
|
disabled={!isOnline}
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<i className='fa fa-video-camera'/>
|
||||||
delayShow={Constants.WEBRTC_TIME_DELAY}
|
{webrtcMessage}
|
||||||
placement='top'
|
|
||||||
overlay={webrtcTooltip}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
id='webrtc-btn'
|
|
||||||
className={'webrtc__button ' + circleClass}
|
|
||||||
>
|
|
||||||
<span dangerouslySetInnerHTML={{__html: Constants.VIDEO_ICON}}/>
|
|
||||||
</div>
|
|
||||||
</OverlayTrigger>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -219,8 +205,6 @@ export default class ProfilePopover extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
dataContent.push(webrtc);
|
|
||||||
|
|
||||||
const email = this.props.user.email;
|
const email = this.props.user.email;
|
||||||
if (global.window.mm_config.ShowEmailAddress === 'true' || UserStore.isSystemAdminForCurrentUser() || this.props.user === UserStore.getCurrentUser()) {
|
if (global.window.mm_config.ShowEmailAddress === 'true' || UserStore.isSystemAdminForCurrentUser() || this.props.user === UserStore.getCurrentUser()) {
|
||||||
dataContent.push(
|
dataContent.push(
|
||||||
@@ -244,7 +228,7 @@ export default class ProfilePopover extends React.Component {
|
|||||||
<div
|
<div
|
||||||
data-toggle='tooltip'
|
data-toggle='tooltip'
|
||||||
key='user-popover-dm'
|
key='user-popover-dm'
|
||||||
className='popover__row'
|
className='popover__row first'
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
@@ -259,6 +243,7 @@ export default class ProfilePopover extends React.Component {
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
dataContent.push(webrtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -36,10 +36,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.popover__row {
|
.popover__row {
|
||||||
border-top: 1px solid transparent;
|
margin: 0 -15px 0;
|
||||||
margin: 9px -15px 0;
|
|
||||||
padding: 9px 15px 0;
|
padding: 9px 15px 0;
|
||||||
|
|
||||||
|
&.first {
|
||||||
|
border-top: 1px solid transparent;
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
> a {
|
> a {
|
||||||
> i {
|
> i {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
@@ -80,6 +84,17 @@
|
|||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
&[disabled] {
|
||||||
|
color: $video-circle-offline;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&:hover {
|
||||||
|
color: $video-circle-offline;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-help-popover {
|
.search-help-popover {
|
||||||
|
|||||||
@@ -1,18 +1,5 @@
|
|||||||
@charset 'UTF-8';
|
@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 {
|
.webrtc__header {
|
||||||
@include webrtc-button;
|
@include webrtc-button;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user