Raise hand first step (no signalling yet)

This commit is contained in:
Stefan Otto
2018-03-16 11:20:48 +01:00
parent 886d77216a
commit edd10bf034
7 changed files with 112 additions and 0 deletions
+19
View File
@@ -23,6 +23,7 @@ class Room extends React.Component
onRoomLinkCopy,
onSetAudioMode,
onRestartIce,
onToggleHand,
onLeaveMeeting
} = this.props;
@@ -98,6 +99,16 @@ class Room extends React.Component
onClick={() => onRestartIce()}
/>
<div
className={classnames('button', 'raise-hand', {
on : me.raiseHand,
disabled : me.raiseHandInProgress
})}
data-tip='Raise hand'
data-type='dark'
onClick={() => onToggleHand(!me.raiseHand)}
/>
<div
className={classnames('button', 'leave-meeting')}
data-tip='Leave meeting'
@@ -125,6 +136,7 @@ Room.propTypes =
onRoomLinkCopy : PropTypes.func.isRequired,
onSetAudioMode : PropTypes.func.isRequired,
onRestartIce : PropTypes.func.isRequired,
onToggleHand : PropTypes.func.isRequired,
onLeaveMeeting : PropTypes.func.isRequired
};
@@ -158,6 +170,13 @@ const mapDispatchToProps = (dispatch) =>
{
dispatch(requestActions.restartIce());
},
onToggleHand : (enable) =>
{
if (enable)
dispatch(requestActions.raiseHand());
else
dispatch(requestActions.lowerHand());
},
onLeaveMeeting : () =>
{
dispatch(requestActions.leaveRoom());