瀏覽代碼

feat: Drop HIDE_KICK_BUTTON_FOR_GUESTS setting.

The main config contains disableRemoteMute and remoteVideoMenu: { disableKick: true} options, which can be used.
j8
damencho 4 年之前
父節點
當前提交
4b8aae90e0
共有 2 個檔案被更改,包括 2 行新增30 行删除
  1. 0
    5
      interface_config.js
  2. 2
    25
      react/features/remote-video-menu/components/web/KickButton.js

+ 0
- 5
interface_config.js 查看文件

@@ -239,11 +239,6 @@ var interfaceConfig = {
239 239
      */
240 240
     VIDEO_QUALITY_LABEL_DISABLED: false,
241 241
 
242
-    /**
243
-     * When enabled, the kick participant button will not be presented for users without a JWT
244
-     */
245
-    // HIDE_KICK_BUTTON_FOR_GUESTS: false,
246
-
247 242
     /**
248 243
      * How many columns the tile view can expand to. The respected range is
249 244
      * between 1 and 5.

+ 2
- 25
react/features/remote-video-menu/components/web/KickButton.js 查看文件

@@ -4,7 +4,6 @@ import React from 'react';
4 4
 
5 5
 import { translate } from '../../../base/i18n';
6 6
 import { IconKick } from '../../../base/icons';
7
-import { connect } from '../../../base/redux';
8 7
 import AbstractKickButton, {
9 8
     type Props
10 9
 } from '../AbstractKickButton';
@@ -42,11 +41,7 @@ class KickButton extends AbstractKickButton {
42 41
      * @returns {ReactElement}
43 42
      */
44 43
     render() {
45
-        const { participantID, t, visible } = this.props;
46
-
47
-        if (!visible) {
48
-            return null;
49
-        }
44
+        const { participantID, t } = this.props;
50 45
 
51 46
         return (
52 47
             <RemoteVideoMenuButton
@@ -61,22 +56,4 @@ class KickButton extends AbstractKickButton {
61 56
 
62 57
     _handleClick: () => void
63 58
 }
64
-
65
-/**
66
- * Maps (parts of) the redux state to {@link KickButton}'s React {@code Component}
67
- * props.
68
- *
69
- * @param {Object} state - The redux store/state.
70
- * @private
71
- * @returns {Object}
72
- */
73
-function _mapStateToProps(state: Object) {
74
-    const shouldHide = interfaceConfig.HIDE_KICK_BUTTON_FOR_GUESTS && state['features/base/jwt'].isGuest;
75
-
76
-    return {
77
-        visible: !shouldHide
78
-    };
79
-}
80
-
81
-export default translate(connect(_mapStateToProps)(KickButton));
82
-
59
+export default translate(KickButton);

Loading…
取消
儲存