Преглед на файлове

fix(info): do not show dial in numbers without a room specified

For the static page an error message displays stating no room
was specified. On mobile for unsupported browsers, the dial in
info will not show.
master
Leonard Kim преди 7 години
родител
ревизия
8f520086e5

+ 1
- 2
css/unsupported-browser/_unsupported-mobile-browser.scss Целия файл

@@ -2,7 +2,6 @@
2 2
     background-color: #fff;
3 3
     height: 100vh;
4 4
     overflow: auto;
5
-    padding: 35px 0;
6 5
     position: relative;
7 6
     width: 100vw;
8 7
 
@@ -14,7 +13,7 @@
14 13
         color: $unsupportedBrowserTextColor;
15 14
         margin: auto;
16 15
         max-width: 40em;
17
-        padding-bottom: 40px;
16
+        padding: 35px 0 40px 0;
18 17
         text-align: center;
19 18
         width: 75%;
20 19
 

+ 2
- 0
lang/main.json Целия файл

@@ -499,7 +499,9 @@
499 499
         "invitePhoneAlternatives": "To view more phone numbers, click this link: __url__",
500 500
         "inviteURL": "To join the video meeting, click this link: __url__",
501 501
         "moreNumbers": "More numbers",
502
+        "noNumbers": "No dial-in numbers.",
502 503
         "noPassword": "None",
504
+        "noRoom": "No room was specified to dial-in into.",
503 505
         "numbers": "Dial-in Numbers",
504 506
         "password": "Password:",
505 507
         "title": "Call info",

+ 9
- 4
react/features/invite/components/dial-in-info-page/DialInInfoApp.web.js Целия файл

@@ -7,15 +7,20 @@ import { i18next } from '../../../base/i18n';
7 7
 
8 8
 import { DialInSummary } from '../dial-in-summary';
9 9
 
10
+import NoRoomError from './NoRoomError';
11
+
10 12
 document.addEventListener('DOMContentLoaded', () => {
11 13
     const params = parseURLParams(window.location, true, 'search');
14
+    const { room } = params;
12 15
 
13 16
     ReactDOM.render(
14 17
         <I18nextProvider i18n = { i18next }>
15
-            <DialInSummary
16
-                className = 'dial-in-page'
17
-                clickableNumbers = { false }
18
-                room = { params.room } />
18
+            { room
19
+                ? <DialInSummary
20
+                    className = 'dial-in-page'
21
+                    clickableNumbers = { false }
22
+                    room = { params.room } />
23
+                : <NoRoomError className = 'dial-in-page' /> }
19 24
         </I18nextProvider>,
20 25
         document.getElementById('react')
21 26
     );

+ 0
- 0
react/features/invite/components/dial-in-info-page/NoRoomError.native.js Целия файл


+ 48
- 0
react/features/invite/components/dial-in-info-page/NoRoomError.web.js Целия файл

@@ -0,0 +1,48 @@
1
+import PropTypes from 'prop-types';
2
+import React, { Component } from 'react';
3
+
4
+import { translate } from '../../../base/i18n';
5
+
6
+/**
7
+ * Displays an error message stating no room name was specified to fetch dial-in
8
+ * numbers for.
9
+ *
10
+ * @extends Component
11
+ */
12
+class NoRoomError extends Component {
13
+    /**
14
+     * {@code NoRoomError} component's property types.
15
+     *
16
+     * @static
17
+     */
18
+    static propTypes = {
19
+        /**
20
+         * Additional CSS classnames to append to the root of the component.
21
+         */
22
+        className: PropTypes.string,
23
+
24
+        /**
25
+         * Invoked to obtain translated strings.
26
+         */
27
+        t: PropTypes.func
28
+    };
29
+
30
+    /**
31
+     * Implements React's {@link Component#render()}.
32
+     *
33
+     * @inheritdoc
34
+     * @returns {ReactElement}
35
+     */
36
+    render() {
37
+        const { t } = this.props;
38
+
39
+        return (
40
+            <div className = { this.props.className } >
41
+                <div>{ t('info.noNumbers') }</div>
42
+                <div>{ t('info.noRoom') }</div>
43
+            </div>
44
+        );
45
+    }
46
+}
47
+
48
+export default translate(NoRoomError);

+ 7
- 5
react/features/unsupported-browser/components/UnsupportedMobileBrowser.js Целия файл

@@ -96,7 +96,7 @@ class UnsupportedMobileBrowser extends Component<*, *> {
96 96
      * @returns {ReactElement}
97 97
      */
98 98
     render() {
99
-        const { t } = this.props;
99
+        const { _room, t } = this.props;
100 100
 
101 101
         const openAppButtonClassName
102 102
             = `${_SNS}__button ${_SNS}__button_primary`;
@@ -128,10 +128,12 @@ class UnsupportedMobileBrowser extends Component<*, *> {
128 128
                             { t(`${_TNS}.downloadApp`) }
129 129
                         </button>
130 130
                     </a>
131
-                    <DialInSummary
132
-                        className = 'unsupported-dial-in'
133
-                        clickableNumbers = { true }
134
-                        room = { this.props._room } />
131
+                    { _room
132
+                        ? <DialInSummary
133
+                            className = 'unsupported-dial-in'
134
+                            clickableNumbers = { true }
135
+                            room = { _room } />
136
+                        : null }
135 137
                 </div>
136 138
                 <HideNotificationBarStyle />
137 139
             </div>

Loading…
Отказ
Запис