Преглед изворни кода

feat(deep-linking): hide web button on unsupported browsers

j8
Leonard Kim пре 5 година
родитељ
комит
d65a068fdb
2 измењених фајлова са 14 додато и 5 уклоњено
  1. 1
    0
      lang/main.json
  2. 13
    5
      react/features/deep-linking/components/DeepLinkingDesktopPage.web.js

+ 1
- 0
lang/main.json Прегледај датотеку

@@ -121,6 +121,7 @@
121 121
     "deepLinking": {
122 122
         "appNotInstalled": "You need the __app__ mobile app to join this meeting on your phone.",
123 123
         "description": "Nothing happened? We tried launching your meeting in the __app__ desktop app. Try again or launch it in the __app__ web app.",
124
+        "descriptionWithoutWeb": "Nothing happened? We tried launching your meeting in the __app__ desktop app.",
124 125
         "downloadApp": "Download the app",
125 126
         "launchWebButton": "Launch in web",
126 127
         "openApp": "Continue to the app",

+ 13
- 5
react/features/deep-linking/components/DeepLinkingDesktopPage.web.js Прегледај датотеку

@@ -7,6 +7,7 @@ import { connect } from '../../base/redux';
7 7
 import type { Dispatch } from 'redux';
8 8
 
9 9
 import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics';
10
+import { isSupportedBrowser } from '../../base/environment';
10 11
 import { translate } from '../../base/i18n';
11 12
 
12 13
 import {
@@ -107,8 +108,12 @@ class DeepLinkingDesktopPage<P : Props> extends Component<P> {
107 108
                                 </h1>
108 109
                                 <p className = 'description'>
109 110
                                     {
110
-                                        t(`${_TNS}.description`,
111
-                                            { app: NATIVE_APP_NAME })
111
+                                        t(
112
+                                            `${_TNS}.${isSupportedBrowser()
113
+                                                ? 'description'
114
+                                                : 'descriptionWithoutWeb'}`,
115
+                                            { app: NATIVE_APP_NAME }
116
+                                        )
112 117
                                     }
113 118
                                 </p>
114 119
                                 <div className = 'buttons'>
@@ -118,9 +123,12 @@ class DeepLinkingDesktopPage<P : Props> extends Component<P> {
118 123
                                             onClick = { this._onTryAgain }>
119 124
                                             { t(`${_TNS}.tryAgainButton`) }
120 125
                                         </Button>
121
-                                        <Button onClick = { this._onLaunchWeb }>
122
-                                            { t(`${_TNS}.launchWebButton`) }
123
-                                        </Button>
126
+                                        {
127
+                                            isSupportedBrowser()
128
+                                                && <Button onClick = { this._onLaunchWeb }>
129
+                                                    { t(`${_TNS}.launchWebButton`) }
130
+                                                </Button>
131
+                                        }
124 132
                                     </ButtonGroup>
125 133
                                 </div>
126 134
                             </div>

Loading…
Откажи
Сачувај