浏览代码

feat(native-participants-pane) token updates and added mute all event

master
Calin Chitu 4 年前
父节点
当前提交
8ca85f9e1c

+ 1
- 1
react/features/base/ui/Tokens.js 查看文件

215
     boxShadow: 'inset 0px -1px 0px rgba(255, 255, 255, 0.15)'
215
     boxShadow: 'inset 0px -1px 0px rgba(255, 255, 255, 0.15)'
216
 };
216
 };
217
 
217
 
218
-export const spacing = [ 0, 4, 8, 16, 24, 32, 40, 48, 56 ];
218
+export const spacing = [ 0, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80 ];
219
 
219
 
220
 export const typography = {
220
 export const typography = {
221
     labelRegular: {
221
     labelRegular: {

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

18
 import { RaisedHandIndicator } from './RaisedHandIndicator';
18
 import { RaisedHandIndicator } from './RaisedHandIndicator';
19
 import styles from './styles';
19
 import styles from './styles';
20
 
20
 
21
-// /**
22
-//  * Participant actions component mapping depending on trigger type.
23
-//  */
24
-// const Actions = {
25
-//     [ActionTrigger.Hover]: ParticipantActionsHover,
26
-//     [ActionTrigger.Permanent]: ParticipantActionsPermanent
27
-// };
28
-
29
 type Props = {
21
 type Props = {
30
 
22
 
31
     /**
23
     /**

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

6
 import { Button } from 'react-native-paper';
6
 import { Button } from 'react-native-paper';
7
 import { useDispatch } from 'react-redux';
7
 import { useDispatch } from 'react-redux';
8
 
8
 
9
-import { hideDialog } from '../../../base/dialog';
9
+import { hideDialog, openDialog } from '../../../base/dialog';
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 MuteEveryoneDialog
13
+    from '../../../video-menu/components/native/MuteEveryoneDialog';
12
 
14
 
13
 import { LobbyParticipantList } from './LobbyParticipantList';
15
 import { LobbyParticipantList } from './LobbyParticipantList';
14
 import { MeetingParticipantList } from './MeetingParticipantList';
16
 import { MeetingParticipantList } from './MeetingParticipantList';
24
     const closePane = useCallback(
26
     const closePane = useCallback(
25
         () => dispatch(hideDialog()),
27
         () => dispatch(hideDialog()),
26
         [ dispatch ]);
28
         [ dispatch ]);
29
+    const muteAll = useCallback(() => dispatch(openDialog(MuteEveryoneDialog)),
30
+        [ dispatch ]);
27
     const { t } = useTranslation();
31
     const { t } = useTranslation();
28
 
32
 
29
     return (
33
     return (
51
                 <Button
55
                 <Button
52
                     children = { t('participantsPane.actions.muteAll') }
56
                     children = { t('participantsPane.actions.muteAll') }
53
                     labelStyle = { styles.muteAllLabel }
57
                     labelStyle = { styles.muteAllLabel }
58
+                    onPress = { muteAll }
54
                     style = { styles.muteAllButton } />
59
                     style = { styles.muteAllButton } />
55
                 <Button
60
                 <Button
56
                     contentStyle = { styles.moreIcon }
61
                     contentStyle = { styles.moreIcon }

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

12
  * The style for participant list.
12
  * The style for participant list.
13
  */
13
  */
14
 const participantList = {
14
 const participantList = {
15
-    marginLeft: 16,
16
-    marginRight: 16,
15
+    marginLeft: BaseTheme.spacing[4],
16
+    marginRight: BaseTheme.spacing[4],
17
     position: 'relative'
17
     position: 'relative'
18
 };
18
 };
19
 
19
 
22
  */
22
  */
23
 const participantListDescription = {
23
 const participantListDescription = {
24
     color: BaseTheme.palette.text01,
24
     color: BaseTheme.palette.text01,
25
-    paddingBottom: 8,
26
-    paddingTop: 8,
25
+    paddingBottom: BaseTheme.spacing[3],
26
+    paddingTop: BaseTheme.spacing[3],
27
     position: 'relative',
27
     position: 'relative',
28
     width: '55%'
28
     width: '55%'
29
 };
29
 };
46
     backgroundColor: BaseTheme.palette.action02,
46
     backgroundColor: BaseTheme.palette.action02,
47
     borderRadius: BaseTheme.shape.borderRadius,
47
     borderRadius: BaseTheme.shape.borderRadius,
48
     display: 'flex',
48
     display: 'flex',
49
-    height: 48,
49
+    height: BaseTheme.spacing[7],
50
     justifyContent: 'center',
50
     justifyContent: 'center',
51
     marginLeft: 'auto'
51
     marginLeft: 'auto'
52
 };
52
 };
56
  */
56
  */
57
 const smallButton = {
57
 const smallButton = {
58
     ...button,
58
     ...button,
59
-    width: 48
59
+    width: BaseTheme.spacing[7]
60
 };
60
 };
61
 
61
 
62
 /**
62
 /**
81
         zIndex: 1
81
         zIndex: 1
82
     },
82
     },
83
 
83
 
84
-    participantActionsHover: {
85
-        backgroundColor: '#292929',
86
-        bottom: 1,
87
-        display: 'none',
88
-        position: 'absolute',
89
-        right: 8,
90
-        top: 0,
91
-        zIndex: 1,
92
-        after: {
93
-            backgroundColor: 'linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #292929 100%)',
94
-            content: '',
95
-            bottom: 0,
96
-            display: 'block',
97
-            left: 0,
98
-            pointerEvents: 'none',
99
-            position: 'absolute',
100
-            top: 0,
101
-            transform: 'translateX(-100%)',
102
-            width: 40
103
-        }
104
-    },
105
-
106
-    participantActionsPermanent: {
107
-        display: 'flex',
108
-        zIndex: 1
109
-    },
110
-
111
     participantActionsButtonAdmit: {
84
     participantActionsButtonAdmit: {
112
         backgroundColor: BaseTheme.palette.action01,
85
         backgroundColor: BaseTheme.palette.action01,
113
         borderRadius: BaseTheme.shape.borderRadius,
86
         borderRadius: BaseTheme.shape.borderRadius,
114
-        height: 32
87
+        height: BaseTheme.spacing[5]
115
     },
88
     },
116
 
89
 
117
     participantActionsButtonReject: {
90
     participantActionsButtonReject: {
118
         backgroundColor: BaseTheme.palette.action01,
91
         backgroundColor: BaseTheme.palette.action01,
119
         borderRadius: BaseTheme.shape.borderRadius,
92
         borderRadius: BaseTheme.shape.borderRadius,
120
-        height: 32
93
+        height: BaseTheme.spacing[5]
121
     },
94
     },
122
 
95
 
123
     participantActionsButtonContent: {
96
     participantActionsButtonContent: {
124
         alignItems: 'center',
97
         alignItems: 'center',
125
         display: 'flex',
98
         display: 'flex',
126
-        height: 32
99
+        height: BaseTheme.spacing[5]
127
     },
100
     },
128
 
101
 
129
     participantActionsButtonText: {
102
     participantActionsButtonText: {
144
         borderBottomWidth: 2,
117
         borderBottomWidth: 2,
145
         display: 'flex',
118
         display: 'flex',
146
         flexDirection: 'row',
119
         flexDirection: 'row',
147
-        height: 64,
120
+        height: BaseTheme.spacing[9],
148
         width: '100%'
121
         width: '100%'
149
     },
122
     },
150
 
123
 
160
     participantNameContainer: {
133
     participantNameContainer: {
161
         display: 'flex',
134
         display: 'flex',
162
         flexDirection: 'row',
135
         flexDirection: 'row',
163
-        marginLeft: BaseTheme.spacing[2],
164
         overflow: 'hidden',
136
         overflow: 'hidden',
137
+        paddingLeft: BaseTheme.spacing[2],
165
         width: '63%'
138
         width: '63%'
166
     },
139
     },
167
 
140
 
181
     participantStatesContainer: {
154
     participantStatesContainer: {
182
         display: 'flex',
155
         display: 'flex',
183
         flexDirection: 'row',
156
         flexDirection: 'row',
184
-        marginLeft: 16
157
+        marginLeft: BaseTheme.spacing[3]
185
     },
158
     },
186
 
159
 
187
     participantStateAudio: {
160
     participantStateAudio: {
190
 
163
 
191
     participantStateVideo: {
164
     participantStateVideo: {
192
         ...participantState,
165
         ...participantState,
193
-        marginRight: 8
166
+        paddingRight: BaseTheme.spacing[2]
194
     },
167
     },
195
 
168
 
196
     raisedHandIndicator: {
169
     raisedHandIndicator: {
197
         backgroundColor: BaseTheme.palette.warning02,
170
         backgroundColor: BaseTheme.palette.warning02,
198
         borderRadius: BaseTheme.shape.borderRadius / 2,
171
         borderRadius: BaseTheme.shape.borderRadius / 2,
199
-        height: 24,
200
-        marginRight: 8,
201
-        width: 24
172
+        height: BaseTheme.spacing[4],
173
+        marginRight: BaseTheme.spacing[2],
174
+        width: BaseTheme.spacing[4]
202
     },
175
     },
203
 
176
 
204
     raisedHandIcon: {
177
     raisedHandIcon: {
205
         ...flexContent,
178
         ...flexContent,
206
-        top: 4
179
+        top: BaseTheme.spacing[1]
207
     },
180
     },
208
     lobbyList: {
181
     lobbyList: {
209
-        ...participantList,
210
-        marginTop: 8
182
+        ...participantList
211
     },
183
     },
212
 
184
 
213
     meetingList: {
185
     meetingList: {
214
         ...participantList,
186
         ...participantList,
215
-        marginTop: 16
187
+        marginTop: BaseTheme.spacing[3]
216
     },
188
     },
217
 
189
 
218
     lobbyListDetails: {
190
     lobbyListDetails: {
234
 
206
 
235
     lobbyListActions: {
207
     lobbyListActions: {
236
         flexDirection: 'row',
208
         flexDirection: 'row',
237
-        left: 0
209
+        right: BaseTheme.spacing[2]
238
     },
210
     },
239
 
211
 
240
     header: {
212
     header: {
241
         alignItems: 'center',
213
         alignItems: 'center',
242
         backgroundColor: BaseTheme.palette.ui01,
214
         backgroundColor: BaseTheme.palette.ui01,
243
-        top: 0,
215
+        top: BaseTheme.spacing[0],
244
         display: 'flex',
216
         display: 'flex',
245
         flexDirection: 'row',
217
         flexDirection: 'row',
246
-        height: 88,
247
-        paddingRight: 16,
218
+        height: BaseTheme.spacing[10],
219
+        paddingRight: BaseTheme.spacing[3],
248
         position: 'relative',
220
         position: 'relative',
249
-        right: 0,
250
-        left: 0
221
+        right: BaseTheme.spacing[0],
222
+        left: BaseTheme.spacing[0]
251
     },
223
     },
252
 
224
 
253
     footer: {
225
     footer: {
254
         alignItems: 'center',
226
         alignItems: 'center',
255
         backgroundColor: BaseTheme.palette.ui01,
227
         backgroundColor: BaseTheme.palette.ui01,
256
-        bottom: 0,
228
+        bottom: BaseTheme.spacing[0],
257
         display: 'flex',
229
         display: 'flex',
258
         flexDirection: 'row',
230
         flexDirection: 'row',
259
-        height: 88,
260
-        paddingRight: 16,
231
+        height: BaseTheme.spacing[10],
232
+        paddingRight: BaseTheme.spacing[3],
261
         position: 'relative',
233
         position: 'relative',
262
-        right: 0,
263
-        left: 0
234
+        right: BaseTheme.spacing[0],
235
+        left: BaseTheme.spacing[0]
264
     },
236
     },
265
 
237
 
266
     closeButton: {
238
     closeButton: {
269
 
241
 
270
     closeIcon: {
242
     closeIcon: {
271
         ...buttonContent,
243
         ...buttonContent,
272
-        left: 8
244
+        left: BaseTheme.spacing[2]
273
     },
245
     },
274
 
246
 
275
     moreButton: {
247
     moreButton: {
278
 
250
 
279
     inviteButton: {
251
     inviteButton: {
280
         backgroundColor: BaseTheme.palette.action01,
252
         backgroundColor: BaseTheme.palette.action01,
281
-        marginTop: 8
253
+        marginTop: BaseTheme.spacing[2]
282
     },
254
     },
283
 
255
 
284
     inviteLabel: {
256
     inviteLabel: {
288
 
260
 
289
     moreIcon: {
261
     moreIcon: {
290
         ...buttonContent,
262
         ...buttonContent,
291
-        left: 8
263
+        left: BaseTheme.spacing[2]
292
     },
264
     },
293
 
265
 
294
     muteAllButton: {
266
     muteAllButton: {
295
         ...button,
267
         ...button,
296
-        left: 80
268
+        left: BaseTheme.spacing[10] + BaseTheme.spacing[2]
297
     },
269
     },
298
 
270
 
299
     muteAllLabel: {
271
     muteAllLabel: {

正在加载...
取消
保存