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

feat(participants-pane) updates

- Fixed react native community slider to work on both android and ios
- Removed InviteButton from native menus
- Fixed buttons spacing in native OverflowMenu
- Participant context menu details are shown only for remote participants
factor2
Calinteodor 3 лет назад
Родитель
Сommit
d6c821d524
Аккаунт пользователя с таким Email не найден

+ 2
- 1
android/sdk/build.gradle Просмотреть файл

70
     implementation project(':react-native-default-preference')
70
     implementation project(':react-native-default-preference')
71
     implementation project(':react-native-immersive')
71
     implementation project(':react-native-immersive')
72
     implementation project(':react-native-keep-awake')
72
     implementation project(':react-native-keep-awake')
73
+    implementation project(':react-native-slider')
73
     implementation project(':react-native-sound')
74
     implementation project(':react-native-sound')
75
+    implementation project(':react-native-splash-screen')
74
     implementation project(':react-native-svg')
76
     implementation project(':react-native-svg')
75
     implementation project(':react-native-webrtc')
77
     implementation project(':react-native-webrtc')
76
     implementation project(':react-native-webview')
78
     implementation project(':react-native-webview')
77
-    implementation project(':react-native-splash-screen')
78
 
79
 
79
     testImplementation 'junit:junit:4.12'
80
     testImplementation 'junit:junit:4.12'
80
 }
81
 }

+ 1
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Просмотреть файл

187
                 new com.ocetnik.timer.BackgroundTimerPackage(),
187
                 new com.ocetnik.timer.BackgroundTimerPackage(),
188
                 new com.reactnativecommunity.asyncstorage.AsyncStoragePackage(),
188
                 new com.reactnativecommunity.asyncstorage.AsyncStoragePackage(),
189
                 new com.reactnativecommunity.netinfo.NetInfoPackage(),
189
                 new com.reactnativecommunity.netinfo.NetInfoPackage(),
190
+                new com.reactnativecommunity.slider.ReactSliderPackage(),
190
                 new com.reactnativecommunity.webview.RNCWebViewPackage(),
191
                 new com.reactnativecommunity.webview.RNCWebViewPackage(),
191
                 new com.rnimmersive.RNImmersivePackage(),
192
                 new com.rnimmersive.RNImmersivePackage(),
192
                 new com.zmxv.RNSound.RNSoundPackage(),
193
                 new com.zmxv.RNSound.RNSoundPackage(),

+ 3
- 1
android/settings.gradle Просмотреть файл

19
 project(':react-native-immersive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-immersive/android')
19
 project(':react-native-immersive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-immersive/android')
20
 include ':react-native-keep-awake'
20
 include ':react-native-keep-awake'
21
 project(':react-native-keep-awake').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keep-awake/android')
21
 project(':react-native-keep-awake').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keep-awake/android')
22
+include ':react-native-slider'
23
+project(':react-native-slider').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/slider/android')
22
 include ':react-native-sound'
24
 include ':react-native-sound'
23
 project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
25
 project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
24
 include ':react-native-splash-screen'
26
 include ':react-native-splash-screen'
28
 include ':react-native-webrtc'
30
 include ':react-native-webrtc'
29
 project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
31
 project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
30
 include ':react-native-webview'
32
 include ':react-native-webview'
31
-project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
33
+project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')

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

30
     const { t } = useTranslation();
30
     const { t } = useTranslation();
31
 
31
 
32
     // eslint-disable-next-line react/no-multi-comp
32
     // eslint-disable-next-line react/no-multi-comp
33
-    const renderParticipant = id => (
33
+    const renderParticipant = p => (
34
+
34
         <MeetingParticipantItem
35
         <MeetingParticipantItem
35
-            key = { id }
36
+            key = { p.id }
36
             /* eslint-disable-next-line react/jsx-no-bind */
37
             /* eslint-disable-next-line react/jsx-no-bind */
37
-            onPress = { () => dispatch(showContextMenuDetails(id)) }
38
-            participantID = { id } />
38
+            onPress = { () => !p.local && dispatch(showContextMenuDetails(p.id)) }
39
+            participantID = { p.id } />
39
     );
40
     );
40
 
41
 
41
-    localParticipant && items.push(renderParticipant(localParticipant?.id));
42
+    items.push(renderParticipant(localParticipant));
42
 
43
 
43
     participants.forEach(p => {
44
     participants.forEach(p => {
44
-        items.push(renderParticipant(p?.id));
45
+        items.push(renderParticipant(p));
45
     });
46
     });
46
 
47
 
