Restore dots menu on mobile
This commit is contained in:
parent
858ee557d4
commit
1426a5b4bc
|
@ -30,6 +30,7 @@ import {
|
||||||
participantUpdated
|
participantUpdated
|
||||||
} from '../../../base/participants';
|
} from '../../../base/participants';
|
||||||
import { connect, equals } from '../../../base/redux';
|
import { connect, equals } from '../../../base/redux';
|
||||||
|
import { isMobileBrowser } from '../../../base/environment/utils';
|
||||||
import { OverflowMenuItem } from '../../../base/toolbox/components';
|
import { OverflowMenuItem } from '../../../base/toolbox/components';
|
||||||
import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
|
import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
|
||||||
import { VideoBlurButton } from '../../../blur';
|
import { VideoBlurButton } from '../../../blur';
|
||||||
|
@ -1233,6 +1234,8 @@ class Toolbox extends Component<Props, State> {
|
||||||
/ 2 // divide by the number of groups(left and right group)
|
/ 2 // divide by the number of groups(left and right group)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const showOverflowMenu = this.state.windowWidth >= verySmallThreshold || isMobileBrowser();
|
||||||
|
|
||||||
if (this._shouldShowButton('chat')) {
|
if (this._shouldShowButton('chat')) {
|
||||||
buttonsLeft.push('chat');
|
buttonsLeft.push('chat');
|
||||||
}
|
}
|
||||||
|
@ -1246,7 +1249,7 @@ class Toolbox extends Component<Props, State> {
|
||||||
if (this._shouldShowButton('closedcaptions')) {
|
if (this._shouldShowButton('closedcaptions')) {
|
||||||
buttonsLeft.push('closedcaptions');
|
buttonsLeft.push('closedcaptions');
|
||||||
}
|
}
|
||||||
if (overflowHasItems && this.state.windowWidth >= verySmallThreshold) {
|
if (overflowHasItems && showOverflowMenu) {
|
||||||
buttonsRight.push('overflowmenu');
|
buttonsRight.push('overflowmenu');
|
||||||
}
|
}
|
||||||
if (this._shouldShowButton('invite')) {
|
if (this._shouldShowButton('invite')) {
|
||||||
|
@ -1269,13 +1272,13 @@ class Toolbox extends Component<Props, State> {
|
||||||
movedButtons.push(...buttonsLeft.splice(
|
movedButtons.push(...buttonsLeft.splice(
|
||||||
maxNumberOfButtonsPerGroup,
|
maxNumberOfButtonsPerGroup,
|
||||||
buttonsLeft.length - maxNumberOfButtonsPerGroup));
|
buttonsLeft.length - maxNumberOfButtonsPerGroup));
|
||||||
if (buttonsRight.indexOf('overflowmenu') === -1 && this.state.windowWidth >= verySmallThreshold) {
|
if (buttonsRight.indexOf('overflowmenu') === -1 && showOverflowMenu) {
|
||||||
buttonsRight.unshift('overflowmenu');
|
buttonsRight.unshift('overflowmenu');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buttonsRight.length > maxNumberOfButtonsPerGroup) {
|
if (buttonsRight.length > maxNumberOfButtonsPerGroup) {
|
||||||
if (buttonsRight.indexOf('overflowmenu') === -1 && this.state.windowWidth >= verySmallThreshold) {
|
if (buttonsRight.indexOf('overflowmenu') === -1 && showOverflowMenu) {
|
||||||
buttonsRight.unshift('overflowmenu');
|
buttonsRight.unshift('overflowmenu');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1346,7 +1349,7 @@ class Toolbox extends Component<Props, State> {
|
||||||
tooltip = { t('toolbar.invite') } /> }
|
tooltip = { t('toolbar.invite') } /> }
|
||||||
{ buttonsRight.indexOf('security') !== -1
|
{ buttonsRight.indexOf('security') !== -1
|
||||||
&& <SecurityDialogButton customClass = 'security-toolbar-button' /> }
|
&& <SecurityDialogButton customClass = 'security-toolbar-button' /> }
|
||||||
{ buttonsRight.indexOf('overflowmenu') !== -1 && this.state.windowWidth >= verySmallThreshold
|
{ buttonsRight.indexOf('overflowmenu') !== -1
|
||||||
&& <OverflowMenuButton
|
&& <OverflowMenuButton
|
||||||
isOpen = { _overflowMenuVisible }
|
isOpen = { _overflowMenuVisible }
|
||||||
onVisibilityChange = { this._onSetOverflowVisible }>
|
onVisibilityChange = { this._onSetOverflowVisible }>
|
||||||
|
|
Loading…
Reference in New Issue