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

89 lines
2.3 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-10-12 03:04:50 +08:00
const openJoinAudio = () => showModal(<Audio />);
export default class ActionsBar extends Component {
constructor(props) {
super(props);
}
handleClick() {
}
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
2016-10-26 05:16:40 +08:00
open={openJoinAudio.bind(this)}
close={() => {exitAudio();}}
2016-10-12 03:04:50 +08:00
/>
2016-10-26 05:16:40 +08:00
2016-05-21 00:17:21 +08:00
<Button
onClick={this.handleClick}
2016-05-21 00:17:21 +08:00
label={'Cam Off'}
color={'primary'}
icon={'video-off'}
size={'lg'}
circle={true}
/>
<EmojiContainer />
2016-05-21 00:17:21 +08:00
</div>
<div className={styles.right}>
</div>
</div>
);
}
renderForUser() {
return (
<div className={styles.actionsbar}>
<div className={styles.center}>
<MuteAudioContainer />
2016-12-06 01:07:25 +08:00
<JoinAudioOptionsContainer
open={openJoinAudio.bind(this)}
close={() => {exitAudio();}}
/>
<Button
onClick={this.handleClick}
label={'Cam Off'}
color={'primary'}
icon={'video-off'}
size={'lg'}
circle={true}
/>
<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();
}
}