浏览代码

fix(deploymentUrls): Disable help and download apps buttons for JaaS

j8
hmuresan 4 年前
父节点
当前提交
a1a5d1e7f8

+ 2
- 2
react/features/toolbox/components/DownloadButton.js 查看文件

@@ -6,7 +6,7 @@ import { IconDownload } from '../../base/icons';
6 6
 import { connect } from '../../base/redux';
7 7
 import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
8 8
 import { openURLInBrowser } from '../../base/util';
9
-
9
+import { isVpaasMeeting } from '../../billing-counter/functions';
10 10
 
11 11
 type Props = AbstractButtonProps & {
12 12
 
@@ -45,7 +45,7 @@ class DownloadButton extends AbstractButton<Props, *> {
45 45
  */
46 46
 function _mapStateToProps(state: Object) {
47 47
     const { downloadAppsUrl } = state['features/base/config'].deploymentUrls || {};
48
-    const visible = typeof downloadAppsUrl === 'string';
48
+    const visible = typeof downloadAppsUrl === 'string' && !isVpaasMeeting(state);
49 49
 
50 50
     return {
51 51
         _downloadAppsUrl: downloadAppsUrl,

+ 2
- 2
react/features/toolbox/components/HelpButton.js 查看文件

@@ -7,7 +7,7 @@ import { IconHelp } from '../../base/icons';
7 7
 import { connect } from '../../base/redux';
8 8
 import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
9 9
 import { openURLInBrowser } from '../../base/util';
10
-
10
+import { isVpaasMeeting } from '../../billing-counter/functions';
11 11
 
12 12
 type Props = AbstractButtonProps & {
13 13
 
@@ -47,7 +47,7 @@ class HelpButton extends AbstractButton<Props, *> {
47 47
 function _mapStateToProps(state: Object) {
48 48
     const { userDocumentationURL } = state['features/base/config'].deploymentUrls || {};
49 49
     const enabled = getFeatureFlag(state, HELP_BUTTON_ENABLED, true);
50
-    const visible = typeof userDocumentationURL === 'string' && enabled;
50
+    const visible = typeof userDocumentationURL === 'string' && enabled && !isVpaasMeeting(state);
51 51
 
52 52
     return {
53 53
         _userDocumentationURL: userDocumentationURL,

正在加载...
取消
保存