import React, { Component } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; import Button from '/imports/ui/components/button/component'; import Toggle from '/imports/ui/components/switch/component'; import cx from 'classnames'; import ModalBase from '/imports/ui/components/modal/base/component'; import { styles } from './styles'; const intlMessages = defineMessages({ lockViewersTitle: { id: 'app.lock-viewers.title', description: 'lock-viewers title', }, closeLabel: { id: 'app.shortcut-help.closeLabel', description: 'label for close button', }, closeDesc: { id: 'app.shortcut-help.closeDesc', description: 'description for close button', }, lockViewersDescription: { id: 'app.lock-viewers.description', description: 'description for lock viewers feature', }, featuresLable: { id: 'app.lock-viewers.featuresLable', description: 'features label', }, lockStatusLabel: { id: 'app.lock-viewers.lockStatusLabel', description: 'description for close button', }, webcamLabel: { id: 'app.lock-viewers.webcamLabel', description: 'description for close button', }, otherViewersWebcamLabel: { id: 'app.lock-viewers.otherViewersWebcamLabel', description: 'description for close button', }, microphoneLable: { id: 'app.lock-viewers.microphoneLable', description: 'description for close button', }, publicChatLabel: { id: 'app.lock-viewers.PublicChatLabel', description: 'description for close button', }, privateChatLable: { id: 'app.lock-viewers.PrivateChatLable', description: 'description for close button', }, layoutLable: { id: 'app.lock-viewers.Layout', description: 'description for close button', }, }); class LockViewersComponent extends Component { constructor(props) { super(props); const { closeModal, toggleLockSettings, toggleWebcamsOnlyForModerator, } = props; this.closeModal = closeModal; this.toggleLockSettings = toggleLockSettings; this.toggleWebcamsOnlyForModerator = toggleWebcamsOnlyForModerator; } render() { const { intl, meeting } = this.props; return (
{intl.formatMessage(intlMessages.lockViewersTitle)}
{`${intl.formatMessage(intlMessages.lockViewersDescription)}`}
{intl.formatMessage(intlMessages.featuresLable)}
{intl.formatMessage(intlMessages.lockStatusLabel)}
{ meeting.lockSettingsProp.disableCam = !meeting.lockSettingsProp.disableCam; this.toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.webcamLabel)} />
{ meeting.usersProp.webcamsOnlyForModerator = !meeting.usersProp.webcamsOnlyForModerator; this.toggleWebcamsOnlyForModerator(meeting); }} ariaLabel={intl.formatMessage(intlMessages.otherViewersWebcamLabel)} />
{ meeting.lockSettingsProp.disableMic = !meeting.lockSettingsProp.disableMic; this.toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.microphoneLable)} />
{ meeting.lockSettingsProp.disablePubChat = !meeting.lockSettingsProp.disablePubChat; this.toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.publicChatLabel)} />
{ meeting.lockSettingsProp.disablePrivChat = !meeting.lockSettingsProp.disablePrivChat; this.toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.privateChatLable)} />
{ meeting.lockSettingsProp.lockedLayout = !meeting.lockSettingsProp.lockedLayout; this.toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.layoutLable)} />
); } } export default injectIntl(LockViewersComponent);