Переглянути джерело

Restore dots menu on mobile

master
Jesús Espino 5 роки тому
джерело
коміт
1426a5b4bc
1 змінених файлів з 7 додано та 4 видалено
  1. 7
    4
      react/features/toolbox/components/web/Toolbox.js

+ 7
- 4
react/features/toolbox/components/web/Toolbox.js Переглянути файл

@@ -30,6 +30,7 @@ import {
30 30
     participantUpdated
31 31
 } from '../../../base/participants';
32 32
 import { connect, equals } from '../../../base/redux';
33
+import { isMobileBrowser } from '../../../base/environment/utils';
33 34
 import { OverflowMenuItem } from '../../../base/toolbox/components';
34 35
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
35 36
 import { VideoBlurButton } from '../../../blur';
@@ -1233,6 +1234,8 @@ class Toolbox extends Component<Props, State> {
1233 1234
             / 2 // divide by the number of groups(left and right group)
1234 1235
         );
1235 1236
 
1237
+        const showOverflowMenu = this.state.windowWidth >= verySmallThreshold || isMobileBrowser();
1238
+
1236 1239
         if (this._shouldShowButton('chat')) {
1237 1240
             buttonsLeft.push('chat');
1238 1241
         }
@@ -1246,7 +1249,7 @@ class Toolbox extends Component<Props, State> {
1246 1249
         if (this._shouldShowButton('closedcaptions')) {
1247 1250
             buttonsLeft.push('closedcaptions');
1248 1251
         }
1249
-        if (overflowHasItems && this.state.windowWidth >= verySmallThreshold) {
1252
+        if (overflowHasItems && showOverflowMenu) {
1250 1253
             buttonsRight.push('overflowmenu');
1251 1254
         }
1252 1255
         if (this._shouldShowButton('invite')) {
@@ -1269,13 +1272,13 @@ class Toolbox extends Component<Props, State> {
1269 1272
             movedButtons.push(...buttonsLeft.splice(
1270 1273
                 maxNumberOfButtonsPerGroup,
1271 1274
                 buttonsLeft.length - maxNumberOfButtonsPerGroup));
1272
-            if (buttonsRight.indexOf('overflowmenu') === -1 && this.state.windowWidth >= verySmallThreshold) {
1275
+            if (buttonsRight.indexOf('overflowmenu') === -1 && showOverflowMenu) {
1273 1276
                 buttonsRight.unshift('overflowmenu');
1274 1277
             }
1275 1278
         }
1276 1279
 
1277 1280
         if (buttonsRight.length > maxNumberOfButtonsPerGroup) {
1278
-            if (buttonsRight.indexOf('overflowmenu') === -1 && this.state.windowWidth >= verySmallThreshold) {
1281
+            if (buttonsRight.indexOf('overflowmenu') === -1 && showOverflowMenu) {
1279 1282
                 buttonsRight.unshift('overflowmenu');
1280 1283
             }
1281 1284
 
@@ -1346,7 +1349,7 @@ class Toolbox extends Component<Props, State> {
1346 1349
                             tooltip = { t('toolbar.invite') } /> }
1347 1350
                     { buttonsRight.indexOf('security') !== -1
1348 1351
                         && <SecurityDialogButton customClass = 'security-toolbar-button' /> }
1349
-                    { buttonsRight.indexOf('overflowmenu') !== -1 && this.state.windowWidth >= verySmallThreshold
1352
+                    { buttonsRight.indexOf('overflowmenu') !== -1
1350 1353
                         && <OverflowMenuButton
1351 1354
                             isOpen = { _overflowMenuVisible }
1352 1355
                             onVisibilityChange = { this._onSetOverflowVisible }>

Завантаження…
Відмінити
Зберегти