Procházet zdrojové kódy

feat(native-participants-panel) renamed ParticipantsPanel to ParticipantsPane and created modal

master
Calin Chitu před 4 roky
rodič
revize
e0a2320d75

+ 20
- 24
ios/Podfile.lock Zobrazit soubor

@@ -1,9 +1,9 @@
1 1
 PODS:
2
-  - AppAuth (1.2.0):
3
-    - AppAuth/Core (= 1.2.0)
4
-    - AppAuth/ExternalUserAgent (= 1.2.0)
5
-  - AppAuth/Core (1.2.0)
6
-  - AppAuth/ExternalUserAgent (1.2.0)
2
+  - AppAuth (1.4.0):
3
+    - AppAuth/Core (= 1.4.0)
4
+    - AppAuth/ExternalUserAgent (= 1.4.0)
5
+  - AppAuth/Core (1.4.0)
6
+  - AppAuth/ExternalUserAgent (1.4.0)
7 7
   - boost-for-react-native (1.63.0)
8 8
   - CocoaLumberjack (3.5.3):
9 9
     - CocoaLumberjack/Core (= 3.5.3)
@@ -48,7 +48,7 @@ PODS:
48 48
     - GoogleUtilities/Environment (~> 6.7)
49 49
     - GoogleUtilities/Logger (~> 6.7)
50 50
     - nanopb (~> 1.30906.0)
51
-  - FirebaseCrashlytics (4.6.1):
51
+  - FirebaseCrashlytics (4.6.2):
52 52
     - FirebaseCore (~> 6.10)
53 53
     - FirebaseInstallations (~> 1.6)
54 54
     - GoogleDataTransport (~> 7.2)
@@ -77,9 +77,9 @@ PODS:
77 77
     - GoogleUtilities/Network (~> 6.7)
78 78
     - "GoogleUtilities/NSData+zlib (~> 6.7)"
79 79
     - nanopb (~> 1.30906.0)
80
-  - GoogleDataTransport (7.4.0):
80
+  - GoogleDataTransport (7.5.1):
81 81
     - nanopb (~> 1.30906.0)
82
-  - GoogleSignIn (5.0.1):
82
+  - GoogleSignIn (5.0.2):
83 83
     - AppAuth (~> 1.2)
84 84
     - GTMAppAuth (~> 1.0)
85 85
     - GTMSessionFetcher/Core (~> 1.1)
@@ -102,21 +102,17 @@ PODS:
102 102
     - GoogleUtilities/Logger
103 103
   - GoogleUtilities/UserDefaults (6.7.2):
104 104
     - GoogleUtilities/Logger
105
-  - GTMAppAuth (1.0.0):
106
-    - AppAuth/Core (~> 1.0)
107
-    - GTMSessionFetcher (~> 1.1)
108
-  - GTMSessionFetcher (1.2.2):
109
-    - GTMSessionFetcher/Full (= 1.2.2)
110
-  - GTMSessionFetcher/Core (1.2.2)
111
-  - GTMSessionFetcher/Full (1.2.2):
112
-    - GTMSessionFetcher/Core (= 1.2.2)
105
+  - GTMAppAuth (1.2.2):
106
+    - AppAuth/Core (~> 1.4)
107
+    - GTMSessionFetcher/Core (~> 1.5)
108
+  - GTMSessionFetcher/Core (1.5.0)
113 109
   - nanopb (1.30906.0):
114 110
     - nanopb/decode (= 1.30906.0)
115 111
     - nanopb/encode (= 1.30906.0)
116 112
   - nanopb/decode (1.30906.0)
117 113
   - nanopb/encode (1.30906.0)
118 114
   - ObjectiveDropboxOfficial (3.9.4)
119
-  - PromisesObjC (1.2.10)
115
+  - PromisesObjC (1.2.12)
120 116
   - RCTRequired (0.61.5-jitsi.2)
121 117
   - RCTTypeSafety (0.61.5-jitsi.2):
122 118
     - FBLazyVector (= 0.61.5-jitsi.2)
@@ -519,7 +515,7 @@ EXTERNAL SOURCES:
519 515
     :path: "../node_modules/react-native/ReactCommon/yoga"
