소스 검색

rn: add DialInSummary

j8
Bettenbuk Zoltan 6 년 전
부모
커밋
86d0d4fc22
31개의 변경된 파일351개의 추가작업 그리고 53개의 파일을 삭제
  1. 1
    0
      android/sdk/build.gradle
  2. 1
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java
  3. 4
    2
      android/settings.gradle
  4. 1
    0
      css/modals/invite/_info.scss
  5. 4
    2
      ios/Podfile
  6. 7
    1
      ios/Podfile.lock
  7. 2
    0
      lang/main.json
  8. 19
    0
      package-lock.json
  9. 1
    0
      package.json
  10. 4
    25
      react/features/base/react/components/native/NavigateSectionListItem.js
  11. 0
    16
      react/features/base/react/components/native/styles.js
  12. 10
    0
      react/features/invite/actionTypes.js
  13. 26
    0
      react/features/invite/actions.js
  14. 0
    0
      react/features/invite/components/dial-in-summary/ConferenceID.native.js
  15. 0
    0
      react/features/invite/components/dial-in-summary/DialInSummary.native.js
  16. 0
    0
      react/features/invite/components/dial-in-summary/NumbersList.native.js
  17. 3
    0
      react/features/invite/components/dial-in-summary/index.native.js
  18. 3
    0
      react/features/invite/components/dial-in-summary/index.web.js
  19. 156
    0
      react/features/invite/components/dial-in-summary/native/DialInSummary.js
  20. 29
    0
      react/features/invite/components/dial-in-summary/native/DialInSummaryErrorDialog.js
  21. 2
    0
      react/features/invite/components/dial-in-summary/native/index.js
  22. 24
    0
      react/features/invite/components/dial-in-summary/native/styles.js
  23. 2
    2
      react/features/invite/components/dial-in-summary/web/ConferenceID.js
  24. 2
    2
      react/features/invite/components/dial-in-summary/web/DialInSummary.js
  25. 2
    2
      react/features/invite/components/dial-in-summary/web/NumbersList.js
  26. 3
    0
      react/features/invite/components/dial-in-summary/web/index.js
  27. 1
    1
      react/features/invite/components/index.js
  28. 16
    0
      react/features/invite/functions.js
  29. 7
    0
      react/features/invite/reducer.js
  30. 19
    0
      react/features/recent-list/components/RecentList.native.js
  31. 2
    0
      react/features/welcome/components/WelcomePage.native.js

+ 1
- 0
android/sdk/build.gradle 파일 보기

62
     implementation project(':react-native-sound')
62
     implementation project(':react-native-sound')
63
     implementation project(':react-native-vector-icons')
63
     implementation project(':react-native-vector-icons')
64
     implementation project(':react-native-webrtc')
64
     implementation project(':react-native-webrtc')
65
+    implementation project(':react-native-webview')
65
 
66
 
66
     testImplementation 'junit:junit:4.12'
67
     testImplementation 'junit:junit:4.12'
67
 }
68
 }

+ 1
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java 파일 보기

147
                 new com.oblador.vectoricons.VectorIconsPackage(),
147
                 new com.oblador.vectoricons.VectorIconsPackage(),
148
                 new com.ocetnik.timer.BackgroundTimerPackage(),
148
                 new com.ocetnik.timer.BackgroundTimerPackage(),
149
                 new com.oney.WebRTCModule.WebRTCModulePackage(),
149
                 new com.oney.WebRTCModule.WebRTCModulePackage(),
150
+                new com.reactnativecommunity.webview.RNCWebViewPackage(),
150
                 new com.rnimmersive.RNImmersivePackage(),
151
                 new com.rnimmersive.RNImmersivePackage(),
151
                 new com.zmxv.RNSound.RNSoundPackage(),
152
                 new com.zmxv.RNSound.RNSoundPackage(),
