Kaynağa Gözat

rn: add DialInSummary

j8
Bettenbuk Zoltan 6 yıl önce
ebeveyn
işleme
86d0d4fc22
31 değiştirilmiş dosya ile 351 ekleme ve 53 silme
  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 Dosyayı Görüntüle

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

+ 1
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Dosyayı Görüntüle

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

+ 4
- 2
android/settings.gradle Dosyayı Görüntüle

@@ -3,6 +3,8 @@ rootProject.name = 'jitsi-meet'
3 3
 include ':app', ':sdk'
4 4
 include ':react-native-background-timer'
5 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 8
 include ':react-native-fast-image'
7 9
 project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
8 10
 include ':react-native-google-signin'
@@ -19,5 +21,5 @@ include ':react-native-vector-icons'
19 21
 project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
20 22
 include ':react-native-webrtc'
21 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 Dosyayı Görüntüle

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

+ 4
- 2
ios/Podfile Dosyayı Görüntüle

@@ -40,10 +40,14 @@ target 'JitsiMeet' do
40 40
 
41 41
   pod 'react-native-background-timer',
42 42
     :path => '../node_modules/react-native-background-timer'
43
+  pod 'react-native-calendar-events',
44
+    :path => '../node_modules/react-native-calendar-events'
43 45
   pod 'react-native-fast-image',
44 46
     :path => '../node_modules/react-native-fast-image'
45 47
   pod 'react-native-keep-awake',
46 48
     :path => '../node_modules/react-native-keep-awake'
49
+  pod 'react-native-webview',
50
+    :path => '../node_modules/react-native-webview'
47 51
   pod 'BVLinearGradient',
48 52
     :path => '../node_modules/react-native-linear-gradient'
49 53
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
@@ -52,8 +56,6 @@ target 'JitsiMeet' do
52 56
   pod 'RNSound', :path => '../node_modules/react-native-sound'
53 57
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
54 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 59
 end
58 60
 
59 61
 post_install do |installer|

+ 7
- 1
ios/Podfile.lock Dosyayı Görüntüle

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

+ 2
- 0
lang/main.json Dosyayı Görüntüle

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

+ 19
- 0
package-lock.json Dosyayı Görüntüle