47
     return (
48
     return (

+ 1
- 4
react/features/toolbox/components/native/OverflowMenu.js Просмотреть файл

8
 import { connect } from '../../../base/redux';
8
 import { connect } from '../../../base/redux';
9
 import { StyleType } from '../../../base/styles';
9
 import { StyleType } from '../../../base/styles';
10
 import { SharedDocumentButton } from '../../../etherpad';
10
 import { SharedDocumentButton } from '../../../etherpad';
11
-import { InviteButton } from '../../../invite';
12
 import { AudioRouteButton } from '../../../mobile/audio-mode';
11
 import { AudioRouteButton } from '../../../mobile/audio-mode';
13
 import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
12
 import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
14
 import { ReactionMenu } from '../../../reactions/components';
13
 import { ReactionMenu } from '../../../reactions/components';
126
                 style: {
125
                 style: {
127
                     ..._bottomSheetStyles.buttons.style,
126
                     ..._bottomSheetStyles.buttons.style,
128
                     borderTopLeftRadius: 16,
127
                     borderTopLeftRadius: 16,
129
-                    borderTopRightRadius: 16,
130
-                    paddingTop: 16
128
+                    borderTopRightRadius: 16
131
                 }
129
                 }
132
             }
130
             }
133
         };
131
         };
140
                     : null }>
138
                     : null }>
141
                 <AudioRouteButton { ...topButtonProps } />
139
                 <AudioRouteButton { ...topButtonProps } />
142
                 <ParticipantsPaneButton { ...buttonProps } />
140
                 <ParticipantsPaneButton { ...buttonProps } />
143
-                {!toolbarButtons.has('invite') && <InviteButton { ...buttonProps } />}
144
                 <AudioOnlyButton { ...buttonProps } />
141
                 <AudioOnlyButton { ...buttonProps } />
145
                 {!_reactionsEnabled && !toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
142
                 {!_reactionsEnabled && !toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
146
                 <SecurityDialogButton { ...buttonProps } />
143
                 <SecurityDialogButton { ...buttonProps } />

+ 5
- 2
react/features/toolbox/components/native/Toolbox.js Просмотреть файл

8
 import { connect } from '../../../base/redux';
8
 import { connect } from '../../../base/redux';
9
 import { StyleType } from '../../../base/styles';
9
 import { StyleType } from '../../../base/styles';
10
 import { ChatButton } from '../../../chat';
10
 import { ChatButton } from '../../../chat';
11
-import { InviteButton } from '../../../invite';
11
+import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
12
 import { ReactionsMenuButton } from '../../../reactions/components';
12
 import { ReactionsMenuButton } from '../../../reactions/components';
13
 import { TileViewButton } from '../../../video-layout';
13
 import { TileViewButton } from '../../../video-layout';
14
 import { isToolboxVisible, getMovableButtons } from '../../functions.native';
14
 import { isToolboxVisible, getMovableButtons } from '../../functions.native';
101
                         styles = { buttonStylesBorderless }
101
                         styles = { buttonStylesBorderless }
102
                         toggledStyles = { backgroundToggledStyle } />)}
102
                         toggledStyles = { backgroundToggledStyle } />)}
103
                 {additionalButtons.has('tileview') && <TileViewButton styles = { buttonStylesBorderless } />}
103
                 {additionalButtons.has('tileview') && <TileViewButton styles = { buttonStylesBorderless } />}
104
-                {additionalButtons.has('invite') && <InviteButton styles = { buttonStylesBorderless } />}
104
+                {additionalButtons.has('participantspane')
105
+                && <ParticipantsPaneButton
106
+                    styles = { buttonStylesBorderless } />
107
+                }
105
                 {additionalButtons.has('togglecamera')
108
                 {additionalButtons.has('togglecamera')
106
                       && <ToggleCameraButton
109
                       && <ToggleCameraButton
107
                           styles = { buttonStylesBorderless }
110
                           styles = { buttonStylesBorderless }

+ 1
- 1
react/features/toolbox/functions.native.js Просмотреть файл

25
 
25
 
26
     switch (true) {
26
     switch (true) {
27
     case width >= WIDTH.FIT_9_ICONS: {
27
     case width >= WIDTH.FIT_9_ICONS: {
28
-        buttons = [ 'togglecamera', 'chat', 'invite', 'raisehand', 'tileview' ];
28
+        buttons = [ 'togglecamera', 'chat', 'participantspane', 'raisehand', 'tileview' ];
29
         break;
29
         break;
30
     }
30
     }
31
     case width >= WIDTH.FIT_8_ICONS: {
31
     case width >= WIDTH.FIT_8_ICONS: {

+ 2
- 1
react/features/video-menu/components/native/VolumeSlider.js Просмотреть файл

1
 // @flow
1
 // @flow
2
 
2
 
3
+import Slider from '@react-native-community/slider';
3
 import _ from 'lodash';
4
 import _ from 'lodash';
4
 import React, { PureComponent } from 'react';
5
 import React, { PureComponent } from 'react';
5
-import { Slider, View } from 'react-native';
6
+import { View } from 'react-native';
6
 import { withTheme } from 'react-native-paper';
7
 import { withTheme } from 'react-native-paper';
7
 
8
 
8
 import { Icon, IconVolumeEmpty } from '../../../base/icons';
9
 import { Icon, IconVolumeEmpty } from '../../../base/icons';

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