Browse Source

fix(jaas) hide support link in invite error for jaas users

j8
Tudor-Ovidiu Avram 4 years ago
parent
commit
3a073d9af4

+ 8
- 3
react/features/base/react/components/web/InlineDialogFailure.js View File

20
     /**
20
     /**
21
      * Invoked to obtain translated strings.
21
      * Invoked to obtain translated strings.
22
      */
22
      */
23
-    t: Function
23
+    t: Function,
24
+
25
+    /**
26
+     * Indicates whether the support link should be shown in case of an error
27
+     */
28
+     showSupportLink: Boolean,
24
 };
29
 };
25
 
30
 
26
 /**
31
 /**
33
      * @returns {ReactElement}
38
      * @returns {ReactElement}
34
      */
39
      */
35
     render() {
40
     render() {
36
-        const { t } = this.props;
41
+        const { t, showSupportLink } = this.props;
37
 
42
 
38
         const supportLink = interfaceConfig.SUPPORT_URL;
43
         const supportLink = interfaceConfig.SUPPORT_URL;
39
         const supportString = t('inlineDialogFailure.supportMsg');
44
         const supportString = t('inlineDialogFailure.supportMsg');
40
         const supportLinkElem
45
         const supportLinkElem
41
-            = supportLink
46
+            = supportLink && showSupportLink
42
                 ? (
47
                 ? (
43
                     <div className = 'inline-dialog-error-text'>
48
                     <div className = 'inline-dialog-error-text'>
44
                         <span>{ supportString.padEnd(supportString.length + 1) }
49
                         <span>{ supportString.padEnd(supportString.length + 1) }

+ 8
- 2
react/features/base/react/components/web/MultiSelectAutocomplete.js View File

70
     /**
70
     /**
71
      * Indicates if we should focus.
71
      * Indicates if we should focus.
72
      */
72
      */
73
-    shouldFocus: boolean
73
+    shouldFocus: boolean,
74
+
75
+    /**
76
+     * Indicates whether the support link should be shown in case of an error
77
+     */
78
+    showSupportLink: Boolean,
74
 };
79
 };
75
 
80
 
76
 /**
81
 /**
263
         const content = (
268
         const content = (
264
             <div className = 'autocomplete-error'>
269
             <div className = 'autocomplete-error'>
265
                 <InlineDialogFailure
270
                 <InlineDialogFailure
266
-                    onRetry = { this._onRetry } />
271
+                    onRetry = { this._onRetry }
272
+                    showSupportLink = { this.props.showSupportLink } />
267
             </div>
273
             </div>
268
         );
274
         );
269
 
275
 

+ 11
- 2
react/features/invite/components/add-people-dialog/web/InviteContactsForm.js View File

10
 import { getLocalParticipant } from '../../../../base/participants';
10
 import { getLocalParticipant } from '../../../../base/participants';
11
 import { MultiSelectAutocomplete } from '../../../../base/react';
11
 import { MultiSelectAutocomplete } from '../../../../base/react';
12
 import { connect } from '../../../../base/redux';
12
 import { connect } from '../../../../base/redux';
13
+import { isVpaasMeeting } from '../../../../billing-counter/functions';
13
 import { hideAddPeopleDialog } from '../../../actions';
14
 import { hideAddPeopleDialog } from '../../../actions';
14
 import AbstractAddPeopleDialog, {
15
 import AbstractAddPeopleDialog, {
15
     type Props as AbstractProps,
16
     type Props as AbstractProps,
31
      */
32
      */
32
     _footerTextEnabled: boolean,
33
     _footerTextEnabled: boolean,
33
 
34
 
35
+    /**
36
+     * Whether the meeting belongs to JaaS user
37
+     */
38
+    _isVpaas: boolean,
39
+
34
     /**
40
     /**
35
      * The redux {@code dispatch} function.
41
      * The redux {@code dispatch} function.
36
      */
42
      */
110
         const {
116
         const {
111
             _addPeopleEnabled,
117
             _addPeopleEnabled,
112
             _dialOutEnabled,
118
             _dialOutEnabled,
119
+            _isVpaas,
113
             t
120
             t
114
         } = this.props;
121
         } = this.props;
115
         const footerText = this._renderFooterText();
122
         const footerText = this._renderFooterText();
152
                     ref = { this._setMultiSelectElement }
159
                     ref = { this._setMultiSelectElement }
153
                     resourceClient = { this._resourceClient }
160
                     resourceClient = { this._resourceClient }
154
                     shouldFitContainer = { true }
161
                     shouldFitContainer = { true }
155
-                    shouldFocus = { true } />
162
+                    shouldFocus = { true }
163
+                    showSupportLink = { !_isVpaas } />
156
                 { this._renderFormActions() }
164
                 { this._renderFormActions() }
157
             </div>
165
             </div>
158
         );
166
         );
516
 
524
 
517
     return {
525
     return {
518
         ..._abstractMapStateToProps(state),
526
         ..._abstractMapStateToProps(state),
519
-        _footerTextEnabled: footerTextEnabled
527
+        _footerTextEnabled: footerTextEnabled,
528
+        _isVpaas: isVpaasMeeting(state)
520
     };
529
     };
521
 }
530
 }
522
 
531
 

Loading…
Cancel
Save