@@ -12274,6 +12274,25 @@
12274 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 12296
     "react-node-resolver": {
12278 12297
       "version": "1.0.1",
12279 12298
       "resolved": "https://registry.npmjs.org/react-node-resolver/-/react-node-resolver-1.0.1.tgz",

+ 1
- 0
package.json Dosyayı Görüntüle

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

+ 4
- 25
react/features/base/react/components/native/NavigateSectionListItem.js Dosyayı Görüntüle

@@ -5,12 +5,11 @@ import Swipeout from 'react-native-swipeout';
5 5
 
6 6
 import { ColorPalette } from '../../../styles';
7 7
 
8
-import Container from './Container';
9
-import Text from './Text';
10
-import styles from './styles';
11 8
 import type { Item } from '../../Types';
12 9
 
13 10
 import AvatarListItem from './AvatarListItem';
11
+import Text from './Text';
12
+import styles from './styles';
14 13
 
15 14
 type Props = {
16 15
 
@@ -93,24 +92,6 @@ export default class NavigateSectionListItem extends Component<Props> {
93 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 96
      * Renders the content of this component.
116 97
      *
@@ -138,14 +119,12 @@ export default class NavigateSectionListItem extends Component<Props> {
138 119
 
139 120
         return (
140 121
             <Swipeout
122
+                autoClose = { true }
141 123
                 backgroundColor = { ColorPalette.transparent }
142 124
                 right = { right }>
143 125
                 <AvatarListItem
144 126
                     item = { item }
145
-                    onPress = { this.props.onPress }>
146
-                    { this.props.secondaryAction
147
-                        && this._renderSecondaryAction() }
148
-                </AvatarListItem>
127
+                    onPress = { this.props.onPress } />
149 128
             </Swipeout>
150 129
         );
151 130
     }

+ 0
- 16
react/features/base/react/components/native/styles.js Dosyayı Görüntüle

@@ -4,7 +4,6 @@ import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
4 4
 
5 5
 const AVATAR_OPACITY = 0.4;
6 6
 const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
7
-const SECONDARY_ACTION_BUTTON_SIZE = 30;
8 7
 
9 8
 export const AVATAR_SIZE = 65;
10 9
 export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
@@ -218,21 +217,6 @@ const SECTION_LIST_STYLES = {
218 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 220
     touchableView: {
237 221
         flexDirection: 'row'
238 222
     }

+ 10
- 0
react/features/invite/actionTypes.js Dosyayı Görüntüle

@@ -41,6 +41,16 @@ export const REMOVE_PENDING_INVITE_REQUESTS
41 41
  */
42 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 55
  * The type of redux action which sets the invite dialog visible or invisible.
46 56
  *

+ 26
- 0
react/features/invite/actions.js Dosyayı Görüntüle

@@ -11,6 +11,7 @@ import {
11 11
     BEGIN_ADD_PEOPLE,
12 12
     REMOVE_PENDING_INVITE_REQUESTS,
13 13
     SET_CALLEE_INFO_VISIBLE,
14
+    SET_DIAL_IN_SUMMARY_VISIBLE,
14 15
     SET_INVITE_DIALOG_VISIBLE,
15 16
     UPDATE_DIAL_IN_NUMBERS_FAILED,
16 17
     UPDATE_DIAL_IN_NUMBERS_SUCCESS
@@ -256,6 +257,15 @@ export function addPendingInviteRequest(
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 270
  * Removes all pending invite requests.
261 271
  *
@@ -268,3 +278,19 @@ export function removePendingInviteRequests() {
268 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 Dosyayı Görüntüle


+ 0
- 0
react/features/invite/components/dial-in-summary/DialInSummary.native.js Dosyayı Görüntüle


+ 0
- 0
react/features/invite/components/dial-in-summary/NumbersList.native.js Dosyayı Görüntüle


+ 3
- 0
react/features/invite/components/dial-in-summary/index.native.js Dosyayı Görüntüle

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

+ 3
- 0
react/features/invite/components/dial-in-summary/index.web.js Dosyayı Görüntüle

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

+ 156
- 0
react/features/invite/components/dial-in-summary/native/DialInSummary.js Dosyayı Görüntüle

@@ -0,0 +1,156 @@
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 Dosyayı Görüntüle

@@ -0,0 +1,29 @@
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 Dosyayı Görüntüle

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

+ 24
- 0
react/features/invite/components/dial-in-summary/native/styles.js Dosyayı Görüntüle

@@ -0,0 +1,24 @@
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 Dosyayı Görüntüle

@@ -1,8 +1,8 @@
1
-/* @flow */
1
+// @flow
2 2
 
3 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 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 Dosyayı Görüntüle

@@ -1,8 +1,8 @@
1
-/* @flow */
1
+// @flow
2 2
 
3 3
 import React, { Component } from 'react';
4 4
 
5
-import { translate } from '../../../base/i18n';
5
+import { translate } from '../../../../base/i18n';
6 6
 
7 7
 import ConferenceID from './ConferenceID';
8 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 Dosyayı Görüntüle

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

+ 3
- 0
react/features/invite/components/dial-in-summary/web/index.js Dosyayı Görüntüle

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

+ 1
- 1
react/features/invite/components/index.js Dosyayı Görüntüle

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

+ 16
- 0
react/features/invite/functions.js Dosyayı Görüntüle

@@ -508,6 +508,22 @@ export function getDialInfoPageURL(
508 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 528
  * Sets the internal state of which dial-in number to display.
513 529
  *

+ 7
- 0
react/features/invite/reducer.js Dosyayı Görüntüle

@@ -6,6 +6,7 @@ import {
6 6
     ADD_PENDING_INVITE_REQUEST,
7 7
     REMOVE_PENDING_INVITE_REQUESTS,
8 8
     SET_CALLEE_INFO_VISIBLE,
9
+    SET_DIAL_IN_SUMMARY_VISIBLE,
9 10
     SET_INVITE_DIALOG_VISIBLE,
10 11
     UPDATE_DIAL_IN_NUMBERS_FAILED,
11 12
     UPDATE_DIAL_IN_NUMBERS_SUCCESS
@@ -50,6 +51,12 @@ ReducerRegistry.register('features/invite', (state = DEFAULT_STATE, action) => {
50 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 60
     case SET_INVITE_DIALOG_VISIBLE:
54 61
         return {
55 62
             ...state,

+ 19
- 0
react/features/recent-list/components/RecentList.native.js Dosyayı Görüntüle

@@ -7,6 +7,8 @@ import { getDefaultURL } from '../../app';
7 7
 import { translate } from '../../base/i18n';
8 8
 import { NavigateSectionList, type Section } from '../../base/react';
9 9
 import { connect } from '../../base/redux';
10
+import { ColorPalette } from '../../base/styles';
11
+import { showDialInSummary } from '../../invite';
10 12
 
11 13
 import { deleteRecentListEntry } from '../actions';
12 14
 import { isRecentListEnabled, toDisplayableList } from '../functions';
@@ -60,6 +62,7 @@ class RecentList extends AbstractRecentList<Props> {
60 62
         super(props);
61 63
 
62 64
         this._onDelete = this._onDelete.bind(this);
65
+        this._onShowDialInInfo = this._onShowDialInInfo.bind(this);
63 66
     }
64 67
 
65 68
     /**
@@ -79,6 +82,10 @@ class RecentList extends AbstractRecentList<Props> {
79 82
         } = this.props;
80 83
         const recentList = toDisplayableList(_recentList, t, _defaultServerURL);
81 84
         const slideActions = [ {
85
+            backgroundColor: ColorPalette.blue,
86
+            onPress: this._onShowDialInInfo,
87
+            text: t('welcomepage.info')
88
+        }, {
82 89
             backgroundColor: 'red',
83 90
             onPress: this._onDelete,
84 91
             text: t('welcomepage.recentListDelete')
@@ -107,6 +114,18 @@ class RecentList extends AbstractRecentList<Props> {
107 114
     _onDelete(itemId) {
108 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 Dosyayı Görüntüle

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

Loading…
İptal
Kaydet