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

115 lines
3.2 KiB
React
Raw Normal View History

import React, { PureComponent } from 'react';
import cx from 'classnames';
2018-01-08 14:17:18 +08:00
import { styles } from './styles.scss';
import DesktopShare from './desktop-share/component';
2016-09-27 05:55:33 +08:00
import ActionsDropdown from './actions-dropdown/component';
2019-02-22 05:01:39 +08:00
import QuickPollDropdown from './quick-poll-dropdown/component';
import AudioControlsContainer from '../audio/audio-controls/container';
2019-11-28 21:13:06 +08:00
import JoinVideoOptionsContainer from '../video-provider/video-button/container';
import CaptionsButtonContainer from '/imports/ui/components/actions-bar/captions/container';
import PresentationOptionsContainer from './presentation-options/component';
2016-12-15 03:55:35 +08:00
class ActionsBar extends PureComponent {
render() {
const {
amIPresenter,
handleShareScreen,
handleUnshareScreen,
isVideoBroadcasting,
amIModerator,
screenSharingCheck,
enableVideo,
isLayoutSwapped,
toggleSwapLayout,
handleTakePresenter,
2019-02-22 05:01:39 +08:00
intl,
currentSlidHasContent,
parseCurrentSlideContent,
isSharingVideo,
screenShareEndAlert,
stopExternalVideoShare,
screenshareDataSavingSetting,
isCaptionsAvailable,
2019-06-27 00:29:34 +08:00
isMeteorConnected,
2019-07-02 22:54:37 +08:00
isPollingEnabled,
isThereCurrentPresentation,
allowExternalVideo,
} = this.props;
const actionBarClasses = {};
actionBarClasses[styles.centerWithActions] = amIPresenter;
actionBarClasses[styles.center] = true;
actionBarClasses[styles.mobileLayoutSwapped] = isLayoutSwapped && amIPresenter;
return (
<div className={styles.actionsbar}>
<div className={styles.left}>
<ActionsDropdown {...{
amIPresenter,
amIModerator,
2019-07-02 22:54:37 +08:00
isPollingEnabled,
allowExternalVideo,
handleTakePresenter,
2019-02-22 05:01:39 +08:00
intl,
isSharingVideo,
stopExternalVideoShare,
2019-06-27 00:29:34 +08:00
isMeteorConnected,
}}
/>
2019-07-02 22:54:37 +08:00
{isPollingEnabled
? (
<QuickPollDropdown
{...{
currentSlidHasContent,
intl,
amIPresenter,
2019-07-02 22:54:37 +08:00
parseCurrentSlideContent,
}}
/>
) : null
}
{isCaptionsAvailable
? (
<CaptionsButtonContainer {...{ intl }} />
)
: null
}
</div>
<div className={cx(actionBarClasses)}>
<AudioControlsContainer />
2018-12-18 23:15:51 +08:00
{enableVideo
? (
2019-12-19 01:44:56 +08:00
<JoinVideoOptionsContainer />
2018-12-18 23:15:51 +08:00
)
: null}
<DesktopShare {...{
2018-12-18 23:15:51 +08:00
handleShareScreen,
handleUnshareScreen,
isVideoBroadcasting,
amIPresenter,
2018-12-18 23:15:51 +08:00
screenSharingCheck,
screenShareEndAlert,
2019-06-27 00:29:34 +08:00
isMeteorConnected,
screenshareDataSavingSetting,
2018-12-18 23:15:51 +08:00
}}
/>
</div>
<div className={styles.right}>
2019-02-22 05:01:39 +08:00
{isLayoutSwapped
? (
<PresentationOptionsContainer
toggleSwapLayout={toggleSwapLayout}
isThereCurrentPresentation={isThereCurrentPresentation}
/>
)
: null
}
</div>
</div>
);
}
}
2017-03-24 23:37:33 +08:00
2017-10-06 20:50:01 +08:00
export default ActionsBar;