Преглед изворни кода

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

Loading…
Откажи
Сачувај