瀏覽代碼

fix(support-url): Hide contact support button when SUPPORT_URL is empty

- fix issue on error notification on invite contacts
j8
hmuresan 3 年之前
父節點
當前提交
17f77a4246

+ 4
- 7
react/features/invite/components/add-people-dialog/web/InviteContactsForm.js 查看文件

511
         const supportString = t('inlineDialogFailure.supportMsg');
511
         const supportString = t('inlineDialogFailure.supportMsg');
512
         const supportLink = interfaceConfig.SUPPORT_URL;
512
         const supportLink = interfaceConfig.SUPPORT_URL;
513
 
513
 
514
-        if (!supportLink) {
515
-            return null;
516
-        }
517
-
518
-        const supportLinkContent = (
514
+        const supportLinkContent = supportLink ? (
519
             <span>
515
             <span>
520
                 <span>
516
                 <span>
521
                     { supportString.padEnd(supportString.length + 1) }
517
                     { supportString.padEnd(supportString.length + 1) }
524
                     <a
520
                     <a
525
                         aria-label = { supportLink }
521
                         aria-label = { supportLink }
526
                         href = { supportLink }
522
                         href = { supportLink }
527
-                        rel = 'noopener noreferrer'>
523
+                        rel = 'noopener noreferrer'
524
+                        target = '_blank'>
528
                         { t('inlineDialogFailure.support') }
525
                         { t('inlineDialogFailure.support') }
529
                     </a>
526
                     </a>
530
                 </span>
527
                 </span>
531
                 <span>.</span>
528
                 <span>.</span>
532
             </span>
529
             </span>
533
-        );
530
+        ) : null;
534
 
531
 
535
         return (
532
         return (
536
             <div className = 'modal-dialog-form-error'>
533
             <div className = 'modal-dialog-form-error'>

+ 1
- 1
react/features/notifications/components/web/Notification.js 查看文件

116
                 }
116
                 }
117
             ];
117
             ];
118
 
118
 
119
-            if (!hideErrorSupportLink) {
119
+            if (!hideErrorSupportLink && interfaceConfig.SUPPORT_URL) {
120
                 buttons.push({
120
                 buttons.push({
121
                     content: this.props.t('dialog.contactSupport'),
121
                     content: this.props.t('dialog.contactSupport'),
122
                     onClick: this._onOpenSupportLink
122
                     onClick: this._onOpenSupportLink

Loading…
取消
儲存