feat(InviteMore): Relocate invite prompt for mobile friendliness.
This commit is contained in:
parent
7fce181080
commit
a22d054b10
|
@ -98,6 +98,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toolbox-content-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.toolbox-content-items {
|
.toolbox-content-items {
|
||||||
background: $newToolbarBackgroundColor;
|
background: $newToolbarBackgroundColor;
|
||||||
|
@ -295,12 +301,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* On small mobile devices make the toolbar full width.
|
* On small mobile devices make the toolbar full width and pad the invite prompt.
|
||||||
*/
|
*/
|
||||||
.toolbox-content-mobile {
|
.toolbox-content-mobile {
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.toolbox-content-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.toolbox-content-items {
|
.toolbox-content-items {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -308,5 +318,13 @@
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.invite-more-container {
|
||||||
|
margin: 0 16px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invite-more-container.elevated {
|
||||||
|
margin-bottom: 52px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,42 @@
|
||||||
.invite-more {
|
.invite-more {
|
||||||
&-container {
|
&-container {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
transition: margin-bottom 0.3s;
|
||||||
|
|
||||||
|
&.elevated {
|
||||||
|
margin-bottom: 36px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 16px;
|
||||||
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
border-radius: 8px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 24px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
z-index: $zindex2;
|
|
||||||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-header {
|
&-header {
|
||||||
font-size: 19px;
|
max-width: 100%;
|
||||||
line-height: 28px;
|
margin-bottom: 16px;
|
||||||
margin: 24px 0 16px 0;
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-button {
|
&-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: auto;
|
max-width: 100%;
|
||||||
padding: 8px 16px;
|
height: 48px;
|
||||||
width: fit-content;
|
box-sizing: border-box;
|
||||||
width: -moz-fit-content;
|
padding: 12px 16px;
|
||||||
height: 24px;
|
|
||||||
background: #0376DA;
|
background: #0376DA;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
font-size: 14px;
|
|
||||||
line-height: 24px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@media (hover: hover) and (pointer: fine) {
|
@media (hover: hover) and (pointer: fine) {
|
||||||
|
@ -36,8 +47,9 @@
|
||||||
|
|
||||||
&-text {
|
&-text {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
font-size: 15px;
|
text-overflow: ellipsis;
|
||||||
line-height: 24px;
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-dialog {
|
&-dialog {
|
||||||
|
|
|
@ -14,10 +14,14 @@ declare var interfaceConfig: Object;
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to show the option to invite more people
|
* Whether to show the option to invite more people.
|
||||||
* instead of the subject.
|
|
||||||
*/
|
*/
|
||||||
_visible: boolean,
|
_shouldShow: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the toolbox is visible.
|
||||||
|
*/
|
||||||
|
_toolboxVisible: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler to open the invite dialog.
|
* Handler to open the invite dialog.
|
||||||
|
@ -38,13 +42,15 @@ type Props = {
|
||||||
* @returns {React$Element<any>}
|
* @returns {React$Element<any>}
|
||||||
*/
|
*/
|
||||||
function InviteMore({
|
function InviteMore({
|
||||||
_visible,
|
_shouldShow,
|
||||||
|
_toolboxVisible,
|
||||||
onClick,
|
onClick,
|
||||||
t
|
t
|
||||||
}: Props) {
|
}: Props) {
|
||||||
return (
|
return (
|
||||||
_visible
|
_shouldShow
|
||||||
? <div className = 'invite-more-container'>
|
? <div className = { `invite-more-container${_toolboxVisible ? '' : ' elevated'}` }>
|
||||||
|
<div className = 'invite-more-content'>
|
||||||
<div className = 'invite-more-header'>
|
<div className = 'invite-more-header'>
|
||||||
{t('addPeople.inviteMoreHeader')}
|
{t('addPeople.inviteMoreHeader')}
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,6 +62,7 @@ function InviteMore({
|
||||||
{t('addPeople.inviteMorePrompt')}
|
{t('addPeople.inviteMorePrompt')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div> : null
|
</div> : null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +81,8 @@ function mapStateToProps(state) {
|
||||||
const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;
|
const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_visible: isToolboxVisible(state) && isButtonEnabled('invite', state) && isAlone && !hide
|
_shouldShow: isButtonEnabled('invite', state) && isAlone && !hide,
|
||||||
|
_toolboxVisible: isToolboxVisible(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ function _mapStateToProps(state) {
|
||||||
_showParticipantCount: participantCount > 2 && !hideParticipantsStats,
|
_showParticipantCount: participantCount > 2 && !hideParticipantsStats,
|
||||||
_showSubject: !hideConferenceSubject,
|
_showSubject: !hideConferenceSubject,
|
||||||
_subject: getConferenceName(state),
|
_subject: getConferenceName(state),
|
||||||
_visible: isToolboxVisible(state) && participantCount > 1
|
_visible: isToolboxVisible(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import React, { Component } from 'react';
|
||||||
|
|
||||||
import { Watermarks } from '../../base/react';
|
import { Watermarks } from '../../base/react';
|
||||||
import { connect } from '../../base/redux';
|
import { connect } from '../../base/redux';
|
||||||
import { InviteMore, Subject } from '../../conference';
|
import { Subject } from '../../conference';
|
||||||
import { fetchCustomBrandingData } from '../../dynamic-branding';
|
import { fetchCustomBrandingData } from '../../dynamic-branding';
|
||||||
import { Captions } from '../../subtitles/';
|
import { Captions } from '../../subtitles/';
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@ class LargeVideo extends Component<Props> {
|
||||||
id = 'largeVideoContainer'
|
id = 'largeVideoContainer'
|
||||||
style = { style }>
|
style = { style }>
|
||||||
<Subject />
|
<Subject />
|
||||||
<InviteMore />
|
|
||||||
<div id = 'sharedVideo'>
|
<div id = 'sharedVideo'>
|
||||||
<div id = 'sharedVideoIFrame' />
|
<div id = 'sharedVideoIFrame' />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,6 +36,7 @@ import { OverflowMenuItem } from '../../../base/toolbox/components';
|
||||||
import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
|
import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
|
||||||
import { isVpaasMeeting } from '../../../billing-counter/functions';
|
import { isVpaasMeeting } from '../../../billing-counter/functions';
|
||||||
import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
|
import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
|
||||||
|
import { InviteMore } from '../../../conference';
|
||||||
import { EmbedMeetingDialog } from '../../../embed-meeting';
|
import { EmbedMeetingDialog } from '../../../embed-meeting';
|
||||||
import { SharedDocumentButton } from '../../../etherpad';
|
import { SharedDocumentButton } from '../../../etherpad';
|
||||||
import { openFeedbackDialog } from '../../../feedback';
|
import { openFeedbackDialog } from '../../../feedback';
|
||||||
|
@ -1264,6 +1265,8 @@ class Toolbox extends Component<Props, State> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { containerClassName }>
|
<div className = { containerClassName }>
|
||||||
|
<div className = 'toolbox-content-wrapper'>
|
||||||
|
<InviteMore />
|
||||||
<div className = 'toolbox-content-items'>
|
<div className = 'toolbox-content-items'>
|
||||||
{ this._renderAudioButton() }
|
{ this._renderAudioButton() }
|
||||||
{ this._renderVideoButton() }
|
{ this._renderVideoButton() }
|
||||||
|
@ -1282,6 +1285,7 @@ class Toolbox extends Component<Props, State> {
|
||||||
visible = { this._shouldShowButton('hangup') } />
|
visible = { this._shouldShowButton('hangup') } />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue