From 4b8aae90e0c74c12241f50ebf8875e5c17388d90 Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 5 Nov 2020 12:18:16 -0600 Subject: [PATCH] feat: Drop HIDE_KICK_BUTTON_FOR_GUESTS setting. The main config contains disableRemoteMute and remoteVideoMenu: { disableKick: true} options, which can be used. --- interface_config.js | 5 ---- .../components/web/KickButton.js | 27 ++----------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/interface_config.js b/interface_config.js index 52e05aed0..d9c327171 100644 --- a/interface_config.js +++ b/interface_config.js @@ -239,11 +239,6 @@ var interfaceConfig = { */ VIDEO_QUALITY_LABEL_DISABLED: false, - /** - * When enabled, the kick participant button will not be presented for users without a JWT - */ - // HIDE_KICK_BUTTON_FOR_GUESTS: false, - /** * How many columns the tile view can expand to. The respected range is * between 1 and 5. diff --git a/react/features/remote-video-menu/components/web/KickButton.js b/react/features/remote-video-menu/components/web/KickButton.js index eeae2d6ec..c089c36c6 100644 --- a/react/features/remote-video-menu/components/web/KickButton.js +++ b/react/features/remote-video-menu/components/web/KickButton.js @@ -4,7 +4,6 @@ import React from 'react'; import { translate } from '../../../base/i18n'; import { IconKick } from '../../../base/icons'; -import { connect } from '../../../base/redux'; import AbstractKickButton, { type Props } from '../AbstractKickButton'; @@ -42,11 +41,7 @@ class KickButton extends AbstractKickButton { * @returns {ReactElement} */ render() { - const { participantID, t, visible } = this.props; - - if (!visible) { - return null; - } + const { participantID, t } = this.props; return ( void } - -/** - * Maps (parts of) the redux state to {@link KickButton}'s React {@code Component} - * props. - * - * @param {Object} state - The redux store/state. - * @private - * @returns {Object} - */ -function _mapStateToProps(state: Object) { - const shouldHide = interfaceConfig.HIDE_KICK_BUTTON_FOR_GUESTS && state['features/base/jwt'].isGuest; - - return { - visible: !shouldHide - }; -} - -export default translate(connect(_mapStateToProps)(KickButton)); - +export default translate(KickButton);