Преглед изворни кода

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,7 +215,7 @@ export const shape = {
215 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 220
 export const typography = {
221 221
     labelRegular: {

+ 0
- 8
react/features/participants-pane/components/native/ParticipantItem.js Прегледај датотеку

@@ -18,14 +18,6 @@ import {
18 18
 import { RaisedHandIndicator } from './RaisedHandIndicator';
19 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 21
 type Props = {
30 22
 
31 23
     /**

+ 6
- 1
react/features/participants-pane/components/native/ParticipantsPane.js Прегледај датотеку

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

+ 34
- 62
react/features/participants-pane/components/native/styles.js Прегледај датотеку

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

Loading…
Откажи
Сачувај