Просмотр исходного кода

feat(native-participants-pane) admit/reject all buttons

master
Calin Chitu 4 лет назад
Родитель
Сommit
eb1add681f

+ 20
- 6
react/features/participants-pane/components/native/LobbyParticipantList.js Просмотреть файл

2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
 import { useTranslation } from 'react-i18next';
4
 import { useTranslation } from 'react-i18next';
5
-import { Text } from 'react-native-paper';
5
+import { Text, View } from 'react-native';
6
+import { Button } from 'react-native-paper';
6
 
7
 
7
 import { LobbyParticipantItem } from './LobbyParticipantItem';
8
 import { LobbyParticipantItem } from './LobbyParticipantItem';
8
 import { participants } from './participants';
9
 import { participants } from './participants';
13
 
14
 
14
     return (
15
     return (
15
         <>
16
         <>
16
-            {/* eslint-disable-next-line max-len */}
17
-            <Text style = { styles.lobbyListDescription }>
18
-                {t('participantsPane.headings.lobby',
19
-                    { count: participants.length })}
20
-            </Text>
17
+            <View style = { styles.lobbyListContainer } >
18
+                <Text style = { styles.lobbyListDescription }>
19
+                    {t('participantsPane.headings.lobby',
20
+                        { count: participants.length })}
21
+                </Text>
22
+                <View style = { styles.lobbyListActions }>
23
+                    <Button
24
+                        labelStyle = { styles.allParticipantActionButton }
25
+                        mode = 'text'>
26
+                        {t('lobby.admitAll')}
27
+                    </Button>
28
+                    <Button
29
+                        labelStyle = { styles.allParticipantActionButton }
30
+                        mode = 'text'>
31
+                        {t('lobby.rejectAll')}
32
+                    </Button>
33
+                </View>
34
+            </View>
21
             { participants.map(p => (
35
             { participants.map(p => (
22
                 <LobbyParticipantItem
36
                 <LobbyParticipantItem
23
                     key = { p.id }
37
                     key = { p.id }

+ 2
- 3
react/features/participants-pane/components/native/ParticipantItem.js Просмотреть файл

3
 import React from 'react';
3
 import React from 'react';
4
 import type { Node } from 'react';
4
 import type { Node } from 'react';
5
 import { useTranslation } from 'react-i18next';
5
 import { useTranslation } from 'react-i18next';
6
-import { View } from 'react-native';
7
-import { Text } from 'react-native-paper';
6
+import { Text, View } from 'react-native';
8
 import { useSelector } from 'react-redux';
7
 import { useSelector } from 'react-redux';
9
 
8
 
10
 import { Avatar } from '../../../base/avatar';
9
 import { Avatar } from '../../../base/avatar';
81
                     </Text>
80
                     </Text>
82
                     { p.local ? <Text style = { styles.isLocal }>({t('chat.you')})</Text> : null }
81
                     { p.local ? <Text style = { styles.isLocal }>({t('chat.you')})</Text> : null }
83
                 </View>
82
                 </View>
84
-                { p.local && <Text style = { styles.participantActions }> {children} </Text> }
83
+                { p.local ? <Text style = { styles.participantActions }> ({ children }) </Text> : null }
85
                 <View style = { styles.participantStatesContainer } >
84
                 <View style = { styles.participantStatesContainer } >
86
                     {p.raisedHand && <RaisedHandIndicator />}
85
                     {p.raisedHand && <RaisedHandIndicator />}
87
                     <View style = { styles.participantStateVideo }>{VideoStateIcons[videoMuteState]}</View>
86
                     <View style = { styles.participantStateVideo }>{VideoStateIcons[videoMuteState]}</View>

+ 160
- 0
react/features/participants-pane/components/native/participants.js Просмотреть файл

100
         role: 'participant',
100
         role: 'participant',
101
         startWithAudioMuted: true,
101
         startWithAudioMuted: true,
102
         startWithVideoMuted: false
102
         startWithVideoMuted: false
103
+    },
104
+    {
105
+        audioOutputDeviceId: 'default',
106
+        avatarURL: undefined,
107
+        botType: undefined,
108
+        conference: undefined,
109
+        connectionStatus: undefined,
110
+        dominantSpeaker: false,
111
+        email: undefined,
112
+        id: 'd082114',
113
+        isFakeParticipant: undefined,
114
+        isJigasi: undefined,
115
+        loadableAvatarUrl: undefined,
116
+        local: true,
117
+        name: 'testuser2',
118
+        pinned: false,
119
+        presence: undefined,
120
+        role: 'moderator',
121
+        startWithAudioMuted: true,
122
+        startWithVideoMuted: true
123
+    },
124
+    {
125
+        audioOutputDeviceId: 'default',
126
+        avatarURL: undefined,
127
+        botType: undefined,
128
+        conference: undefined,
129
+        connectionStatus: undefined,
130
+        dominantSpeaker: false,
131
+        email: undefined,
132
+        id: 'd08774533',
133
+        isFakeParticipant: undefined,
134
+        isJigasi: undefined,
135
+        loadableAvatarUrl: undefined,
136
+        local: true,
137
+        name: 'testuser2',
138
+        pinned: false,
139
+        presence: undefined,
140
+        role: 'moderator',
141
+        startWithAudioMuted: true,
142
+        startWithVideoMuted: true
143
+    },
144
+    {
145
+        audioOutputDeviceId: 'default',
146
+        avatarURL: undefined,
147
+        botType: undefined,
148
+        conference: undefined,
149
+        connectionStatus: undefined,
150
+        dominantSpeaker: false,
151
+        email: undefined,
152
+        id: 'd063636',
153
+        isFakeParticipant: undefined,
154
+        isJigasi: undefined,
155
+        loadableAvatarUrl: undefined,
156
+        local: true,
157
+        name: 'testuser2',
158
+        pinned: false,
159
+        presence: undefined,
160
+        role: 'moderator',
161
+        startWithAudioMuted: true,
162
+        startWithVideoMuted: true
163
+    },
164
+    {
165
+        audioOutputDeviceId: 'default',
166
+        avatarURL: undefined,
167
+        botType: undefined,
168
+        conference: undefined,
169
+        connectionStatus: undefined,
170
+        dominantSpeaker: false,
171
+        email: undefined,
172
+        id: 'dadagqrq1',
173
+        isFakeParticipant: undefined,
174
+        isJigasi: undefined,
175
+        loadableAvatarUrl: undefined,
176
+        local: true,
177
+        name: 'testuser2',
178
+        pinned: false,
179
+        presence: undefined,
180
+        role: 'moderator',
181
+        startWithAudioMuted: true,
182
+        startWithVideoMuted: true
183
+    },
184
+    {
185
+        audioOutputDeviceId: 'default',
186
+        avatarURL: undefined,
187
+        botType: undefined,
188
+        conference: undefined,
189
+        connectionStatus: undefined,
190
+        dominantSpeaker: false,
191
+        email: undefined,
192
+        id: 'd0aad',
193
+        isFakeParticipant: undefined,
194
+        isJigasi: undefined,
195
+        loadableAvatarUrl: undefined,
196
+        local: true,
197
+        name: 'testuser2',
198
+        pinned: false,
199
+        presence: undefined,
200
+        role: 'moderator',
201
+        startWithAudioMuted: true,
202
+        startWithVideoMuted: true
203
+    },
204
+    {
205
+        audioOutputDeviceId: 'default',
206
+        avatarURL: undefined,
207
+        botType: undefined,
208
+        conference: undefined,
209
+        connectionStatus: undefined,
210
+        dominantSpeaker: false,
211
+        email: undefined,
212
+        id: 'd0866327',
213
+        isFakeParticipant: undefined,
214
+        isJigasi: undefined,
215
+        loadableAvatarUrl: undefined,
216
+        local: true,
217
+        name: 'testuser2',
218
+        pinned: false,
219
+        presence: undefined,
220
+        role: 'moderator',
221
+        startWithAudioMuted: true,
222
+        startWithVideoMuted: true
223
+    },
224
+    {
225
+        audioOutputDeviceId: 'default',
226
+        avatarURL: undefined,
227
+        botType: undefined,
228
+        conference: undefined,
229
+        connectionStatus: undefined,
230
+        dominantSpeaker: false,
231
+        email: undefined,
232
+        id: 'd08162234',
233
+        isFakeParticipant: undefined,
234
+        isJigasi: undefined,
235
+        loadableAvatarUrl: undefined,
236
+        local: true,
237
+        name: 'testuser2',
238
+        pinned: false,
239
+        presence: undefined,
240
+        role: 'moderator',
241
+        startWithAudioMuted: true,
242
+        startWithVideoMuted: true
243
+    },
244
+    {
245
+        audioOutputDeviceId: 'default',
246
+        avatarURL: undefined,
247
+        botType: undefined,
248
+        conference: undefined,
249
+        connectionStatus: undefined,
250
+        dominantSpeaker: false,
251
+        email: undefined,
252
+        id: 'd04141',
253
+        isFakeParticipant: undefined,
254
+        isJigasi: undefined,
255
+        loadableAvatarUrl: undefined,
256
+        local: true,
257
+        name: 'testuser2',
258
+        pinned: false,
259
+        presence: undefined,
260
+        role: 'moderator',
261
+        startWithAudioMuted: true,
262
+        startWithVideoMuted: true
103
     }
263
     }
104
 ];
264
 ];

+ 11
- 1
react/features/participants-pane/components/native/styles.js Просмотреть файл

113
     },
113
     },
114
 
114
 
115
     participantActionButtonText: {
115
     participantActionButtonText: {
116
-        fontSize: 5
116
+        ...BaseTheme.typography.labelRegular
117
+    },
118
+
119
+    allParticipantActionButton: {
120
+        ...BaseTheme.typography.labelRegular,
121
+        color: BaseTheme.palette.action01
117
     },
122
     },
118
 
123
 
119
     participantContainer: {
124
     participantContainer: {
197
         ...container
202
         ...container
198
     },
203
     },
199
 
204
 
205
+    lobbyListActions: {
206
+        flexDirection: 'row',
207
+        marginLeft: 'auto'
208
+    },
209
+
200
     header: {
210
     header: {
201
         ...container
211
         ...container
202
     },
212
     },

Загрузка…
Отмена
Сохранить