瀏覽代碼

feat(native-participants-pane) implemented review remarks pt. 3

master
Calin Chitu 3 年之前
父節點
當前提交
665b7730ee

+ 2
- 0
lang/main.json 查看文件

601
             "blockEveryoneMicCamera": "Block everyone's mic and camera",
601
             "blockEveryoneMicCamera": "Block everyone's mic and camera",
602
             "invite": "Invite Someone",
602
             "invite": "Invite Someone",
603
             "askUnmute": "Ask to unmute",
603
             "askUnmute": "Ask to unmute",
604
+            "mute": "Mute",
604
             "muteAll": "Mute all",
605
             "muteAll": "Mute all",
606
+            "muteEveryoneElse": "Mute everyone else",
605
             "startModeration": "Unmute themselves or start video",
607
             "startModeration": "Unmute themselves or start video",
606
             "stopEveryonesVideo": "Stop everyone's video",
608
             "stopEveryonesVideo": "Stop everyone's video",
607
             "stopVideo": "Stop video",
609
             "stopVideo": "Stop video",

+ 1
- 1
react/features/base/react/components/native/HeaderWithNavigation.js 查看文件

56
         const { hideHeaderWithNavigation, onPressBack, onPressForward } = this.props;
56
         const { hideHeaderWithNavigation, onPressBack, onPressForward } = this.props;
57
 
57
 
