bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/settings/submenus/video/component.jsx

105 lines
3.4 KiB
React
Raw Normal View History

2017-02-16 02:49:40 +08:00
import React, { Component } from 'react';
import BaseMenu from '../base/component';
import styles from '../styles.scss';
2017-04-11 04:27:29 +08:00
import { defineMessages, injectIntl } from 'react-intl';
2017-02-16 02:49:40 +08:00
import Toggle from '/imports/ui/components/switch/component';
import cx from 'classnames';
2017-04-11 04:27:29 +08:00
const intlMessages = defineMessages({
videoSectionTitle: {
id: 'app.submenu.video.title',
description: 'Heading for video submenu section',
},
videoSourceLabel: {
id: 'app.submenu.video.videoSourceLabel',
description: 'Label for video source section',
},
videoOptionLabel: {
id: 'app.submenu.video.videoOptionLabel',
description: 'default video source option label',
},
videoQualityLabel: {
id: 'app.submenu.video.videoQualityLabel',
description: 'Label for video quality section',
},
qualityOptionLabel: {
id: 'app.submenu.video.qualityOptionLabel',
description: 'default quality option label',
},
participantsCamLabel: {
id: 'app.submenu.video.participantsCamLabel',
description: 'Label for participants cam section',
},
});
class VideoMenu extends BaseMenu {
2016-05-06 05:14:39 +08:00
constructor(props) {
super(props);
2017-02-16 02:49:40 +08:00
this.state = {
settingsName: 'video',
settings: props.settings,
2017-02-16 02:49:40 +08:00
};
2016-05-06 05:14:39 +08:00
}
2017-02-16 02:49:40 +08:00
render() {
2017-04-11 04:27:29 +08:00
const { intl } = this.props;
2016-05-06 05:14:39 +08:00
return (
2017-02-16 02:49:40 +08:00
<div className={styles.tabContent}>
<div className={styles.header}>
2017-04-11 04:27:29 +08:00
<h3 className={styles.title}>{intl.formatMessage(intlMessages.videoSectionTitle)}</h3>
</div>
2017-02-16 02:49:40 +08:00
<div className={styles.form}>
<div className={styles.row}>
<div className={styles.col}>
<div className={styles.formElement}>
<label className={cx(styles.label, styles.labelSmall)}>
2017-04-11 04:27:29 +08:00
{intl.formatMessage(intlMessages.videoSourceLabel)}
2017-02-16 02:49:40 +08:00
</label>
<select
defaultValue='-1'
className={styles.select}>
2017-04-11 04:27:29 +08:00
<option value='-1' disabled>{intl.formatMessage(intlMessages.videoOptionLabel)}</option>
2017-02-16 02:49:40 +08:00
</select>
</div>
</div>
<div className={styles.col}>
<div className={styles.formElement}>
<label className={cx(styles.label, styles.labelSmall)}>
2017-04-11 04:27:29 +08:00
{intl.formatMessage(intlMessages.videoQualityLabel)}
2017-02-16 02:49:40 +08:00
</label>
<select
defaultValue='-1'
className={styles.select}>
2017-04-11 04:27:29 +08:00
<option value='-1' disabled>{intl.formatMessage(intlMessages.qualityOptionLabel)}</option>
2017-02-16 02:49:40 +08:00
</select>
</div>
</div>
</div>
<div className={styles.row}>
<div className={styles.col}>
<div className={styles.formElement}>
<label className={styles.label}>
2017-04-11 04:27:29 +08:00
{intl.formatMessage(intlMessages.participantsCamLabel)}
2017-02-16 02:49:40 +08:00
</label>
</div>
</div>
<div className={styles.col}>
<div className={cx(styles.formElement, styles.pullContentRight)}>
<Toggle
icons={false}
defaultChecked={this.state.viewParticipantsWebcams}
onChange={() => this.handleToggle('viewParticipantsWebcams')} />
2017-02-16 02:49:40 +08:00
</div>
</div>
</div>
</div>
</div>
2016-05-06 05:14:39 +08:00
);
}
};
2017-04-11 04:27:29 +08:00
export default injectIntl(VideoMenu);