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

38 lines
1.0 KiB
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-03-14 00:05:54 +08:00
{...this.props}>
2017-03-15 06:34:57 +08:00
{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
2017-05-02 03:52:57 +08:00
const handleExitAudio = () => AudioService.handleExitAudio();
2017-04-19 03:06:51 +08:00
const handleOpenJoinAudio = () =>
2017-05-02 03:52:57 +08:00
mountModal(<AudioModal handleJoinListenOnly={AudioService.handleJoinAudio} />);
2017-03-17 07:30:46 +08:00
return {
isUserPresenter: isPresenter,
handleExitAudio: handleExitAudio,
handleOpenJoinAudio: handleOpenJoinAudio,
};
2017-04-19 03:06:51 +08:00
}, ActionsBarContainer));