Sfoglia il codice sorgente

feat: Show footer context menu in p2p.

master
Дамян Минков 4 anni fa
parent
commit
2616e126fb

+ 8
- 21
react/features/participants-pane/components/web/ParticipantsPane.js Vedi File

5
 
5
 
6
 import { openDialog } from '../../../base/dialog';
6
 import { openDialog } from '../../../base/dialog';
7
 import { translate } from '../../../base/i18n';
7
 import { translate } from '../../../base/i18n';
8
-import {
9
-    getParticipantCount,
10
-    isLocalParticipantModerator
11
-} from '../../../base/participants';
8
+import { isLocalParticipantModerator } from '../../../base/participants';
12
 import { connect } from '../../../base/redux';
9
 import { connect } from '../../../base/redux';
13
 import { MuteEveryoneDialog } from '../../../video-menu/components/';
10
 import { MuteEveryoneDialog } from '../../../video-menu/components/';
14
 import { close } from '../../actions';
11
 import { close } from '../../actions';
39
      */
36
      */
40
     _paneOpen: boolean,
37
     _paneOpen: boolean,
41
 
38
 
42
-    /**
43
-     * Whether to show context menu.
44
-     */
45
-    _showContextMenu: boolean,
46
-
47
     /**
39
     /**
48
      * Whether to show the footer menu.
40
      * Whether to show the footer menu.
49
      */
41
      */
122
     render() {
114
     render() {
123
         const {
115
         const {
124
             _paneOpen,
116
             _paneOpen,
125
-            _showContextMenu,
126
             _showFooter,
117
             _showFooter,
127
             t
118
             t
128
         } = this.props;
119
         } = this.props;
155
                                 <FooterButton onClick = { this._onMuteAll }>
146
                                 <FooterButton onClick = { this._onMuteAll }>
156
                                     {t('participantsPane.actions.muteAll')}
147
                                     {t('participantsPane.actions.muteAll')}
157
                                 </FooterButton>
148
                                 </FooterButton>
158
-                                {_showContextMenu && (
159
-                                    <FooterEllipsisContainer>
160
-                                        <FooterEllipsisButton
161
-                                            id = 'participants-pane-context-menu'
162
-                                            onClick = { this._onToggleContext } />
163
-                                        {this.state.contextOpen
164
-                                            && <FooterContextMenu onMouseLeave = { this._onToggleContext } />}
165
-                                    </FooterEllipsisContainer>
166
-                                )}
149
+                                <FooterEllipsisContainer>
150
+                                    <FooterEllipsisButton
151
+                                        id = 'participants-pane-context-menu'
152
+                                        onClick = { this._onToggleContext } />
153
+                                    {this.state.contextOpen
154
+                                        && <FooterContextMenu onMouseLeave = { this._onToggleContext } />}
155
+                                </FooterEllipsisContainer>
167
                             </Footer>
156
                             </Footer>
168
                         )}
157
                         )}
169
                     </div>
158
                     </div>
249
  * @protected
238
  * @protected
250
  * @returns {{
239
  * @returns {{
251
  *     _paneOpen: boolean,
240
  *     _paneOpen: boolean,
252
- *     _showContextMenu: boolean,
253
  *     _showFooter: boolean
241
  *     _showFooter: boolean
254
  * }}
242
  * }}
255
  */
243
  */
258
 
246
 
259
     return {
247
     return {
260
         _paneOpen: isPaneOpen,
248
         _paneOpen: isPaneOpen,
261
-        _showContextMenu: isPaneOpen && getParticipantCount(state) > 2,
262
         _showFooter: isPaneOpen && isLocalParticipantModerator(state)
249
         _showFooter: isPaneOpen && isLocalParticipantModerator(state)
263
     };
250
     };
264
 }
251
 }

Loading…
Annulla
Salva