|
|
@ -4,7 +4,6 @@ import React from 'react'; |
|
|
|
|
|
|
|
|
|
|
|
import { translate } from '../../../base/i18n'; |
|
|
|
import { translate } from '../../../base/i18n'; |
|
|
|
import { IconKick } from '../../../base/icons'; |
|
|
|
import { IconKick } from '../../../base/icons'; |
|
|
|
import { connect } from '../../../base/redux'; |
|
|
|
|
|
|
|
import AbstractKickButton, { |
|
|
|
import AbstractKickButton, { |
|
|
|
type Props |
|
|
|
type Props |
|
|
|
} from '../AbstractKickButton'; |
|
|
|
} from '../AbstractKickButton'; |
|
|
@ -42,11 +41,7 @@ class KickButton extends AbstractKickButton { |
|
|
|
* @returns {ReactElement} |
|
|
|
* @returns {ReactElement} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { participantID, t, visible } = this.props; |
|
|
|
const { participantID, t } = this.props; |
|
|
|
|
|
|
|
|
|
|
|
if (!visible) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<RemoteVideoMenuButton |
|
|
|
<RemoteVideoMenuButton |
|
|
@ -61,22 +56,4 @@ class KickButton extends AbstractKickButton { |
|
|
|
|
|
|
|
|
|
|
|
_handleClick: () => void |
|
|
|
_handleClick: () => void |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default translate(KickButton); |
|
|
|
/** |
|
|
|
|
|
|
|
* 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)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|