520 516
 
521 517
 SPEC CHECKSUMS:
522
-  AppAuth: bce82c76043657c99d91e7882e8a9e1a93650cd4
518
+  AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
523 519
   boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
524 520
   CocoaLumberjack: 2f44e60eb91c176d471fdba43b9e3eae6a721947
525 521
   DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
@@ -529,20 +525,20 @@ SPEC CHECKSUMS:
529 525
   FirebaseAnalytics: 5dd088bd2e67bb9d13dbf792d1164ceaf3052193
530 526
   FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
531 527
   FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
532
-  FirebaseCrashlytics: 5777d3462fb8c3ab9e80a2473bd7d667a2e8411c
528
+  FirebaseCrashlytics: 1a747c9cc084a24dc6d9511c991db1cd078154eb
533 529
   FirebaseDynamicLinks: 6eac37d86910382eafb6315d952cc44c9e176094
534 530
   FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
535 531
   Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
536 532
   glog: 1f3da668190260b06b429bb211bfbee5cd790c28
537 533
   GoogleAppMeasurement: 966e88df9d19c15715137bb2ddaf52373f111436
538
-  GoogleDataTransport: b7f406340a291370045a270c599e53c6fa6ec20f
539
-  GoogleSignIn: 3a51b9bb8e48b635fd7f4272cee06ca260345b86
534
+  GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
535
+  GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
540 536
   GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
541
-  GTMAppAuth: 4deac854479704f348309e7b66189e604cf5e01e
542
-  GTMSessionFetcher: 61bb0f61a4cb560030f1222021178008a5727a23
537
+  GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89
538
+  GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
543 539
   nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
544 540
   ObjectiveDropboxOfficial: a5afefc83f6467c42c45f2253f583f2ad1ffc701
545
-  PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151
541
+  PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97
546 542
   RCTRequired: a686731276578c125dff205f08b6ec9cee6ede32
547 543
   RCTTypeSafety: 88e5500e801c00d16a3d1895e3470d13beed6584
548 544
   React: 8b2bcf6a93846e47a7a365a54ec6edeb78b37701

+ 4
- 7
react/features/app/components/App.native.js Zobrazit soubor

@@ -11,7 +11,6 @@ import { getFeatureFlag } from '../../base/flags/functions';
11 11
 import { Platform } from '../../base/react';
12 12
 import { DimensionsDetector, clientResized } from '../../base/responsive-ui';
13 13
 import { updateSettings } from '../../base/settings';
14
-import JitsiThemePaperProvider from '../../base/ui/components/JitsiThemeProvider.native';
15 14
 import logger from '../logger';
16 15
 
17 16
 import { AbstractApp } from './AbstractApp';
