|
@@ -12,6 +12,8 @@ import AbstractKickButton, {
|
12
|
12
|
|
13
|
13
|
import RemoteVideoMenuButton from './RemoteVideoMenuButton';
|
14
|
14
|
|
|
15
|
+declare var interfaceConfig: Object;
|
|
16
|
+
|
15
|
17
|
/**
|
16
|
18
|
* Implements a React {@link Component} which displays a button for kicking out
|
17
|
19
|
* a participant from the conference.
|
|
@@ -41,7 +43,11 @@ class KickButton extends AbstractKickButton {
|
41
|
43
|
* @returns {ReactElement}
|
42
|
44
|
*/
|
43
|
45
|
render() {
|
44
|
|
- const { participantID, t } = this.props;
|
|
46
|
+ const { participantID, t, visible } = this.props;
|
|
47
|
+
|
|
48
|
+ if (!visible) {
|
|
49
|
+ return null;
|
|
50
|
+ }
|
45
|
51
|
|
46
|
52
|
return (
|
47
|
53
|
<RemoteVideoMenuButton
|
|
@@ -57,4 +63,21 @@ class KickButton extends AbstractKickButton {
|
57
|
63
|
_handleClick: () => void
|
58
|
64
|
}
|
59
|
65
|
|
60
|
|
-export default translate(connect()(KickButton));
|
|
66
|
+/**
|
|
67
|
+ * Maps (parts of) the redux state to {@link KickButton}'s React {@code Component}
|
|
68
|
+ * props.
|
|
69
|
+ *
|
|
70
|
+ * @param {Object} state - The redux store/state.
|
|
71
|
+ * @private
|
|
72
|
+ * @returns {Object}
|
|
73
|
+ */
|
|
74
|
+function _mapStateToProps(state: Object) {
|
|
75
|
+ const shouldHide = interfaceConfig.HIDE_KICK_BUTTON_FOR_GUESTS && state['features/base/jwt'].isGuest;
|
|
76
|
+
|
|
77
|
+ return {
|
|
78
|
+ visible: !shouldHide
|
|
79
|
+ };
|
|
80
|
+}
|
|
81
|
+
|
|
82
|
+export default translate(connect(_mapStateToProps)(KickButton));
|
|
83
|
+
|