import React from 'react'; import { defineMessages, injectIntl } from 'react-intl'; import Toggle from '/imports/ui/components/switch/component'; import cx from 'classnames'; import Modal from '/imports/ui/components/modal/simple/component'; import NoteService from '/imports/ui/components/note/service'; 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', }, notesLabel: { id: 'app.lock-viewers.notesLabel', description: 'description for close button', }, ariaModalTitle: { id: 'app.lock-viewers.ariaTitle', description: 'aria label for modal title', }, }); class LockViewersComponent extends React.PureComponent { render() { const { intl, meeting, closeModal, toggleLockSettings, toggleWebcamsOnlyForModerator, } = this.props; return (

{intl.formatMessage(intlMessages.lockViewersTitle)}

{`${intl.formatMessage(intlMessages.lockViewersDescription)}`}
{intl.formatMessage(intlMessages.featuresLable)}
{intl.formatMessage(intlMessages.lockStatusLabel)}
{ meeting.lockSettingsProps.disableCam = !meeting.lockSettingsProps.disableCam; toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.webcamLabel)} />
{ meeting.usersProp.webcamsOnlyForModerator = !meeting.usersProp.webcamsOnlyForModerator; toggleWebcamsOnlyForModerator(meeting); }} ariaLabel={intl.formatMessage(intlMessages.otherViewersWebcamLabel)} />
{ meeting.lockSettingsProps.disableMic = !meeting.lockSettingsProps.disableMic; toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.microphoneLable)} />
{ meeting.lockSettingsProps.disablePublicChat = !meeting.lockSettingsProps.disablePublicChat; toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.publicChatLabel)} />
{ meeting.lockSettingsProps.disablePrivateChat = !meeting.lockSettingsProps.disablePrivateChat; toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.privateChatLable)} />
{ NoteService.isEnabled() ? (
{ meeting.lockSettingsProps.disableNote = !meeting.lockSettingsProps.disableNote; toggleLockSettings(meeting); }} ariaLabel={intl.formatMessage(intlMessages.notesLabel)} />
) : null }
); } } export default injectIntl(LockViewersComponent);