@@ -128,12 +127,10 @@ export class App extends AbstractApp {
128 127
      */
129 128
     _createMainElement(component, props) {
130 129
         return (
131
-            <JitsiThemePaperProvider>
132
-                <DimensionsDetector
133
-                    onDimensionsChanged = { this._onDimensionsChanged }>
134
-                    { super._createMainElement(component, props) }
135
-                </DimensionsDetector>
136
-            </JitsiThemePaperProvider>
130
+            <DimensionsDetector
131
+                onDimensionsChanged = { this._onDimensionsChanged }>
132
+                { super._createMainElement(component, props) }
133
+            </DimensionsDetector>
137 134
         );
138 135
     }
139 136
 

+ 49
- 0
react/features/participants-pane/components/native/ParticipantsPane.js Zobrazit soubor

@@ -0,0 +1,49 @@
1
+// @flow
2
+
3
+import React, { useCallback } from 'react';
4
+import { Button, Text, withTheme } from 'react-native-paper';
5
+import { useDispatch } from 'react-redux';
6
+
7
+
8
+import { translate } from '../../../base/i18n';
9
+import { JitsiModal } from '../../../base/modal';
10
+import { close } from '../../actions';
11
+
12
+/**
13
+ * {@code ParticipantsPane}'s React {@code Component} prop types.
14
+ */
15
+type Props = {
16
+
17
+    /**
18
+     * Theme used for styles.
19
+     */
20
+    theme: Object
21
+}
22
+
23
+/**
24
+ * Participant pane.
25
+ *
26
+ * @returns {React$Element<any>}
27
+ */
28
+function ParticipantsPane({ theme }: Props) {
29
+    const dispatch = useDispatch();
30
+    const closePane = useCallback(
31
+        () => dispatch(close()),
32
+        [ dispatch ]);
33
+
34
+    return (
35
+        <JitsiModal
36
+            headerProps = {{
37
+                onPressBack: closePane()
38
+            }}>
39
+            {/* eslint-disable-next-line react/jsx-no-bind */}
40
+            <Button onPress = { closePane }> X</Button>
41
+            <Text>
42
+                OLE
43
+            </Text>
44
+        </JitsiModal>
45
+    );
46
+}
47
+
48
+
49
+export default translate(withTheme(ParticipantsPane));

react/features/participants-pane/components/native/ParticipantsPanelButton.js → react/features/participants-pane/components/native/ParticipantsPaneButton.js Zobrazit soubor

@@ -2,11 +2,14 @@
2 2
 
3 3
 import type { Dispatch } from 'redux';
4 4
 
5
+import { openDialog } from '../../../base/dialog';
5 6
 import { translate } from '../../../base/i18n';
6 7
 import { IconParticipants } from '../../../base/icons';
7 8
 import { connect } from '../../../base/redux';
8 9
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
9 10
 
11
+import { ParticipantsPane } from './';
12
+
10 13
 type Props = AbstractButtonProps & {
11 14
 
12 15
     /**
@@ -19,7 +22,7 @@ type Props = AbstractButtonProps & {
19 22
 /**
20 23
  * Implements an {@link AbstractButton} to open the participants panel.
21 24
  */
22
-class ParticipantsPanelButton extends AbstractButton<Props, *> {
25
+class ParticipantsPaneButton extends AbstractButton<Props, *> {
23 26
     accessibilityLabel = 'toolbar.accessibilityLabel.participants';
24 27
     icon = IconParticipants;
25 28
     label = 'toolbar.participants';
@@ -30,6 +33,9 @@ class ParticipantsPanelButton extends AbstractButton<Props, *> {
30 33
      * @private
31 34
      * @returns {void}
32 35
      */
36
+    _handleClick() {
37
+        this.props.dispatch(openDialog(ParticipantsPane));
38
+    }
33 39
 }
34 40
 
35 41
 /**
@@ -45,4 +51,4 @@ function mapStateToProps(state: Object) {
45 51
     };
46 52
 }
47 53
 
48
-export default translate(connect(mapStateToProps)(ParticipantsPanelButton));
54
+export default translate(connect(mapStateToProps)(ParticipantsPaneButton));

+ 0
- 0
react/features/participants-pane/components/native/ParticipantsPanel.js Zobrazit soubor


+ 2
- 1
react/features/participants-pane/components/native/index.js Zobrazit soubor

@@ -1,3 +1,4 @@
1 1
 // @flow
2 2
 
3
-export { default as ParticipantsPanelButton } from './ParticipantsPanelButton';
3
+export { default as ParticipantsPane } from './ParticipantsPane';
4
+export { default as ParticipantsPaneButton } from './ParticipantsPaneButton';

+ 6
- 2
react/index.native.js Zobrazit soubor

@@ -9,6 +9,8 @@ import { AppRegistry } from 'react-native';
9 9
 
10 10
 import { App } from './features/app/components';
11 11
 import { _initLogging } from './features/base/logging/functions';
12
+import JitsiThemePaperProvider
13
+    from './features/base/ui/components/JitsiThemeProvider';
12 14
 import { IncomingCallApp } from './features/mobile/incoming-call';
13 15
 
14 16
 declare var __DEV__;
@@ -40,8 +42,10 @@ class Root extends PureComponent<Props> {
40 42
      */
41 43
     render() {
42 44
         return (
43
-            <App
44
-                { ...this.props } />
45
+            <JitsiThemePaperProvider>
46
+                <App
47
+                    { ...this.props } />
48
+            </JitsiThemePaperProvider>
45 49
         );
46 50
     }
47 51
 }

Načítá se…
Zrušit
Uložit