Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(InviteMore): Relocate invite prompt for mobile friendliness.
Mihai-Andrei Uscata22d054b1036
diff --git a/css/_toolbars.scss b/css/_toolbars.scssindex abf6b0c89f..30de2bf29b 100644--- a/css/_toolbars.scss+++ b/css/_toolbars.scss@@ -98,6 +98,12 @@}}+.toolbox-content-wrapper {+ display: flex;+ flex-direction: column;+ margin: 0 auto;+ max-width: 100%;+}.toolbox-content-items {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 {@media (max-width: 500px) {margin-bottom: 0;+ .toolbox-content-wrapper {+ width: 100%;+ }+.toolbox-content-items {border-radius: 0;display: flex;@@ -308,5 +318,13 @@padding: 6px 0;width: 100%;}++ .invite-more-container {+ margin: 0 16px 8px;+ }++ .invite-more-container.elevated {+ margin-bottom: 52px;+ }}}diff --git a/css/modals/invite/_invite_more.scss b/css/modals/invite/_invite_more.scssindex 2ea7162d91..56ef05cf39 100644--- a/css/modals/invite/_invite_more.scss+++ b/css/modals/invite/_invite_more.scss@@ -1,31 +1,42 @@.invite-more {&-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;+ font-size: 16px;+ line-height: 24px;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 {- font-size: 19px;- line-height: 28px;- margin: 24px 0 16px 0;+ max-width: 100%;+ margin-bottom: 16px;+ text-overflow: ellipsis;+ overflow: hidden;+ white-space: nowrap;}&-button {display: flex;- margin: auto;- padding: 8px 16px;- width: fit-content;- width: -moz-fit-content;- height: 24px;+ max-width: 100%;+ height: 48px;+ box-sizing: border-box;+ padding: 12px 16px;background: #0376DA;border-radius: 3px;- font-size: 14px;- line-height: 24px;cursor: pointer;@media (hover: hover) and (pointer: fine) {@@ -36,8 +47,9 @@&-text {margin-left: 8px;- font-size: 15px;- line-height: 24px;+ text-overflow: ellipsis;+ overflow: hidden;+ white-space: nowrap;}}&-dialog {diff --git a/react/features/conference/components/web/InviteMore.js b/react/features/conference/components/web/InviteMore.jsindex cc7413db0e..a7c78ceacb 100644--- a/react/features/conference/components/web/InviteMore.js+++ b/react/features/conference/components/web/InviteMore.js@@ -14,10 +14,14 @@ declare var interfaceConfig: Object;type Props = {/**- * Whether to show the option to invite more people- * instead of the subject.+ * Whether to show the option to invite more people.*/- _visible: boolean,+ _shouldShow: boolean,++ /**+ * Whether the toolbox is visible.+ */+ _toolboxVisible: boolean,/*** Handler to open the invite dialog.@@ -38,22 +42,25 @@ type Props = {* @returns {React$Element<any>}*/function InviteMore({- _visible,+ _shouldShow,+ _toolboxVisible,onClick,t}: Props) {return (- _visible- ? <div className = 'invite-more-container'>- <div className = 'invite-more-header'>- {t('addPeople.inviteMoreHeader')}- </div>- <div- className = 'invite-more-button'- onClick = { onClick }>- <Icon src = { IconInviteMore } />- <div className = 'invite-more-button-text'>- {t('addPeople.inviteMorePrompt')}+ _shouldShow+ ? <div className = { `invite-more-container${_toolboxVisible ? '' : ' elevated'}` }>+ <div className = 'invite-more-content'>+ <div className = 'invite-more-header'>+ {t('addPeople.inviteMoreHeader')}+ </div>+ <div+ className = 'invite-more-button'+ onClick = { onClick }>+ <Icon src = { IconInviteMore } />+ <div className = 'invite-more-button-text'>+ {t('addPeople.inviteMorePrompt')}+ </div></div></div></div> : null@@ -74,7 +81,8 @@ function mapStateToProps(state) {const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;return {- _visible: isToolboxVisible(state) && isButtonEnabled('invite', state) && isAlone && !hide+ _shouldShow: isButtonEnabled('invite', state) && isAlone && !hide,+ _toolboxVisible: isToolboxVisible(state)};}diff --git a/react/features/conference/components/web/Subject.js b/react/features/conference/components/web/Subject.jsindex 020047315c..62ad2db3f8 100644--- a/react/features/conference/components/web/Subject.js+++ b/react/features/conference/components/web/Subject.js@@ -96,7 +96,7 @@ function _mapStateToProps(state) {_showParticipantCount: participantCount > 2 && !hideParticipantsStats,_showSubject: !hideConferenceSubject,_subject: getConferenceName(state),- _visible: isToolboxVisible(state) && participantCount > 1+ _visible: isToolboxVisible(state)};}diff --git a/react/features/large-video/components/LargeVideo.web.js b/react/features/large-video/components/LargeVideo.web.jsindex aed30eb544..b54edec0a3 100644--- a/react/features/large-video/components/LargeVideo.web.js+++ b/react/features/large-video/components/LargeVideo.web.js@@ -4,7 +4,7 @@ import React, { Component } from 'react';import { Watermarks } from '../../base/react';import { connect } from '../../base/redux';-import { InviteMore, Subject } from '../../conference';+import { Subject } from '../../conference';import { fetchCustomBrandingData } from '../../dynamic-branding';import { Captions } from '../../subtitles/';@@ -71,7 +71,6 @@ class LargeVideo extends Component<Props> {id = 'largeVideoContainer'style = { style }><Subject />- <InviteMore /><div id = 'sharedVideo'><div id = 'sharedVideoIFrame' /></div>diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.jsindex a5ae8eb415..81794dacdd 100644--- a/react/features/toolbox/components/web/Toolbox.js+++ b/react/features/toolbox/components/web/Toolbox.js@@ -36,6 +36,7 @@ import { OverflowMenuItem } from '../../../base/toolbox/components';import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';import { isVpaasMeeting } from '../../../billing-counter/functions';import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';+import { InviteMore } from '../../../conference';import { EmbedMeetingDialog } from '../../../embed-meeting';import { SharedDocumentButton } from '../../../etherpad';import { openFeedbackDialog } from '../../../feedback';@@ -1264,22 +1265,25 @@ class Toolbox extends Component<Props, State> {return (<div className = { containerClassName }>- <div className = 'toolbox-content-items'>- { this._renderAudioButton() }- { this._renderVideoButton() }- { mainMenuAdditionalButtons }- { showOverflowMenuButton && <OverflowMenuButton- isOpen = { _overflowMenuVisible }- onVisibilityChange = { this._onSetOverflowVisible }>- <ul- aria-label = { t(toolbarAccLabel) }- className = 'overflow-menu'>- { this._renderOverflowMenuContent(overflowMenuAdditionalButtons) }- </ul>- </OverflowMenuButton>}- <HangupButton- customClass = 'hangup-button'- visible = { this._shouldShowButton('hangup') } />+ <div className = 'toolbox-content-wrapper'>+ <InviteMore />+ <div className = 'toolbox-content-items'>+ { this._renderAudioButton() }+ { this._renderVideoButton() }+ { mainMenuAdditionalButtons }+ { showOverflowMenuButton && <OverflowMenuButton+ isOpen = { _overflowMenuVisible }+ onVisibilityChange = { this._onSetOverflowVisible }>+ <ul+ aria-label = { t(toolbarAccLabel) }+ className = 'overflow-menu'>+ { this._renderOverflowMenuContent(overflowMenuAdditionalButtons) }+ </ul>+ </OverflowMenuButton>}+ <HangupButton+ customClass = 'hangup-button'+ visible = { this._shouldShowButton('hangup') } />+ </div></div></div>);