浏览代码

feat(native-participants-pane) fixed mute all content styles and added doInvitePeople action

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

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

1
 // @flow
1
 // @flow
2
 
2
 
3
-import React from 'react';
3
+import React, { useCallback } from 'react';
4
 import { useTranslation } from 'react-i18next';
4
 import { useTranslation } from 'react-i18next';
5
 import { Text, View } from 'react-native';
5
 import { Text, View } from 'react-native';
6
 import { Button } from 'react-native-paper';
6
 import { Button } from 'react-native-paper';
7
+import { useDispatch } from 'react-redux';
7
 
8
 
9
+import { createToolbarEvent, sendAnalytics } from '../../../analytics';
8
 import { Icon, IconInviteMore } from '../../../base/icons';
10
 import { Icon, IconInviteMore } from '../../../base/icons';
11
+import { doInvitePeople } from '../../../invite/actions.native';
9
 
12
 
10
 import { MeetingParticipantItem } from './MeetingParticipantItem';
13
 import { MeetingParticipantItem } from './MeetingParticipantItem';
11
 import { participants } from './participants';
14
 import { participants } from './participants';
12
 import styles from './styles';
15
 import styles from './styles';
13
 
16
 
14
 export const MeetingParticipantList = () => {
17
 export const MeetingParticipantList = () => {
18
+    const dispatch = useDispatch();
19
+    const onInvite = useCallback(() => {
20
+        sendAnalytics(createToolbarEvent('invite'));
21
+        dispatch(doInvitePeople());
22
+    }, [ dispatch ]);
15
     const { t } = useTranslation();
23
     const { t } = useTranslation();
16
 
24
 
17
     return (
25
     return (
30
                 }
38
                 }
31
                 labelStyle = { styles.inviteLabel }
39
                 labelStyle = { styles.inviteLabel }
32
                 mode = 'contained'
40
                 mode = 'contained'
41
+                onPress = { onInvite }
33
                 style = { styles.inviteButton } />
42
                 style = { styles.inviteButton } />
34
             { participants.map(p => (
43
             { participants.map(p => (
35
                 <MeetingParticipantItem
44
                 <MeetingParticipantItem

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

54
             <View style = { styles.footer }>
54
             <View style = { styles.footer }>
55
                 <Button
55
                 <Button
56
                     children = { t('participantsPane.actions.muteAll') }
56
                     children = { t('participantsPane.actions.muteAll') }
57
+                    contentStyle = { styles.muteAllContent }
57
                     labelStyle = { styles.muteAllLabel }
58
                     labelStyle = { styles.muteAllLabel }
59
+                    mode = 'contained'
58
                     onPress = { muteAll }
60
                     onPress = { muteAll }
59
                     style = { styles.muteAllButton } />
61
                     style = { styles.muteAllButton } />
60
                 <Button
62
                 <Button

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

268
         left: BaseTheme.spacing[10] + BaseTheme.spacing[2]
268
         left: BaseTheme.spacing[10] + BaseTheme.spacing[2]
269
     },
269
     },
270
 
270
 
271
+    muteAllContent: {
272
+        ...buttonContent
273
+    },
274
+
271
     muteAllLabel: {
275
     muteAllLabel: {
272
         color: BaseTheme.palette.text01,
276
         color: BaseTheme.palette.text01,
273
         textTransform: 'capitalize'
277
         textTransform: 'capitalize'

正在加载...
取消
保存