浏览代码

feat(native-participants-pane) ui fixes

master
Calin Chitu 4 年前
父节点
当前提交
05e6dde341

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

@@ -593,7 +593,8 @@
593 593
         "close": "Close",
594 594
         "headings": {
595 595
             "lobby": "Lobby ({{count}})",
596
-            "participantsList": "Meeting participants ({{count}})"
596
+            "participantsList": "Meeting participants ({{count}})",
597
+            "waitingLobby": "Waiting in lobby ({{count}})"
597 598
         },
598 599
         "actions": {
599 600
             "allow": "Allow attendees to:",

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

@@ -3,7 +3,7 @@
3 3
 import React, { useCallback } from 'react';
4 4
 import { useTranslation } from 'react-i18next';
5 5
 import { TouchableOpacity, View } from 'react-native';
6
-import { Text } from 'react-native-paper';
6
+import { Divider, Text } from 'react-native-paper';
7 7
 import { useDispatch } from 'react-redux';
8 8
 
9 9
 import { Avatar } from '../../../base/avatar';
@@ -46,6 +46,7 @@ export const ContextMenuLobbyParticipantReject = ({ participant: p }: Props) =>
46 46
                     </Text>
47 47
                 </View>
48 48
             </View>
49
+            <Divider style = { styles.divider } />
49 50
             <TouchableOpacity
50 51
                 onPress = { reject }
51 52
                 style = { styles.contextMenuItem }>

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

@@ -3,7 +3,7 @@
3 3
 import React, { useCallback, useState } from 'react';
4 4
 import { useTranslation } from 'react-i18next';
5 5
 import { TouchableOpacity, View } from 'react-native';
6
-import { Text } from 'react-native-paper';
6
+import { Divider, Text } from 'react-native-paper';
7 7
 import { useDispatch, useSelector, useStore } from 'react-redux';
8 8
 
9 9
 import { Avatar } from '../../../base/avatar';
@@ -88,6 +88,7 @@ export const ContextMenuMeetingParticipantDetails = ({ participant: p }: Props)
88 88
                     </Text>
89 89
                 </View>
90 90
             </View>
91
+            <Divider style = { styles.divider } />
91 92
             {
92 93
                 isLocalModerator
93 94
                 && <TouchableOpacity
@@ -116,6 +117,7 @@ export const ContextMenuMeetingParticipantDetails = ({ participant: p }: Props)
116 117
                     </Text>
117 118
                 </TouchableOpacity>
118 119
             }
120
+            <Divider style = { styles.divider } />
119 121
             {
120 122
                 isLocalModerator && (
121 123
                     isParticipantVideoMuted
@@ -165,6 +167,7 @@ export const ContextMenuMeetingParticipantDetails = ({ participant: p }: Props)
165 167
                     style = { styles.contextMenuItemIcon } />
166 168
                 <Text style = { styles.contextMenuItemText }>{ t('participantsPane.actions.networkStats') }</Text>
167 169
             </TouchableOpacity>
170
+            <Divider style = { styles.divider } />
168 171
             <VolumeSlider
169 172
                 initialValue = { volume }
170 173
                 onChange = { onVolumeChange } />

+ 1
- 0
react/features/participants-pane/components/native/LobbyParticipantItem.js 查看文件

@@ -29,6 +29,7 @@ export const LobbyParticipantItem = ({ participant: p }: Props) => {
29 29
     return (
30 30
         <ParticipantItem
31 31
             audioMuteState = { MediaState.Muted }
32
+            isKnockingParticipant = { true }
32 33
             name = { p.name }
33 34
             onPress = { openContextMenuReject }
34 35
             participant = { p }

+ 5
- 3
react/features/participants-pane/components/native/LobbyParticipantList.js 查看文件

@@ -21,13 +21,15 @@ export const LobbyParticipantList = () => {
21 21
         <View style = { styles.lobbyList }>
22 22
             <View style = { styles.lobbyListDetails } >
23 23
                 <Text style = { styles.lobbyListDescription }>
24
-                    {t('participantsPane.headings.lobby',
24
+                    {t('participantsPane.headings.waitingLobby',
25 25
                         { count: participants.length })}
26 26
                 </Text>
27 27
                 <Button
28
-                    labelStyle = { styles.allParticipantActionsButton }
28
+                    color = '#3D3D3D'
29
+                    labelStyle = { styles.admitAllParticipantsActionButtonLabel }
29 30
                     mode = 'text'
30
-                    onPress = { admitAll }>
31
+                    onPress = { admitAll }
32
+                    style = { styles.admitAllParticipantsActionButton }>
31 33
                     {t('lobby.admitAll')}
32 34
                 </Button>
33 35
             </View>

+ 1
- 0
react/features/participants-pane/components/native/MeetingParticipantItem.js 查看文件

@@ -30,6 +30,7 @@ export const MeetingParticipantItem = ({ participant: p }: Props) => {
30 30
     return (
31 31
         <ParticipantItem
32 32
             audioMuteState = { isAudioMuted ? MediaState.Muted : MediaState.Unmuted }
33
+            isKnockingParticipant = { false }
33 34
             name = { p.name }
34 35
             onPress = { openContextMenuDetails }
35 36
             participant = { p }

+ 15
- 5
react/features/participants-pane/components/native/ParticipantItem.js 查看文件

@@ -30,6 +30,11 @@ type Props = {
30 30
      */
31 31
     children?: Node,
32 32
 
33
+    /**
34
+     * Is the participant waiting?
35
+     */
36
+    isKnockingParticipant: boolean,
37
+
33 38
     /**
34 39
      * The name of the participant. Used for showing lobby names.
35 40
      */
@@ -64,6 +69,7 @@ type Props = {
64 69
 function ParticipantItem({
65 70
     audioMuteState = MediaState.None,
66 71
     children,
72
+    isKnockingParticipant,
67 73
     name,
68 74
     onPress,
69 75
     participant: p,
@@ -89,11 +95,15 @@ function ParticipantItem({
89 95
                     </Text>
90 96
                     { p.local ? <Text style = { styles.isLocal }>({t('chat.you')})</Text> : null }
91 97
                 </View>
92
-                <View style = { styles.participantStatesContainer } >
93
-                    {p.raisedHand && <RaisedHandIndicator />}
94
-                    <View style = { styles.participantStateVideo }>{VideoStateIcons[videoMuteState]}</View>
95
-                    <View style = { styles.participantStateAudio }>{AudioStateIcons[audioMuteState]}</View>
96
-                </View>
98
+                {
99
+                    !isKnockingParticipant && <>
100
+                        {p.raisedHand && <RaisedHandIndicator />}
101
+                        <View style = { styles.participantStatesContainer }>
102
+                            <View style = { styles.participantStateVideo }>{VideoStateIcons[videoMuteState]}</View>
103
+                            <View>{AudioStateIcons[audioMuteState]}</View>
104
+                        </View>
105
+                    </>
106
+                }
97 107
             </TouchableOpacity>
98 108
             { children }
99 109
         </View>

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

@@ -1,27 +1,11 @@
1 1
 import BaseTheme from '../../../base/ui/components/BaseTheme.native';
2 2
 
3
-/**
4
- * The style for participant states.
5
- */
6
-const participantState = {
7
-    display: 'flex',
8
-    justifyContent: 'center'
9
-};
10
-
11
-/**
12
- * The style for participant list.
13
- */
14
-const participantList = {
15
-    marginLeft: BaseTheme.spacing[3],
16
-    marginRight: BaseTheme.spacing[3],
17
-    position: 'relative'
18
-};
19
-
20 3
 /**
21 4
  * The style for participant list description.
22 5
  */
23 6
 const participantListDescription = {
24
-    color: BaseTheme.palette.text01,
7
+    ...BaseTheme.typography.heading6,
8
+    color: BaseTheme.palette.text02,
25 9
     paddingBottom: BaseTheme.spacing[3],
26 10
     paddingTop: BaseTheme.spacing[3],
27 11
     position: 'relative',
@@ -46,7 +30,6 @@ const button = {
46 30
     backgroundColor: BaseTheme.palette.action02,
47 31
     borderRadius: BaseTheme.shape.borderRadius,
48 32
     display: 'flex',
49
-    height: BaseTheme.spacing[7],
50 33
     justifyContent: 'center',
51 34
     marginLeft: 'auto'
52 35
 };
@@ -55,8 +38,7 @@ const button = {
55 38
  * Small buttons.
56 39
  */
57 40
 const smallButton = {
58
-    ...button,
59
-    width: BaseTheme.spacing[7]
41
+    ...button
60 42
 };
61 43
 
62 44
 /**
@@ -64,7 +46,6 @@ const smallButton = {
64 46
  */
65 47
 const buttonContent = {
66 48
     ...BaseTheme.typography.labelButton,
67
-    ...flexContent,
68 49
     color: BaseTheme.palette.text01,
69 50
     justifyContent: 'center'
70 51
 };
@@ -87,22 +68,18 @@ export default {
87 68
         backgroundColor: BaseTheme.palette.action01,
88 69
         borderRadius: BaseTheme.shape.borderRadius,
89 70
         flexDirection: 'row',
90
-        height: BaseTheme.spacing[5],
71
+        height: BaseTheme.spacing[6],
72
+        marginRight: BaseTheme.spacing[3],
91 73
         position: 'absolute',
92 74
         right: 0,
93 75
         zIndex: 1
94 76
     },
95 77
 
96
-    participantActionsButtonReject: {
97
-        backgroundColor: BaseTheme.palette.action01,
98
-        borderRadius: BaseTheme.shape.borderRadius,
99
-        height: BaseTheme.spacing[5]
100
-    },
101
-
102 78
     participantActionsButtonContent: {
103 79
         alignItems: 'center',
104 80
         display: 'flex',
105
-        height: BaseTheme.spacing[5]
81
+        height: BaseTheme.spacing[5],
82
+        top: BaseTheme.spacing[1]
106 83
     },
107 84
 
108 85
     participantActionsButtonText: {
@@ -110,13 +87,16 @@ export default {
110 87
         textTransform: 'capitalize'
111 88
     },
112 89
 
113
-    allParticipantActionsButton: {
90
+    admitAllParticipantsActionButtonLabel: {
114 91
         ...BaseTheme.typography.heading6,
115 92
         color: BaseTheme.palette.link01,
116
-        marginRight: 'auto',
117 93
         textTransform: 'capitalize'
118 94
     },
119 95
 
96
+    admitAllParticipantsActionButton: {
97
+        marginLeft: 'auto'
98
+    },
99
+
120 100
     participantContainer: {
121 101
         alignItems: 'center',
122 102
         borderBottomColor: BaseTheme.palette.field01Hover,
@@ -124,6 +104,8 @@ export default {
124 104
         display: 'flex',
125 105
         flexDirection: 'row',
126 106
         height: BaseTheme.spacing[9],
107
+        paddingLeft: BaseTheme.spacing[3],
108
+        paddingRight: BaseTheme.spacing[3],
127 109
         width: '100%'
128 110
     },
129 111
 
@@ -163,23 +145,18 @@ export default {
163 145
         display: 'flex',
164 146
         flexDirection: 'row',
165 147
         marginLeft: 'auto',
166
-        width: 72
167
-    },
168
-
169
-    participantStateAudio: {
170
-        ...participantState
148
+        width: '15%'
171 149
     },
172 150
 
173 151
     participantStateVideo: {
174
-        ...participantState,
175
-        paddingRight: BaseTheme.spacing[2]
152
+        paddingRight: BaseTheme.spacing[3]
176 153
     },
177 154
 
178 155
     raisedHandIndicator: {
179 156
         backgroundColor: BaseTheme.palette.warning02,
180 157
         borderRadius: BaseTheme.shape.borderRadius / 2,
181 158
         height: BaseTheme.spacing[4],
182
-        marginRight: BaseTheme.spacing[2],
159
+        marginLeft: BaseTheme.spacing[1],
183 160
         width: BaseTheme.spacing[4]
184 161
     },
185 162
 
@@ -188,11 +165,11 @@ export default {
188 165
         top: BaseTheme.spacing[1]
189 166
     },
190 167
     lobbyList: {
191
-        ...participantList
168
+        position: 'relative'
192 169
     },
193 170
 
194 171
     meetingList: {
195
-        ...participantList,
172
+        position: 'relative',
196 173
         marginTop: BaseTheme.spacing[3]
197 174
     },
198 175
 
@@ -202,6 +179,7 @@ export default {
202 179
         flexDirection: 'row',
203 180
         justifyContent: 'space-between',
204 181
         overflow: 'hidden',
182
+        paddingLeft: BaseTheme.spacing[3],
205 183
         position: 'relative',
206 184
         width: '100%'
207 185
     },
@@ -211,7 +189,8 @@ export default {
211 189
     },
212 190
 
213 191
     meetingListDescription: {
214
-        ...participantListDescription
192
+        ...participantListDescription,
193
+        marginLeft: BaseTheme.spacing[3]
215 194
     },
216 195
 
217 196
     header: {
@@ -241,17 +220,21 @@ export default {
241 220
     },
242 221
 
243 222
     closeButton: {
244
-        ...smallButton
223
+        ...smallButton,
224
+        width: BaseTheme.spacing[8]
245 225
     },
246 226
 
247 227
     closeIcon: {
248 228
         ...buttonContent,
229
+        height: BaseTheme.spacing[8],
249 230
         left: BaseTheme.spacing[2]
250 231
     },
251 232
 
252 233
     inviteButton: {
253 234
         backgroundColor: BaseTheme.palette.action01,
254
-        marginTop: BaseTheme.spacing[2]
235
+        marginTop: BaseTheme.spacing[2],
236
+        marginLeft: BaseTheme.spacing[3],
237
+        marginRight: BaseTheme.spacing[3]
255 238
     },
256 239
 
257 240
     inviteLabel: {
@@ -260,11 +243,13 @@ export default {
260 243
     },
261 244
 
262 245
     moreButton: {
263
-        ...smallButton
246
+        ...smallButton,
247
+        width: BaseTheme.spacing[8]
264 248
     },
265 249
 
266 250
     moreIcon: {
267 251
         ...buttonContent,
252
+        height: BaseTheme.spacing[8],
268 253
         left: BaseTheme.spacing[2]
269 254
     },
270 255
 
@@ -279,10 +264,12 @@ export default {
279 264
     },
280 265
 
281 266
     muteAllContent: {
282
-        ...buttonContent
267
+        ...buttonContent,
268
+        height: BaseTheme.spacing[8]
283 269
     },
284 270
 
285 271
     muteAllLabel: {
272
+        ...BaseTheme.typography.labelButtonLarge,
286 273
         color: BaseTheme.palette.text01,
287 274
         textTransform: 'capitalize'
288 275
     },
@@ -292,16 +279,12 @@ export default {
292 279
     },
293 280
 
294 281
     contextMenuItemSection: {
295
-        ...contextMenuItem,
296
-        borderBottomColor: BaseTheme.palette.section01,
297
-        borderBottomWidth: 1
282
+        ...contextMenuItem
298 283
     },
299 284
 
300 285
     contextMenuItemText: {
301 286
         ...BaseTheme.typography.bodyShortRegularLarge,
302
-        alignSelf: 'center',
303 287
         color: BaseTheme.palette.text01,
304
-        flexDirection: 'row',
305 288
         marginLeft: BaseTheme.spacing[3]
306 289
     },
307 290
 
@@ -316,5 +299,9 @@ export default {
316 299
 
317 300
     contextMenuIcon: {
318 301
         color: BaseTheme.palette.actionDanger
302
+    },
303
+
304
+    divider: {
305
+        backgroundColor: BaseTheme.palette.section01
319 306
     }
320 307
 };

正在加载...
取消
保存