152
                 new ReactPackageAdapter() {
153
                 new ReactPackageAdapter() {

+ 4
- 2
android/settings.gradle 파일 보기

3
 include ':app', ':sdk'
3
 include ':app', ':sdk'
4
 include ':react-native-background-timer'
4
 include ':react-native-background-timer'
5
 project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
5
 project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android')
6
+include ':react-native-calendar-events'
7
+project(':react-native-calendar-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-calendar-events/android')
6
 include ':react-native-fast-image'
8
 include ':react-native-fast-image'
7
 project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
9
 project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
8
 include ':react-native-google-signin'
10
 include ':react-native-google-signin'
19
 project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
21
 project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
20
 include ':react-native-webrtc'
22
 include ':react-native-webrtc'
21
 project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
23
 project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
22
-include ':react-native-calendar-events'
23
-project(':react-native-calendar-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-calendar-events/android')
24
+include ':react-native-webview'
25
+project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')

+ 1
- 0
css/modals/invite/_info.scss 파일 보기

185
     font-size: 12px;
185
     font-size: 12px;
186
     max-height: 100%;
186
     max-height: 100%;
187
     overflow: auto;
187
     overflow: auto;
188
+    padding: 15pt;
188
     position: absolute;
189
     position: absolute;
189
     transform: translateY(-50%);
190
     transform: translateY(-50%);
190
     top: 50%;
191
     top: 50%;

+ 4
- 2
ios/Podfile 파일 보기

40
 
40
 
41
   pod 'react-native-background-timer',
41
   pod 'react-native-background-timer',
42
     :path => '../node_modules/react-native-background-timer'
42
     :path => '../node_modules/react-native-background-timer'
43
+  pod 'react-native-calendar-events',
44
+    :path => '../node_modules/react-native-calendar-events'
43
   pod 'react-native-fast-image',
45
   pod 'react-native-fast-image',
44
     :path => '../node_modules/react-native-fast-image'
46
     :path => '../node_modules/react-native-fast-image'
45
   pod 'react-native-keep-awake',
47
   pod 'react-native-keep-awake',
46
     :path => '../node_modules/react-native-keep-awake'
48
     :path => '../node_modules/react-native-keep-awake'
49
+  pod 'react-native-webview',
50
+    :path => '../node_modules/react-native-webview'
47
   pod 'BVLinearGradient',
51
   pod 'BVLinearGradient',
48
     :path => '../node_modules/react-native-linear-gradient'
52
     :path => '../node_modules/react-native-linear-gradient'
49
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
53
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
52
   pod 'RNSound', :path => '../node_modules/react-native-sound'
56
   pod 'RNSound', :path => '../node_modules/react-native-sound'
53
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
57
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
54
   pod 'RNWatch', :path => '../node_modules/react-native-watch-connectivity'
58
   pod 'RNWatch', :path => '../node_modules/react-native-watch-connectivity'
55
-  pod 'react-native-calendar-events',
56
-    :path => '../node_modules/react-native-calendar-events'
57
 end
59
 end
58
 
60
 
59
 post_install do |installer|
61
 post_install do |installer|

+ 7
- 1
ios/Podfile.lock 파일 보기

99
     - React
99
     - React
100
   - react-native-webrtc (1.69.1):
100
   - react-native-webrtc (1.69.1):
101
     - React
101
     - React
102
+  - react-native-webview (5.8.1):
103
+    - React
102
   - React/Core (0.59.5):
104
   - React/Core (0.59.5):
103
     - yoga (= 0.59.5.React)
105
     - yoga (= 0.59.5.React)
104
   - React/CxxBridge (0.59.5):
106
   - React/CxxBridge (0.59.5):
180
   - react-native-fast-image (from `../node_modules/react-native-fast-image`)
182
   - react-native-fast-image (from `../node_modules/react-native-fast-image`)
181
   - react-native-keep-awake (from `../node_modules/react-native-keep-awake`)
183
   - react-native-keep-awake (from `../node_modules/react-native-keep-awake`)
182
   - react-native-webrtc (from `../node_modules/react-native-webrtc`)
184
   - react-native-webrtc (from `../node_modules/react-native-webrtc`)
185
+  - react-native-webview (from `../node_modules/react-native-webview`)
183
   - React/Core (from `../node_modules/react-native`)
186
   - React/Core (from `../node_modules/react-native`)
184
   - React/CxxBridge (from `../node_modules/react-native`)
187
   - React/CxxBridge (from `../node_modules/react-native`)
185
   - React/DevSupport (from `../node_modules/react-native`)
188
   - React/DevSupport (from `../node_modules/react-native`)
239
     :path: "../node_modules/react-native-keep-awake"
242
     :path: "../node_modules/react-native-keep-awake"
240
   react-native-webrtc:
243
   react-native-webrtc:
241
     :path: "../node_modules/react-native-webrtc"
244
     :path: "../node_modules/react-native-webrtc"
245
+  react-native-webview:
246
+    :path: "../node_modules/react-native-webview"
242
   RNGoogleSignin:
247
   RNGoogleSignin:
243
     :path: "../node_modules/react-native-google-signin"
248
     :path: "../node_modules/react-native-google-signin"
244
   RNSound:
249
   RNSound:
279
   react-native-fast-image: 47487b71169aea34868e7b38bf870b6b3f2157c5
284
   react-native-fast-image: 47487b71169aea34868e7b38bf870b6b3f2157c5
280
   react-native-keep-awake: eba3137546b10003361b37c761f6c429b59814ae
285
   react-native-keep-awake: eba3137546b10003361b37c761f6c429b59814ae
281
   react-native-webrtc: 90a847d19deb2d7323fef8cc89ca12b8995fbc90
286
   react-native-webrtc: 90a847d19deb2d7323fef8cc89ca12b8995fbc90
287
+  react-native-webview: a95842e3f351a6d2c8bc8bcc9eab689c7e7e5ad4
282
   RNGoogleSignin: 361174d9a3090d295b06257162b560d8efc8a6ed
288
   RNGoogleSignin: 361174d9a3090d295b06257162b560d8efc8a6ed
283
   RNSound: e157320f503bdd4f4ee6d8542e948d54f90c3c3a
289
   RNSound: e157320f503bdd4f4ee6d8542e948d54f90c3c3a
284
   RNVectorIcons: d819334932bcda3332deb3d2c8ea4d069e0b98f9
290
   RNVectorIcons: d819334932bcda3332deb3d2c8ea4d069e0b98f9
286
   SDWebImage: 3f3f0c02f09798048c47a5ed0a13f17b063572d8
292
   SDWebImage: 3f3f0c02f09798048c47a5ed0a13f17b063572d8
287
   yoga: 2e571f113e8cbeb0eb752aeebc86c1bfe7a8200c
293
   yoga: 2e571f113e8cbeb0eb752aeebc86c1bfe7a8200c
288
 
294
 
289
-PODFILE CHECKSUM: 9e6bc935ea7d2974604572cc68938281a88cf35c
295
+PODFILE CHECKSUM: 0efc5cf3d69bf87368dc776a4e9a3c21935a16cf
290
 
296
 
291
 COCOAPODS: 1.6.1
297
 COCOAPODS: 1.6.1

+ 2
- 0
lang/main.json 파일 보기

351
         "dialInConferenceID": "PIN:",
351
         "dialInConferenceID": "PIN:",
352
         "dialInNotSupported": "Sorry, dialing in is currently not supported.",
352
         "dialInNotSupported": "Sorry, dialing in is currently not supported.",
353
         "dialInNumber": "Dial-in:",
353
         "dialInNumber": "Dial-in:",
354
+        "dialInSummaryError": "Error fetching dial-in info now. Please try again later.",
354
         "dialInTollFree": "Toll Free",
355
         "dialInTollFree": "Toll Free",
355
         "genericError": "Whoops, something went wrong.",
356
         "genericError": "Whoops, something went wrong.",
356
         "inviteLiveStream": "To view the live stream of this meeting, click this link: __url__",
357
         "inviteLiveStream": "To view the live stream of this meeting, click this link: __url__",
773
         "enterRoomTitle": "Start a new meeting",
774
         "enterRoomTitle": "Start a new meeting",
774
         "go": "GO",
775
         "go": "GO",
775
         "join": "JOIN",
776
         "join": "JOIN",
777
+        "info": "Info",
776
         "privacy": "Privacy",
778
         "privacy": "Privacy",
777
         "recentList": "Recent",
779
         "recentList": "Recent",
778
         "recentListDelete": "Delete",
780
         "recentListDelete": "Delete",

+ 19
- 0
package-lock.json 파일 보기

12274
         "prop-types": "^15.5.10"
12274
         "prop-types": "^15.5.10"
12275
       }
12275
       }