58
         return (
58
         return (
59
-            !{ hideHeaderWithNavigation }
59
+            !hideHeaderWithNavigation
60
                     && <Header>
60
                     && <Header>
61
                         { onPressBack && <BackButton onPress = { onPressBack } /> }
61
                         { onPressBack && <BackButton onPress = { onPressBack } /> }
62
                         <HeaderLabel labelKey = { this.props.headerLabelKey } />
62
                         <HeaderLabel labelKey = { this.props.headerLabelKey } />

+ 4
- 4
react/features/participants-pane/components/native/ContextMenuLobbyParticipantReject.js 查看文件

35
             onCancel = { cancel }
35
             onCancel = { cancel }
36
             style = { styles.contextMenuMore }>
36
             style = { styles.contextMenuMore }>
37
             <View
37
             <View
38
-                style = { styles.contextMenuItemSection }>
38
+                style = { styles.contextMenuItemSectionAvatar }>
39
                 <Avatar
39
                 <Avatar
40
                     className = 'participant-avatar'
40
                     className = 'participant-avatar'
41
                     participantId = { p.id }
41
                     participantId = { p.id }
42
-                    size = { 20 } />
43
-                <View style = { styles.contextMenuItemText }>
42
+                    size = { 30 } />
43
+                <View style = { styles.contextMenuItemAvatarText }>
44
                     <Text style = { styles.contextMenuItemName }>
44
                     <Text style = { styles.contextMenuItemName }>
45
                         { displayName }
45
                         { displayName }
46
                     </Text>
46
                     </Text>
51
                 onPress = { reject }
51
                 onPress = { reject }
52
                 style = { styles.contextMenuItem }>
52
                 style = { styles.contextMenuItem }>
53
                 <Icon
53
                 <Icon
54
-                    size = { 20 }
54
+                    size = { 24 }
55
                     src = { IconClose }
55
                     src = { IconClose }
56
                     style = { styles.contextMenuItemIcon } />
56
                     style = { styles.contextMenuItemIcon } />
57
                 <Text style = { styles.contextMenuItemText }>{ t('lobby.reject') }</Text>
57
                 <Text style = { styles.contextMenuItemText }>{ t('lobby.reject') }</Text>

+ 9
- 9
react/features/participants-pane/components/native/ContextMenuMeetingParticipantDetails.js 查看文件

74
     return (
74
     return (
75
         <BottomSheet
75
         <BottomSheet
76
             onCancel = { cancel }
76
             onCancel = { cancel }
77
-            style = { styles.contextMenuMore }>
77
+            style = { styles.contextMenuMeetingParticipantDetails }>
78
             <View
78
             <View
79
-                style = { styles.contextMenuItemSection }>
79
+                style = { styles.contextMenuItemSectionAvatar }>
80
                 <Avatar
80
                 <Avatar
81
                     className = 'participant-avatar'
81
                     className = 'participant-avatar'
82
                     participantId = { p.id }
82
                     participantId = { p.id }
83
-                    size = { 20 } />
84
-                <View style = { styles.contextMenuItemText }>
83
+                    size = { 30 } />
84
+                <View style = { styles.contextMenuItemAvatarText }>
85
                     <Text style = { styles.contextMenuItemName }>
85
                     <Text style = { styles.contextMenuItemName }>
86
                         { displayName }
86
                         { displayName }
87
                     </Text>
87
                     </Text>
94
                     onPress = { muteAudio }
94
                     onPress = { muteAudio }
95
                     style = { styles.contextMenuItem }>
95
                     style = { styles.contextMenuItem }>
96
                     <Icon
96
                     <Icon
97
-                        size = { 20 }
97
+                        size = { 24 }
98
                         src = { IconMicrophoneEmptySlash }
98
                         src = { IconMicrophoneEmptySlash }
99
                         style = { styles.contextMenuItemIcon } />
99
                         style = { styles.contextMenuItemIcon } />
100
                     <Text style = { styles.contextMenuItemText }>
100
                     <Text style = { styles.contextMenuItemText }>
108
                     onPress = { muteEveryoneElse }
108
                     onPress = { muteEveryoneElse }
109
                     style = { styles.contextMenuItem }>
109
                     style = { styles.contextMenuItem }>
110
                     <Icon
110
                     <Icon
111
-                        size = { 20 }
111
+                        size = { 24 }
112
                         src = { IconMuteEveryoneElse }
112
                         src = { IconMuteEveryoneElse }
113
                         style = { styles.contextMenuItemIcon } />
113
                         style = { styles.contextMenuItemIcon } />
114
                     <Text style = { styles.contextMenuItemText }>
114
                     <Text style = { styles.contextMenuItemText }>
124
                         onPress = { muteVideo }
124
                         onPress = { muteVideo }
125
                         style = { styles.contextMenuItemSection }>
125
                         style = { styles.contextMenuItemSection }>
126
                         <Icon
126
                         <Icon
127
-                            size = { 20 }
127
+                            size = { 24 }
128
                             src = { IconVideoOff }
128
                             src = { IconVideoOff }
129
                             style = { styles.contextMenuItemIcon } />
129
                             style = { styles.contextMenuItemIcon } />
130
                         <Text style = { styles.contextMenuItemText }>
130
                         <Text style = { styles.contextMenuItemText }>
139
                     onPress = { kickRemoteParticipant }
139
                     onPress = { kickRemoteParticipant }
140
                     style = { styles.contextMenuItem }>
140
                     style = { styles.contextMenuItem }>
141
                     <Icon
141
                     <Icon
142
-                        size = { 20 }
142
+                        size = { 24 }
143
                         src = { IconCloseCircle }
143
                         src = { IconCloseCircle }
144
                         style = { styles.contextMenuItemIcon } />
144
                         style = { styles.contextMenuItemIcon } />
145
                     <Text style = { styles.contextMenuItemText }>
145
                     <Text style = { styles.contextMenuItemText }>
151
                 onPress = { sendPrivateMessage }
151
                 onPress = { sendPrivateMessage }
152
                 style = { styles.contextMenuItem }>
152
                 style = { styles.contextMenuItem }>
153
                 <Icon
153
                 <Icon
154
-                    size = { 20 }
154
+                    size = { 24 }
155
                     src = { IconMessage }
155
                     src = { IconMessage }
156
                     style = { styles.contextMenuItemIcon } />
156
                     style = { styles.contextMenuItemIcon } />
157
                 <Text style = { styles.contextMenuItemText }>
157
                 <Text style = { styles.contextMenuItemText }>

+ 2
- 2
react/features/participants-pane/components/native/ContextMenuMore.js 查看文件

38
                 onPress = { muteAllVideo }
38
                 onPress = { muteAllVideo }
39
                 style = { styles.contextMenuItem }>
39
                 style = { styles.contextMenuItem }>
40
                 <Icon
40
                 <Icon
41
-                    size = { 20 }
41
+                    size = { 24 }
42
                     src = { IconVideoOff } />
42
                     src = { IconVideoOff } />
43
                 <Text style = { styles.contextMenuItemText }>{t('participantsPane.actions.stopEveryonesVideo')}</Text>
43
                 <Text style = { styles.contextMenuItemText }>{t('participantsPane.actions.stopEveryonesVideo')}</Text>
44
             </TouchableOpacity>
44
             </TouchableOpacity>
46
                 onPress = { blockAudioVideo }
46
                 onPress = { blockAudioVideo }
47
                 style = { styles.contextMenuItem }>
47
                 style = { styles.contextMenuItem }>
48
                 <Icon
48
                 <Icon
49
-                    size = { 20 }
49
+                    size = { 24 }
50
                     src = { IconMicDisabledHollow }
50
                     src = { IconMicDisabledHollow }
51
                     style = { styles.contextMenuIcon } />
51
                     style = { styles.contextMenuIcon } />
52
                 <Text style = { styles.contextMenuItemText }>
52
                 <Text style = { styles.contextMenuItemText }>

+ 7
- 7
react/features/participants-pane/components/native/ParticipantsPane.js 查看文件

10
 import { Icon, IconClose, IconHorizontalPoints } from '../../../base/icons';
10
 import { Icon, IconClose, IconHorizontalPoints } from '../../../base/icons';
11
 import { JitsiModal } from '../../../base/modal';
11
 import { JitsiModal } from '../../../base/modal';
12
 import {
12
 import {
13
-    getParticipantCount, isEveryoneModerator,
13
+    getParticipantCount,
14
+    isEveryoneModerator,
14
     isLocalParticipantModerator
15
     isLocalParticipantModerator
15
 } from '../../../base/participants';
16
 } from '../../../base/participants';
16
 import MuteEveryoneDialog
17
 import MuteEveryoneDialog
20
 import { ContextMenuMore } from './ContextMenuMore';
21
 import { ContextMenuMore } from './ContextMenuMore';
21
 import { LobbyParticipantList } from './LobbyParticipantList';
22
 import { LobbyParticipantList } from './LobbyParticipantList';
22
 import { MeetingParticipantList } from './MeetingParticipantList';
23
 import { MeetingParticipantList } from './MeetingParticipantList';
23
-import styles, { button } from './styles';
24
+import styles from './styles';
24
 
25
 
25
 /**
26
 /**
26
  * Participant pane.
27
  * Participant pane.
34
     const isLocalModerator = useSelector(isLocalParticipantModerator);
35
     const isLocalModerator = useSelector(isLocalParticipantModerator);
35
     const participantsCount = useSelector(getParticipantCount);
36
     const participantsCount = useSelector(getParticipantCount);
36
     const everyoneModerator = useSelector(isEveryoneModerator);
37
     const everyoneModerator = useSelector(isEveryoneModerator);
37
-    const showContextMenu = !everyoneModerator && participantsCount > 2;
38
+    const showContextMenu = true;
38
     const muteAll = useCallback(() => dispatch(openDialog(MuteEveryoneDialog)),
39
     const muteAll = useCallback(() => dispatch(openDialog(MuteEveryoneDialog)),
39
         [ dispatch ]);
40
         [ dispatch ]);
40
     const { t } = useTranslation();
41
     const { t } = useTranslation();
45
             style = { styles.participantsPane }>
46
             style = { styles.participantsPane }>
46
             <View style = { styles.header }>
47
             <View style = { styles.header }>
47
                 <Button
48
                 <Button
48
-                    contentStyle = { styles.closeIcon }
49
                     /* eslint-disable-next-line react/jsx-no-bind */
49
                     /* eslint-disable-next-line react/jsx-no-bind */
50
                     icon = { () =>
50
                     icon = { () =>
51
                         (<Icon
51
                         (<Icon
52
                             size = { 24 }
52
                             size = { 24 }
53
                             src = { IconClose } />)
53
                             src = { IconClose } />)
54
                     }
54
                     }
55
+                    labelStyle = { styles.closeIcon }
55
                     mode = 'contained'
56
                     mode = 'contained'
56
                     onPress = { closePane }
57
                     onPress = { closePane }
57
                     style = { styles.closeButton } />
58
                     style = { styles.closeButton } />
65
                 && <View style = { styles.footer }>
66
                 && <View style = { styles.footer }>
66
                     <Button
67
                     <Button
67
                         children = { t('participantsPane.actions.muteAll') }
68
                         children = { t('participantsPane.actions.muteAll') }
68
-                        contentStyle = { styles.muteAllContent }
69
                         labelStyle = { styles.muteAllLabel }
69
                         labelStyle = { styles.muteAllLabel }
70
                         mode = 'contained'
70
                         mode = 'contained'
71
                         onPress = { muteAll }
71
                         onPress = { muteAll }
72
-                        style = { showContextMenu ? styles.muteAllButton : button } />
72
+                        style = { showContextMenu ? styles.muteAllMoreButton : styles.muteAllButton } />
73
                     {
73
                     {
74
                         showContextMenu
74
                         showContextMenu
75
                         && <Button
75
                         && <Button
76
-                            contentStyle = { styles.moreIcon }
77
                             /* eslint-disable-next-line react/jsx-no-bind */
76
                             /* eslint-disable-next-line react/jsx-no-bind */
78
                             icon = { () =>
77
                             icon = { () =>
79
                                 (<Icon
78
                                 (<Icon
80
                                     size = { 24 }
79
                                     size = { 24 }
81
                                     src = { IconHorizontalPoints } />)
80
                                     src = { IconHorizontalPoints } />)
82
                             }
81
                             }
82
+                            labelStyle = { styles.moreIcon }
83
                             mode = 'contained'
83
                             mode = 'contained'
84
                             onPress = { openMoreMenu }
84
                             onPress = { openMoreMenu }
85
                             style = { styles.moreButton } />
85
                             style = { styles.moreButton } />

+ 66
- 19
react/features/participants-pane/components/native/styles.js 查看文件

22
     flex: 1
22
     flex: 1
23
 };
23
 };
24
 
24
 
25
+/**
26
+ * The style for the context menu items text.
27
+ */
28
+const contextMenuItemText = {
29
+    ...BaseTheme.typography.bodyShortRegularLarge,
30
+    color: BaseTheme.palette.text01
31
+};
32
+
25
 /**
33
 /**
26
  * The style of the participants pane buttons.
34
  * The style of the participants pane buttons.
27
  */
35
  */
28
 export const button = {
36
 export const button = {
29
-    alignItems: 'center',
30
     backgroundColor: BaseTheme.palette.action02,
37
     backgroundColor: BaseTheme.palette.action02,
31
     borderRadius: BaseTheme.shape.borderRadius,
38
     borderRadius: BaseTheme.shape.borderRadius,
32
     display: 'flex',
39
     display: 'flex',
33
-    justifyContent: 'center',
34
-    marginLeft: 'auto'
40
+    minWidth: 0
35
 };
41
 };
36
 
42
 
37
 /**
43
 /**
38
  * Small buttons.
44
  * Small buttons.
39
  */
45
  */
40
 const smallButton = {
46
 const smallButton = {
41
-    ...button
47
+    ...button,
48
+    height: BaseTheme.spacing[7],
49
+    width: BaseTheme.spacing[7]
50
+};
51
+
52
+/**
53
+ * Mute all button.
54
+ */
55
+const muteAllButton = {
56
+    ...button,
57
+    marginLeft: 'auto'
42
 };
58
 };
43
 
59
 
44
 /**
60
 /**
46
  */
62
  */
47
 const buttonContent = {
63
 const buttonContent = {
48
     ...BaseTheme.typography.labelButton,
64
     ...BaseTheme.typography.labelButton,
65
+    alignSelf: 'center',
49
     color: BaseTheme.palette.text01,
66
     color: BaseTheme.palette.text01,
50
     justifyContent: 'center'
67
     justifyContent: 'center'
51
 };
68
 };
213
         display: 'flex',
230
         display: 'flex',
214
         flexDirection: 'row',
231
         flexDirection: 'row',
215
         height: BaseTheme.spacing[10],
232
         height: BaseTheme.spacing[10],
233
+        justifyContent: 'space-between',
216
         paddingRight: BaseTheme.spacing[3],
234
         paddingRight: BaseTheme.spacing[3],
217
         position: 'relative',
235
         position: 'relative',
218
         right: BaseTheme.spacing[0],
236
         right: BaseTheme.spacing[0],
221
 
239
 
222
     closeButton: {
240
     closeButton: {
223
         ...smallButton,
241
         ...smallButton,
224
-        width: BaseTheme.spacing[8]
242
+        marginLeft: 'auto'
225
     },
243
     },
226
 
244
 
227
     closeIcon: {
245
     closeIcon: {
228
         ...buttonContent,
246
         ...buttonContent,
229
-        height: BaseTheme.spacing[8],
230
-        left: BaseTheme.spacing[2]
247
+        height: BaseTheme.spacing[5],
248
+        marginLeft: 'auto',
249
+        paddingTop: 12,
250
+        paddingBottom: 12,
251
+        paddingRight: BaseTheme.spacing[3],
252
+        paddingLeft: BaseTheme.spacing[3]
231
     },
253
     },
232
 
254
 
233
     inviteButton: {
255
     inviteButton: {
243
     },
265
     },
244
 
266
 
245
     moreButton: {
267
     moreButton: {
246
-        ...smallButton,
247
-        width: BaseTheme.spacing[8]
268
+        ...smallButton
248
     },
269
     },
249
 
270
 
250
     moreIcon: {
271
     moreIcon: {
251
         ...buttonContent,
272
         ...buttonContent,
252
-        height: BaseTheme.spacing[8],
253
-        left: BaseTheme.spacing[2]
273
+        height: BaseTheme.spacing[5],
274
+        marginLeft: 'auto',
275
+        paddingTop: 12,
276
+        paddingBottom: 12,
277
+        paddingRight: BaseTheme.spacing[3],
278
+        paddingLeft: BaseTheme.spacing[3]
254
     },
279
     },
255
 
280
 
256
     contextMenuMore: {
281
     contextMenuMore: {
258
         borderRadius: BaseTheme.shape.borderRadius
283
         borderRadius: BaseTheme.shape.borderRadius
259
     },
284
     },
260
 
285
 
286
+    contextMenuMeetingParticipantDetails: {
287
+        backgroundColor: BaseTheme.palette.action02,
288
+        borderRadius: BaseTheme.shape.borderRadius
289
+    },
290
+
261
     muteAllButton: {
291
     muteAllButton: {
262
-        ...button,
263
-        left: BaseTheme.spacing[10] + BaseTheme.spacing[2]
292
+        ...muteAllButton
264
     },
293
     },
265
 
294
 
266
-    muteAllContent: {
267
-        ...buttonContent,
268
-        height: BaseTheme.spacing[8]
295
+    muteAllMoreButton: {
296
+        ...muteAllButton,
297
+        right: BaseTheme.spacing[3]
269
     },
298
     },
270
 
299
 
271
     muteAllLabel: {
300
     muteAllLabel: {
272
         ...BaseTheme.typography.labelButtonLarge,
301
         ...BaseTheme.typography.labelButtonLarge,
273
         color: BaseTheme.palette.text01,
302
         color: BaseTheme.palette.text01,
274
-        textTransform: 'capitalize'
303
+        flexDirection: 'column',
304
+        height: BaseTheme.spacing[7],
305
+        marginVertical: BaseTheme.spacing[0],
306
+        marginHorizontal: BaseTheme.spacing[0],
307
+        paddingTop: 12,
308
+        paddingBottom: 12,
309
+        paddingRight: BaseTheme.spacing[3],
310
+        paddingLeft: BaseTheme.spacing[3],
311
+        textTransform: 'capitalize',
312
+        width: 94
275
     },
313
     },
276
 
314
 
277
     contextMenuItem: {
315
     contextMenuItem: {
282
         ...contextMenuItem
320
         ...contextMenuItem
283
     },
321
     },
284
 
322
 
323
+    contextMenuItemSectionAvatar: {
324
+        ...contextMenuItem,
325
+        marginLeft: BaseTheme.spacing[1]
326
+    },
327
+
328
+    contextMenuItemAvatarText: {
329
+        ...contextMenuItemText,
330
+        marginLeft: BaseTheme.spacing[2]
331
+    },
332
+
285
     contextMenuItemText: {
333
     contextMenuItemText: {
286
-        ...BaseTheme.typography.bodyShortRegularLarge,
287
-        color: BaseTheme.palette.text01,
334
+        ...contextMenuItemText,
288
         marginLeft: BaseTheme.spacing[3]
335
         marginLeft: BaseTheme.spacing[3]
289
     },
336
     },
290
 
337
 

+ 3
- 1
react/features/participants-pane/constants.js 查看文件

3
 import React from 'react';
3
 import React from 'react';
4
 
4
 
5
 import {
5
 import {
6
-    Icon, IconCameraEmpty, IconCameraEmptyDisabled,
6
+    Icon,
7
+    IconCameraEmpty,
8
+    IconCameraEmptyDisabled,
7
     IconMicrophoneEmpty,
9
     IconMicrophoneEmpty,
8
     IconMicrophoneEmptySlash
10
     IconMicrophoneEmptySlash
9
 } from '../base/icons';
11
 } from '../base/icons';

+ 5
- 11
react/features/video-menu/components/native/VolumeSlider.js 查看文件

2
 
2
 
3
 import _ from 'lodash';
3
 import _ from 'lodash';
4
 import React, { PureComponent } from 'react';
4
 import React, { PureComponent } from 'react';
5
-import { View, Slider } from 'react-native';
5
+import { Slider, View } from 'react-native';
6
 import { withTheme } from 'react-native-paper';
6
 import { withTheme } from 'react-native-paper';
7
 
7
 
8
 import { translate } from '../../../base/i18n';
8
 import { translate } from '../../../base/i18n';
9
 import { Icon, IconVolumeEmpty } from '../../../base/icons';
9
 import { Icon, IconVolumeEmpty } from '../../../base/icons';
10
-import {
11
-    getLocalParticipant,
12
-    getParticipantById
13
-} from '../../../base/participants';
14
 import { connect } from '../../../base/redux';
10
 import { connect } from '../../../base/redux';
15
 import { setVolume } from '../../../participants-pane/actions.native';
11
 import { setVolume } from '../../../participants-pane/actions.native';
16
 import { VOLUME_SLIDER_SCALE } from '../../constants';
12
 import { VOLUME_SLIDER_SCALE } from '../../constants';
105
         return (
101
         return (
106
             <View style = { styles.volumeSliderContainer } >
102
             <View style = { styles.volumeSliderContainer } >
107
                 <Icon
103
                 <Icon
108
-                    size = { 20 }
104
+                    size = { 24 }
109
                     src = { IconVolumeEmpty }
105
                     src = { IconVolumeEmpty }
110
                     style = { styles.volumeIcon } />
106
                     style = { styles.volumeIcon } />
111
                 <Slider
107
                 <Slider
148
  */
144
  */
149
 function mapStateToProps(state, ownProps): Object {
145
 function mapStateToProps(state, ownProps): Object {
150
     const { participant } = ownProps;
146
     const { participant } = ownProps;
151
-    const { startSilent } = state['features/base/config'];
147
+    const { id, local } = participant;
152
     const { participantsVolume } = state['features/participants-pane'];
148
     const { participantsVolume } = state['features/participants-pane'];
153
-    const getParticipant = participant.id
154
-        ? getParticipantById(state, participant.id) : getLocalParticipant(state);
155
-    const { id } = getParticipant;
149
+    const { startSilent } = state['features/base/config'];
156
 
150
 
157
     return {
151
     return {
158
         _startSilent: Boolean(startSilent),
152
         _startSilent: Boolean(startSilent),
159
-        _volume: participant.local ? undefined : participantsVolume[id]
153
+        _volume: local ? undefined : participantsVolume[id]
160
     };
154
     };
161
 }
155
 }
162
 
156
 

+ 4
- 3
react/features/video-menu/components/native/styles.js 查看文件

59
     },
59
     },
60
 
60
 
61
     volumeIcon: {
61
     volumeIcon: {
62
-        marginLeft: BaseTheme.spacing[1]
62
+        marginLeft: BaseTheme.spacing[1],
63
+        minWidth: '5%'
63
     },
64
     },
64
 
65
 
65
     sliderContainer: {
66
     sliderContainer: {
66
-        marginLeft: BaseTheme.spacing[2],
67
-        minWidth: '92%'
67
+        marginLeft: BaseTheme.spacing[3],
68
+        minWidth: '90%'
68
     }
69
     }
69
 });
70
 });

Loading…
取消
儲存