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

74 lines
2.1 KiB
React
Raw Normal View History

import React, { Component, PropTypes } from 'react';
2016-10-12 03:04:50 +08:00
import { showModal } from '/imports/ui/components/app/service';
import Audio from '/imports/ui/components/audio-modal/component';
2016-10-26 05:16:40 +08:00
import Button from '/imports/ui/components/button/component';
import styles from './styles.scss';
import EmojiContainer from './emoji-menu/container';
2016-09-27 05:55:33 +08:00
import ActionsDropdown from './actions-dropdown/component';
2016-10-26 05:16:40 +08:00
import Auth from '/imports/ui/services/auth/index';
import Users from '/imports/api/users/index';
2016-12-06 01:07:25 +08:00
import JoinAudioOptionsContainer from './audio-menu/container';
import MuteAudioContainer from './mute-button/container';
2016-10-26 05:16:40 +08:00
import { exitAudio } from '/imports/api/phone';
2016-12-15 03:55:35 +08:00
import JoinVideo from './video-button/component';
export default class ActionsBar extends Component {
constructor(props) {
super(props);
}
openJoinAudio() {
return showModal(<Audio handleJoinListenOnly={this.props.handleJoinListenOnly} />)
}
renderForPresenter() {
return (
<div className={styles.actionsbar}>
2016-05-21 00:17:21 +08:00
<div className={styles.left}>
2016-09-27 05:55:33 +08:00
<ActionsDropdown />
2016-05-21 00:17:21 +08:00
</div>
<div className={styles.center}>
<MuteAudioContainer />
2016-12-06 01:07:25 +08:00
<JoinAudioOptionsContainer
open={this.openJoinAudio.bind(this)}
close={() => {exitAudio();}}
2016-10-12 03:04:50 +08:00
/>
{/*<JoinVideo />*/}
<EmojiContainer />
2016-05-21 00:17:21 +08:00
</div>
<div className={styles.right} style={{visibility: 'hidden'}}>
<ActionsDropdown />
2016-05-21 00:17:21 +08:00
</div>
</div>
);
}
renderForUser() {
return (
<div className={styles.actionsbar}>
<div className={styles.center}>
<MuteAudioContainer />
2016-12-06 01:07:25 +08:00
<JoinAudioOptionsContainer
open={this.openJoinAudio.bind(this)}
close={() => {exitAudio();}}
/>
{/*<JoinVideo />*/}
<EmojiContainer />
</div>
<div className={styles.right}>
</div>
</div>
);
}
render() {
2016-11-15 10:48:56 +08:00
const { isUserPresenter } = this.props;
2016-12-06 04:41:24 +08:00
return isUserPresenter ?
this.renderForPresenter() :
this.renderForUser();
}
}