bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx

39 lines
1002 B
React
Raw Normal View History

2017-03-15 07:21:55 +08:00
import React, { Component } from 'react';
2016-04-29 03:02:51 +08:00
import { createContainer } from 'meteor/react-meteor-data';
2017-04-19 03:06:51 +08:00
import { withModalMounter } from '/imports/ui/components/modal/service';
import ActionsBar from './component';
import Service from './service';
2017-05-02 03:52:57 +08:00
import AudioService from '../audio/service';
import AudioModal from '../audio/audio-modal/component';
2016-04-29 03:02:51 +08:00
class ActionsBarContainer extends Component {
2016-04-29 03:02:51 +08:00
constructor(props) {
super(props);
}
2017-03-15 07:21:55 +08:00
render() {
2016-04-29 03:02:51 +08:00
return (
<ActionsBar
2017-06-03 03:25:02 +08:00
{...this.props}
>
{this.props.children}
</ActionsBar>
2016-04-29 03:02:51 +08:00
);
}
}
2017-04-19 03:06:51 +08:00
export default withModalMounter(createContainer(({ mountModal }) => {
2017-03-17 07:30:46 +08:00
const isPresenter = Service.isUserPresenter();
2017-04-29 00:15:29 +08:00
const handleExitAudio = () => AudioService.exitAudio();
2017-04-19 03:06:51 +08:00
const handleOpenJoinAudio = () =>
mountModal(<AudioModal handleJoinListenOnly={AudioService.joinListenOnly} />);
2017-03-17 07:30:46 +08:00
return {
isUserPresenter: isPresenter,
2017-06-03 03:25:02 +08:00
handleExitAudio,
handleOpenJoinAudio,
2017-03-17 07:30:46 +08:00
};
2017-04-19 03:06:51 +08:00
}, ActionsBarContainer));