12276
     },
12276
     },
12277
+    "react-native-webview": {
12278
+      "version": "5.8.1",
12279
+      "resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-5.8.1.tgz",
12280
+      "integrity": "sha512-b6pSvmjoiWtcz6YspggW02X+BRXJWuquHwkh37BRx1NMW1iwMZA31SnFQvTpPzWYYIb9WF/mRsy2nGtt9C6NIg==",
12281
+      "requires": {
12282
+        "escape-string-regexp": "1.0.5",
12283
+        "invariant": "2.2.4"
12284
+      },
12285
+      "dependencies": {
12286
+        "invariant": {
12287
+          "version": "2.2.4",
12288
+          "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
12289
+          "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
12290
+          "requires": {
12291
+            "loose-envify": "^1.0.0"
12292
+          }
12293
+        }
12294
+      }
12295
+    },
12277
     "react-node-resolver": {
12296
     "react-node-resolver": {
12278
       "version": "1.0.1",
12297
       "version": "1.0.1",
12279
       "resolved": "https://registry.npmjs.org/react-node-resolver/-/react-node-resolver-1.0.1.tgz",
12298
       "resolved": "https://registry.npmjs.org/react-node-resolver/-/react-node-resolver-1.0.1.tgz",

+ 1
- 0
package.json 파일 보기

76
     "react-native-vector-icons": "6.0.2",
76
     "react-native-vector-icons": "6.0.2",
77
     "react-native-watch-connectivity": "0.2.0",
77
     "react-native-watch-connectivity": "0.2.0",
78
     "react-native-webrtc": "github:jitsi/react-native-webrtc#4064c6f2db4f8b961daaaa8dafc6a896d7cfbc43",
78
     "react-native-webrtc": "github:jitsi/react-native-webrtc#4064c6f2db4f8b961daaaa8dafc6a896d7cfbc43",
79
+    "react-native-webview": "5.8.1",
79
     "react-redux": "5.0.7",
80
     "react-redux": "5.0.7",
80
     "react-transition-group": "2.4.0",
81
     "react-transition-group": "2.4.0",
81
     "redux": "4.0.0",
82
     "redux": "4.0.0",

+ 4
- 25
react/features/base/react/components/native/NavigateSectionListItem.js 파일 보기

5
 
5
 
6
 import { ColorPalette } from '../../../styles';
6
 import { ColorPalette } from '../../../styles';
7
 
7
 
8
-import Container from './Container';
9
-import Text from './Text';
10
-import styles from './styles';
11
 import type { Item } from '../../Types';
8
 import type { Item } from '../../Types';
12
 
9
 
13
 import AvatarListItem from './AvatarListItem';
10
 import AvatarListItem from './AvatarListItem';
11
+import Text from './Text';
12
+import styles from './styles';
14
 
13
 
15
 type Props = {
14
 type Props = {
16
 
15
 
93
         return lines && lines.length ? lines.map(this._renderItemLine) : null;
92
         return lines && lines.length ? lines.map(this._renderItemLine) : null;
94
     }
93
     }
95
 
94
 
96
-    /**
97
-     * Renders the secondary action label.
98
-     *
99
-     * @private
100
-     * @returns {React$Node}
101
-     */
102
-    _renderSecondaryAction() {
103
-        const { secondaryAction } = this.props;
104
-
105
-        return (
106
-            <Container
107
-                onClick = { secondaryAction }
108
-                style = { styles.secondaryActionContainer }>
109
-                <Text style = { styles.secondaryActionLabel }>+</Text>
110
-            </Container>
111
-        );
112
-    }
113
-
114
     /**
95
     /**
115
      * Renders the content of this component.
96
      * Renders the content of this component.
116
      *
97
      *
138
 
119
 
139
         return (
120
         return (
140
             <Swipeout
121
             <Swipeout
122
+                autoClose = { true }
141
                 backgroundColor = { ColorPalette.transparent }
123
                 backgroundColor = { ColorPalette.transparent }
142
                 right = { right }>
124
                 right = { right }>
143
                 <AvatarListItem
125
                 <AvatarListItem
144
                     item = { item }
126
                     item = { item }
145
-                    onPress = { this.props.onPress }>
146
-                    { this.props.secondaryAction
147
-                        && this._renderSecondaryAction() }
148
-                </AvatarListItem>
127
+                    onPress = { this.props.onPress } />
149
             </Swipeout>
128
             </Swipeout>
150
         );
129
         );
151
     }
130
     }

+ 0
- 16
react/features/base/react/components/native/styles.js 파일 보기

4
 
4
 
5
 const AVATAR_OPACITY = 0.4;
5
 const AVATAR_OPACITY = 0.4;
6
 const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
6
 const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
7
-const SECONDARY_ACTION_BUTTON_SIZE = 30;
8
 
7
 
9
 export const AVATAR_SIZE = 65;
8
 export const AVATAR_SIZE = 65;
10
 export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
9
 export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
218
         color: OVERLAY_FONT_COLOR
217
         color: OVERLAY_FONT_COLOR
219
     },
218
     },
220
 
219
 
221
-    secondaryActionContainer: {
222
-        alignItems: 'center',
223
-        backgroundColor: ColorPalette.blue,
224
-        borderRadius: 3,
225
-        height: SECONDARY_ACTION_BUTTON_SIZE,
226
-        justifyContent: 'center',
227
-        margin: BoxModel.margin * 0.5,
228
-        marginRight: BoxModel.margin,
229
-        width: SECONDARY_ACTION_BUTTON_SIZE
230
-    },
231
-
232
-    secondaryActionLabel: {
233
-        color: ColorPalette.white
234
-    },
235
-
236
     touchableView: {
220
     touchableView: {
237
         flexDirection: 'row'
221
         flexDirection: 'row'
238
     }
222
     }

+ 10
- 0
react/features/invite/actionTypes.js 파일 보기

41
  */
41
  */
42
 export const SET_CALLEE_INFO_VISIBLE = 'SET_CALLEE_INFO_VISIBLE';
42
 export const SET_CALLEE_INFO_VISIBLE = 'SET_CALLEE_INFO_VISIBLE';
43
 
43
 
44
+/**
45
+ * The type of Redux action to set the visibility of the dial in summary.
46
+ *
47
+ * {
48
+ *     type: SET_DIAL_IN_SUMMARY_VISIBLE,
49
+ *     visible: boolean
50
+ * }
51
+ */
52
+export const SET_DIAL_IN_SUMMARY_VISIBLE = 'SET_DIAL_IN_SUMMARY_VISIBLE';
53
+
44
 /**
54
 /**
45
  * The type of redux action which sets the invite dialog visible or invisible.
55
  * The type of redux action which sets the invite dialog visible or invisible.
46
  *
56
  *

+ 26
- 0
react/features/invite/actions.js 파일 보기

11
     BEGIN_ADD_PEOPLE,
11
     BEGIN_ADD_PEOPLE,
12
     REMOVE_PENDING_INVITE_REQUESTS,
12
     REMOVE_PENDING_INVITE_REQUESTS,
13
     SET_CALLEE_INFO_VISIBLE,
13
     SET_CALLEE_INFO_VISIBLE,
14
+    SET_DIAL_IN_SUMMARY_VISIBLE,
14
     SET_INVITE_DIALOG_VISIBLE,
15
     SET_INVITE_DIALOG_VISIBLE,
15
     UPDATE_DIAL_IN_NUMBERS_FAILED,
16
     UPDATE_DIAL_IN_NUMBERS_FAILED,
16
     UPDATE_DIAL_IN_NUMBERS_SUCCESS
17
     UPDATE_DIAL_IN_NUMBERS_SUCCESS
256
     };
257
     };
257
 }
258
 }
258
 
259
 
260
+/**
261
+ * Action to hide the dial in summary.
262
+ *
263
+ * @returns {showDialInSummary}
264
+ */
265
+export function hideDialInSummary() {
266
+    return showDialInSummary(undefined);
267
+}
268
+
259
 /**
269
 /**
260
  * Removes all pending invite requests.
270
  * Removes all pending invite requests.
261
  *
271
  *
268
         type: REMOVE_PENDING_INVITE_REQUESTS
278
         type: REMOVE_PENDING_INVITE_REQUESTS
269
     };
279
     };
270
 }
280
 }
281
+
282
+/**
283
+ * Action to set the dial in summary url (and show it).
284
+ *
285
+ * @param {?string} locationUrl - The location URL to show the dial in summary for.
286
+ * @returns {{
287
+ *     type: SET_DIAL_IN_SUMMARY_VISIBLE,
288
+ *     summaryUrl: ?string
289
+ * }}
290
+ */
291
+export function showDialInSummary(locationUrl: ?string) {
292
+    return {
293
+        type: SET_DIAL_IN_SUMMARY_VISIBLE,
294
+        summaryUrl: locationUrl
295
+    };
296
+}

+ 0
- 0
react/features/invite/components/dial-in-summary/ConferenceID.native.js 파일 보기


+ 0
- 0
react/features/invite/components/dial-in-summary/DialInSummary.native.js 파일 보기


+ 0
- 0
react/features/invite/components/dial-in-summary/NumbersList.native.js 파일 보기


+ 3
- 0
react/features/invite/components/dial-in-summary/index.native.js 파일 보기

1
+// @flow
2
+
3
+export * from './native';

+ 3
- 0
react/features/invite/components/dial-in-summary/index.web.js 파일 보기

1
+// @flow
2
+
3
+export * from './web';

+ 156
- 0
react/features/invite/components/dial-in-summary/native/DialInSummary.js 파일 보기

1
+// @flow
2
+
3
+import React, { Component } from 'react';
4
+import { Linking, View } from 'react-native';
5
+import { WebView } from 'react-native-webview';
6
+import { type Dispatch } from 'redux';
7
+
8
+import { openDialog } from '../../../../base/dialog';
9
+import { translate } from '../../../../base/i18n';
10
+import {
11
+    HeaderWithNavigation,
12
+    LoadingIndicator,
13
+    SlidingView
14
+} from '../../../../base/react';
15
+import { connect } from '../../../../base/redux';
16
+
17
+import { hideDialInSummary } from '../../../actions';
18
+import { getDialInfoPageURLForURIString } from '../../../functions';
19
+
20
+import DialInSummaryErrorDialog from './DialInSummaryErrorDialog';
21
+import styles, { INDICATOR_COLOR } from './styles';
22
+
23
+type Props = {
24
+
25
+    /**
26
+     * The URL to display the summary for.
27
+     */
28
+    _summaryUrl: ?string,
29
+
30
+    dispatch: Dispatch<any>
31
+};
32
+
33
+/**
34
+ * Implements a React native component that displays the dial in info page for a specific room.
35
+ */
36
+class DialInSummary extends Component<Props> {
37
+
38
+    /**
39
+     * Initializes a new instance.
40
+     *
41
+     * @inheritdoc
42
+     */
43
+    constructor(props: Props) {
44
+        super(props);
45
+
46
+        this._onCloseView = this._onCloseView.bind(this);
47
+        this._onError = this._onError.bind(this);
48
+        this._onNavigate = this._onNavigate.bind(this);
49
+        this._renderLoading = this._renderLoading.bind(this);
50
+    }
51
+
52
+    /**
53
+     * Implements React's {@link Component#render()}.
54
+     *
55
+     * @inheritdoc
56
+     */
57
+    render() {
58
+        const { _summaryUrl } = this.props;
59
+
60
+        return (
61
+            <SlidingView
62
+                position = 'bottom'
63
+                show = { Boolean(_summaryUrl) } >
64
+                <View style = { styles.webViewWrapper }>
65
+                    <HeaderWithNavigation
66
+                        headerLabelKey = 'info.label'
67
+                        onPressBack = { this._onCloseView } />
68
+                    <WebView
69
+                        onError = { this._onError }
70
+                        onShouldStartLoadWithRequest = { this._onNavigate }
71
+                        renderLoading = { this._renderLoading }
72
+                        source = {{ uri: getDialInfoPageURLForURIString(_summaryUrl) }}
73
+                        startInLoadingState = { true }
74
+                        style = { styles.webView } />
75
+                </View>
76
+            </SlidingView>
77
+        );
78
+    }
79
+
80
+    _onCloseView: () => void;
81
+
82
+    /**
83
+     * Closes the view.
84
+     *
85
+     * @returns {void}
86
+     */
87
+    _onCloseView() {
88
+        this.props.dispatch(hideDialInSummary());
89
+    }
90
+
91
+    _onError: () => void;
92
+
93
+    /**
94
+     * Callback to handle the error if the page fails to load.
95
+     *
96
+     * @returns {void}
97
+     */
98
+    _onError() {
99
+        this.props.dispatch(hideDialInSummary());
100
+        this.props.dispatch(openDialog(DialInSummaryErrorDialog));
101
+    }
102
+
103
+    _onNavigate: Object => Boolean;
104
+
105
+    /**
106
+     * Callback to intercept navigation inside the webview and make the native app handle the dial requests.
107
+     *
108
+     * NOTE: We don't navigate to anywhere else form that view.
109
+     *
110
+     * @param {any} request - The request object.
111
+     * @returns {boolean}
112
+     */
113
+    _onNavigate(request) {
114
+        const { url } = request;
115
+
116
+        if (url.startsWith('tel:')) {
117
+            Linking.openURL(url);
118
+            this.props.dispatch(hideDialInSummary());
119
+        }
120
+
121
+        return url === getDialInfoPageURLForURIString(this.props._summaryUrl);
122
+    }
123
+
124
+    _renderLoading: () => React$Component<any>;
125
+
126
+    /**
127
+     * Renders the loading indicator.
128
+     *
129
+     * @returns {React$Component<any>}
130
+     */
131
+    _renderLoading() {
132
+        return (
133
+            <View style = { styles.indicatorWrapper }>
134
+                <LoadingIndicator
135
+                    color = { INDICATOR_COLOR }
136
+                    size = 'large' />
137
+            </View>
138
+        );
139
+    }
140
+}
141
+
142
+/**
143
+ * Maps part of the Redux state to the props of this component.
144
+ *
145
+ * @param {Object} state - The Redux state.
146
+ * @returns {{
147
+ *      _summaryUrl: ?string
148
+ * }}
149
+ */
150
+function _mapStateToProps(state) {
151
+    return {
152
+        _summaryUrl: state['features/invite'].summaryUrl
153
+    };
154
+}
155
+
156
+export default translate(connect(_mapStateToProps)(DialInSummary));

+ 29
- 0
react/features/invite/components/dial-in-summary/native/DialInSummaryErrorDialog.js 파일 보기

1
+// @flow
2
+
3
+import React, { Component } from 'react';
4
+
5
+import { AlertDialog } from '../../../../base/dialog';
6
+import { translate } from '../../../../base/i18n';
7
+import { connect } from '../../../../base/redux';
8
+
9
+/**
10
+ * Dialog to inform the user that we could't fetch the dial-in info page.
11
+ */
12
+class DialInSummaryErrorDialog extends Component<{}> {
13
+    /**
14
+     * Implements React's {@link Component#render()}.
15
+     *
16
+     * @inheritdoc
17
+     * @returns {ReactElement}
18
+     */
19
+    render() {
20
+        return (
21
+            <AlertDialog
22
+                contentKey = 'info.dialInSummaryError' />
23
+        );
24
+    }
25
+
26
+    _onSubmit: () => boolean;
27
+}
28
+
29
+export default translate(connect()(DialInSummaryErrorDialog));

react/features/invite/components/dial-in-summary/index.js → react/features/invite/components/dial-in-summary/native/index.js 파일 보기

1
+// @flow
2
+
1
 export { default as DialInSummary } from './DialInSummary';
3
 export { default as DialInSummary } from './DialInSummary';

+ 24
- 0
react/features/invite/components/dial-in-summary/native/styles.js 파일 보기

1
+// @flow
2
+
3
+import { ColorPalette } from '../../../../base/styles';
4
+
5
+export const INDICATOR_COLOR = ColorPalette.lightGrey;
6
+
7
+export default {
8
+
9
+    indicatorWrapper: {
10
+        alignItems: 'center',
11
+        backgroundColor: ColorPalette.white,
12
+        flex: 1,
13
+        justifyContent: 'center'
14
+    },
15
+
16
+    webView: {
17
+        flex: 1
18
+    },
19
+
20
+    webViewWrapper: {
21
+        flex: 1,
22
+        flexDirection: 'column'
23
+    }
24
+};

react/features/invite/components/dial-in-summary/ConferenceID.web.js → react/features/invite/components/dial-in-summary/web/ConferenceID.js 파일 보기

1
-/* @flow */
1
+// @flow
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
-import { translate } from '../../../base/i18n';
5
+import { translate } from '../../../../base/i18n';
6
 
6
 
7
 /**
7
 /**
8
  * The type of the React {@code Component} props of {@link ConferenceID}.
8
  * The type of the React {@code Component} props of {@link ConferenceID}.

react/features/invite/components/dial-in-summary/DialInSummary.web.js → react/features/invite/components/dial-in-summary/web/DialInSummary.js 파일 보기

1
-/* @flow */
1
+// @flow
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
-import { translate } from '../../../base/i18n';
5
+import { translate } from '../../../../base/i18n';
6
 
6
 
7
 import ConferenceID from './ConferenceID';
7
 import ConferenceID from './ConferenceID';
8
 import NumbersList from './NumbersList';
8
 import NumbersList from './NumbersList';

react/features/invite/components/dial-in-summary/NumbersList.web.js → react/features/invite/components/dial-in-summary/web/NumbersList.js 파일 보기

1
-/* @flow */
1
+// @flow
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
-import { translate } from '../../../base/i18n';
5
+import { translate } from '../../../../base/i18n';
6
 
6
 
7
 type Props = {
7
 type Props = {
8
 
8
 

+ 3
- 0
react/features/invite/components/dial-in-summary/web/index.js 파일 보기

1
+// @flow
2
+
3
+export { default as DialInSummary } from './DialInSummary';

+ 1
- 1
react/features/invite/components/index.js 파일 보기

1
 // @flow
1
 // @flow
2
 
2
 
3
 export * from './add-people-dialog';
3
 export * from './add-people-dialog';
4
-export { DialInSummary } from './dial-in-summary';
4
+export * from './dial-in-summary';
5
 export * from './info-dialog';
5
 export * from './info-dialog';
6
 export * from './callee-info';
6
 export * from './callee-info';

+ 16
- 0
react/features/invite/functions.js 파일 보기

508
     return `${origin}${newPath}/static/dialInInfo.html?room=${conferenceName}`;
508
     return `${origin}${newPath}/static/dialInInfo.html?room=${conferenceName}`;
509
 }
509
 }
510
 
510
 
511
+/**
512
+ * Generates the URL for the static dial in info page.
513
+ *
514
+ * @param {string} uri - The conference URI string.
515
+ * @returns {string}
516
+ */
517
+export function getDialInfoPageURLForURIString(
518
+        uri: ?string) {
519
+    if (!uri) {
520
+        return undefined;
521
+    }
522
+    const { protocol, host, contextRoot, room } = parseURIString(uri);
523
+
524
+    return `${protocol}//${host}${contextRoot}static/dialInInfo.html?room=${room}`;
525
+}
526
+
511
 /**
527
 /**
512
  * Sets the internal state of which dial-in number to display.
528
  * Sets the internal state of which dial-in number to display.
513
  *
529
  *

+ 7
- 0
react/features/invite/reducer.js 파일 보기

6
     ADD_PENDING_INVITE_REQUEST,
6
     ADD_PENDING_INVITE_REQUEST,
7
     REMOVE_PENDING_INVITE_REQUESTS,
7
     REMOVE_PENDING_INVITE_REQUESTS,
8
     SET_CALLEE_INFO_VISIBLE,
8
     SET_CALLEE_INFO_VISIBLE,
9
+    SET_DIAL_IN_SUMMARY_VISIBLE,
9
     SET_INVITE_DIALOG_VISIBLE,
10
     SET_INVITE_DIALOG_VISIBLE,
10
     UPDATE_DIAL_IN_NUMBERS_FAILED,
11
     UPDATE_DIAL_IN_NUMBERS_FAILED,
11
     UPDATE_DIAL_IN_NUMBERS_SUCCESS
12
     UPDATE_DIAL_IN_NUMBERS_SUCCESS
50
             initialCalleeInfo: action.initialCalleeInfo
51
             initialCalleeInfo: action.initialCalleeInfo
51
         };
52
         };
52
 
53
 
54
+    case SET_DIAL_IN_SUMMARY_VISIBLE:
55
+        return {
56
+            ...state,
57
+            summaryUrl: action.summaryUrl
58
+        };
59
+
53
     case SET_INVITE_DIALOG_VISIBLE:
60
     case SET_INVITE_DIALOG_VISIBLE:
54
         return {
61
         return {
55
             ...state,
62
             ...state,

+ 19
- 0
react/features/recent-list/components/RecentList.native.js 파일 보기

7
 import { translate } from '../../base/i18n';
7
 import { translate } from '../../base/i18n';
8
 import { NavigateSectionList, type Section } from '../../base/react';
8
 import { NavigateSectionList, type Section } from '../../base/react';
9
 import { connect } from '../../base/redux';
9
 import { connect } from '../../base/redux';
10
+import { ColorPalette } from '../../base/styles';
11
+import { showDialInSummary } from '../../invite';
10
 
12
 
11
 import { deleteRecentListEntry } from '../actions';
13
 import { deleteRecentListEntry } from '../actions';
12
 import { isRecentListEnabled, toDisplayableList } from '../functions';
14
 import { isRecentListEnabled, toDisplayableList } from '../functions';
60
         super(props);
62
         super(props);
61
 
63
 
62
         this._onDelete = this._onDelete.bind(this);
64
         this._onDelete = this._onDelete.bind(this);
65
+        this._onShowDialInInfo = this._onShowDialInInfo.bind(this);
63
     }
66
     }
64
 
67
 
65
     /**
68
     /**
79
         } = this.props;
82
         } = this.props;
80
         const recentList = toDisplayableList(_recentList, t, _defaultServerURL);
83
         const recentList = toDisplayableList(_recentList, t, _defaultServerURL);
81
         const slideActions = [ {
84
         const slideActions = [ {
85
+            backgroundColor: ColorPalette.blue,
86
+            onPress: this._onShowDialInInfo,
87
+            text: t('welcomepage.info')
88
+        }, {
82
             backgroundColor: 'red',
89
             backgroundColor: 'red',
83
             onPress: this._onDelete,
90
             onPress: this._onDelete,
84
             text: t('welcomepage.recentListDelete')
91
             text: t('welcomepage.recentListDelete')
107
     _onDelete(itemId) {
114
     _onDelete(itemId) {
108
         this.props.dispatch(deleteRecentListEntry(itemId));
115
         this.props.dispatch(deleteRecentListEntry(itemId));
109
     }
116
     }
117
+
118
+    _onShowDialInInfo: Object => void
119
+
120
+    /**
121
+     * Callback for the dial-in info action of the list.
122
+     *
123
+     * @param {Object} itemId - The ID of the entry for which we'd like to show the dial in numbers.
124
+     * @returns {void}
125
+     */
126
+    _onShowDialInInfo(itemId) {
127
+        this.props.dispatch(showDialInSummary(itemId.url));
128
+    }
110
 }
129
 }
111
 
130
 
112
 /**
131
 /**

+ 2
- 0
react/features/welcome/components/WelcomePage.native.js 파일 보기

20
     createDesiredLocalTracks,
20
     createDesiredLocalTracks,
21
     destroyLocalTracks
21
     destroyLocalTracks
22
 } from '../../base/tracks';
22
 } from '../../base/tracks';
23
+import { DialInSummary } from '../../invite';
23
 import { SettingsView } from '../../settings';
24
 import { SettingsView } from '../../settings';
24
 
25
 
25
 import {
26
 import {
135
                     </SafeAreaView>
136
                     </SafeAreaView>
136
                     <WelcomePageLists disabled = { this.state._fieldFocused } />
137
                     <WelcomePageLists disabled = { this.state._fieldFocused } />
137
                     <SettingsView />
138
                     <SettingsView />
139
+                    <DialInSummary />
138
                 </View>
140
                 </View>
139
                 <WelcomePageSideBar />
141
                 <WelcomePageSideBar />
140
             </LocalVideoTrackUnderlay>
142
             </LocalVideoTrackUnderlay>

Loading…
취소
저장