Pārlūkot izejas kodu

feat: Show footer context menu in p2p.

master
Дамян Минков 4 gadus atpakaļ
vecāks
revīzija
2616e126fb

+ 8
- 21
react/features/participants-pane/components/web/ParticipantsPane.js Parādīt failu

@@ -5,10 +5,7 @@ import { ThemeProvider } from 'styled-components';
5 5
 
6 6
 import { openDialog } from '../../../base/dialog';
7 7
 import { translate } from '../../../base/i18n';
8
-import {
9
-    getParticipantCount,
10
-    isLocalParticipantModerator
11
-} from '../../../base/participants';
8
+import { isLocalParticipantModerator } from '../../../base/participants';
12 9
 import { connect } from '../../../base/redux';
13 10
 import { MuteEveryoneDialog } from '../../../video-menu/components/';
14 11
 import { close } from '../../actions';
@@ -39,11 +36,6 @@ type Props = {
39 36
      */
40 37
     _paneOpen: boolean,
41 38
 
42
-    /**
43
-     * Whether to show context menu.
44
-     */
45
-    _showContextMenu: boolean,
46
-
47 39
     /**
48 40
      * Whether to show the footer menu.
49 41
      */
@@ -122,7 +114,6 @@ class ParticipantsPane extends Component<Props, State> {
122 114
     render() {
123 115
         const {
124 116
             _paneOpen,
125
-            _showContextMenu,
126 117
             _showFooter,
127 118
             t
128 119
         } = this.props;
@@ -155,15 +146,13 @@ class ParticipantsPane extends Component<Props, State> {
155 146
                                 <FooterButton onClick = { this._onMuteAll }>
156 147
                                     {t('participantsPane.actions.muteAll')}
157 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 156
                             </Footer>
168 157
                         )}
169 158
                     </div>
@@ -249,7 +238,6 @@ class ParticipantsPane extends Component<Props, State> {
249 238
  * @protected
250 239
  * @returns {{
251 240
  *     _paneOpen: boolean,
252
- *     _showContextMenu: boolean,
253 241
  *     _showFooter: boolean
254 242
  * }}
255 243
  */
@@ -258,7 +246,6 @@ function _mapStateToProps(state: Object) {
258 246
 
259 247
     return {
260 248
         _paneOpen: isPaneOpen,
261
-        _showContextMenu: isPaneOpen && getParticipantCount(state) > 2,
262 249
         _showFooter: isPaneOpen && isLocalParticipantModerator(state)
263 250
     };
264 251
 }

Notiek ielāde…
Atcelt
Saglabāt