2019-09-10 21:43:06 +08:00
|
|
|
import React, { Fragment, Component } from 'react';
|
2018-11-09 02:55:12 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
2019-09-09 22:21:54 +08:00
|
|
|
import PropTypes from 'prop-types';
|
2022-02-15 23:58:28 +08:00
|
|
|
import Toggle from '/imports/ui/components/common/switch/component';
|
2021-10-29 21:41:24 +08:00
|
|
|
import Styled from './styles';
|
2019-09-09 22:21:54 +08:00
|
|
|
|
2018-11-09 02:55:12 +08:00
|
|
|
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',
|
2019-08-10 07:45:26 +08:00
|
|
|
description: 'label for webcam toggle',
|
2018-11-09 02:55:12 +08:00
|
|
|
},
|
|
|
|
otherViewersWebcamLabel: {
|
|
|
|
id: 'app.lock-viewers.otherViewersWebcamLabel',
|
2019-08-10 07:45:26 +08:00
|
|
|
description: 'label for other viewers webcam toggle',
|
2018-11-09 02:55:12 +08:00
|
|
|
},
|
|
|
|
microphoneLable: {
|
|
|
|
id: 'app.lock-viewers.microphoneLable',
|
2019-08-10 07:45:26 +08:00
|
|
|
description: 'label for microphone toggle',
|
2018-11-09 02:55:12 +08:00
|
|
|
},
|
|
|
|
publicChatLabel: {
|
|
|
|
id: 'app.lock-viewers.PublicChatLabel',
|
2019-08-10 07:45:26 +08:00
|
|
|
description: 'label for public chat toggle',
|
2018-11-09 02:55:12 +08:00
|
|
|
},
|
|
|
|
privateChatLable: {
|
|
|
|
id: 'app.lock-viewers.PrivateChatLable',
|
2019-08-10 07:45:26 +08:00
|
|
|
description: 'label for private chat toggle',
|
2018-11-09 02:55:12 +08:00
|
|
|
},
|
2019-03-29 02:47:11 +08:00
|
|
|
notesLabel: {
|
|
|
|
id: 'app.lock-viewers.notesLabel',
|
2019-08-10 07:45:26 +08:00
|
|
|
description: 'label for shared notes toggle',
|
|
|
|
},
|
|
|
|
userListLabel: {
|
|
|
|
id: 'app.lock-viewers.userListLabel',
|
|
|
|
description: 'label for user list toggle',
|
2019-03-29 02:47:11 +08:00
|
|
|
},
|
2019-05-08 21:16:00 +08:00
|
|
|
ariaModalTitle: {
|
2019-05-08 22:08:47 +08:00
|
|
|
id: 'app.lock-viewers.ariaTitle',
|
2019-05-08 21:16:00 +08:00
|
|
|
description: 'aria label for modal title',
|
|
|
|
},
|
2019-09-09 22:21:54 +08:00
|
|
|
buttonApply: {
|
|
|
|
id: 'app.lock-viewers.button.apply',
|
|
|
|
description: 'label for apply button',
|
|
|
|
},
|
|
|
|
buttonCancel: {
|
|
|
|
id: 'app.lock-viewers.button.cancel',
|
|
|
|
description: 'label for cancel button',
|
|
|
|
},
|
2019-09-10 21:43:06 +08:00
|
|
|
lockedLabel: {
|
|
|
|
id: 'app.lock-viewers.locked',
|
|
|
|
description: 'locked element label',
|
|
|
|
},
|
2022-03-22 11:10:47 +08:00
|
|
|
hideCursorsLabel: {
|
|
|
|
id: "app.lock-viewers.hideViewersCursor",
|
|
|
|
description: 'label for other viewers cursor',
|
2022-12-13 07:26:03 +08:00
|
|
|
},
|
|
|
|
hideAnnotationsLabel: {
|
|
|
|
id: "app.lock-viewers.hideAnnotationsLabel",
|
|
|
|
description: 'label for other viewers annotation',
|
2022-03-22 11:10:47 +08:00
|
|
|
}
|
2018-11-09 02:55:12 +08:00
|
|
|
});
|
|
|
|
|
2019-09-09 22:21:54 +08:00
|
|
|
const propTypes = {
|
|
|
|
closeModal: PropTypes.func.isRequired,
|
|
|
|
intl: PropTypes.shape({
|
|
|
|
formatMessage: PropTypes.func.isRequired,
|
|
|
|
}).isRequired,
|
|
|
|
meeting: PropTypes.object.isRequired,
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel: PropTypes.bool.isRequired,
|
2019-09-09 22:21:54 +08:00
|
|
|
updateLockSettings: PropTypes.func.isRequired,
|
|
|
|
updateWebcamsOnlyForModerator: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
2019-09-10 21:43:06 +08:00
|
|
|
class LockViewersComponent extends Component {
|
2019-09-09 22:21:54 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
|
2024-03-26 19:57:28 +08:00
|
|
|
const { meeting: { lockSettings, usersPolicies } } = this.props;
|
2019-09-09 22:21:54 +08:00
|
|
|
|
|
|
|
this.state = {
|
2024-03-26 19:57:28 +08:00
|
|
|
lockSettingsProps: lockSettings,
|
|
|
|
usersProp: usersPolicies,
|
2019-09-09 22:21:54 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
toggleLockSettings(property) {
|
|
|
|
const { lockSettingsProps } = this.state;
|
|
|
|
|
|
|
|
lockSettingsProps[property] = !lockSettingsProps[property];
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
lockSettingsProps,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
toggleUserProps(property) {
|
|
|
|
const { usersProp } = this.state;
|
|
|
|
|
|
|
|
usersProp[property] = !usersProp[property];
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
usersProp,
|
|
|
|
});
|
|
|
|
}
|
2019-07-18 05:00:33 +08:00
|
|
|
|
2019-09-10 21:43:06 +08:00
|
|
|
displayLockStatus(status) {
|
|
|
|
const { intl } = this.props;
|
|
|
|
return (
|
2022-03-23 08:12:38 +08:00
|
|
|
status && <Styled.ToggleLabel>
|
|
|
|
{intl.formatMessage(intlMessages.lockedLabel)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.ToggleLabel>
|
2019-09-10 21:43:06 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-09-02 03:38:33 +08:00
|
|
|
componentWillUnmount() {
|
|
|
|
const { closeModal } = this.props;
|
|
|
|
|
|
|
|
closeModal();
|
|
|
|
}
|
|
|
|
|
2019-01-18 00:33:43 +08:00
|
|
|
render() {
|
2018-11-09 02:55:12 +08:00
|
|
|
const {
|
|
|
|
closeModal,
|
2019-09-10 21:43:06 +08:00
|
|
|
intl,
|
|
|
|
showToggleLabel,
|
2019-09-09 22:21:54 +08:00
|
|
|
updateLockSettings,
|
|
|
|
updateWebcamsOnlyForModerator,
|
2023-04-12 23:51:23 +08:00
|
|
|
isOpen,
|
|
|
|
onRequestClose,
|
|
|
|
priority,
|
2024-06-14 21:30:48 +08:00
|
|
|
isChatEnabled,
|
|
|
|
isSharedNotesEnabled,
|
2019-01-18 00:33:43 +08:00
|
|
|
} = this.props;
|
2018-11-09 02:55:12 +08:00
|
|
|
|
2019-09-09 22:21:54 +08:00
|
|
|
const { lockSettingsProps, usersProp } = this.state;
|
|
|
|
|
2019-10-05 05:45:09 +08:00
|
|
|
const invertColors = true;
|
|
|
|
|
2018-11-09 02:55:12 +08:00
|
|
|
return (
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.LockViewersModal
|
2019-01-18 00:33:43 +08:00
|
|
|
onRequestClose={closeModal}
|
2019-05-08 21:16:00 +08:00
|
|
|
contentLabel={intl.formatMessage(intlMessages.ariaModalTitle)}
|
2022-11-11 02:09:21 +08:00
|
|
|
title={intl.formatMessage(intlMessages.lockViewersTitle)}
|
2023-04-12 23:51:23 +08:00
|
|
|
{...{
|
|
|
|
isOpen,
|
|
|
|
onRequestClose,
|
|
|
|
priority,
|
|
|
|
}}
|
2018-11-09 02:55:12 +08:00
|
|
|
>
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Container>
|
|
|
|
<Styled.Description>
|
2018-11-09 02:55:12 +08:00
|
|
|
{`${intl.formatMessage(intlMessages.lockViewersDescription)}`}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Description>
|
2018-11-15 02:04:23 +08:00
|
|
|
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Form>
|
|
|
|
<Styled.SubHeader>
|
|
|
|
<Styled.Bold>{intl.formatMessage(intlMessages.featuresLable)}</Styled.Bold>
|
|
|
|
<Styled.Bold>{intl.formatMessage(intlMessages.lockStatusLabel)}</Styled.Bold>
|
|
|
|
</Styled.SubHeader>
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockShareWebcamItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2018-11-09 02:55:12 +08:00
|
|
|
{intl.formatMessage(intlMessages.webcamLabel)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2019-09-10 21:43:06 +08:00
|
|
|
{this.displayLockStatus(lockSettingsProps.disableCam)}
|
2018-11-09 02:55:12 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2019-09-09 22:21:54 +08:00
|
|
|
defaultChecked={lockSettingsProps.disableCam}
|
2018-11-09 02:55:12 +08:00
|
|
|
onChange={() => {
|
2019-09-09 22:21:54 +08:00
|
|
|
this.toggleLockSettings('disableCam');
|
2018-11-10 06:03:25 +08:00
|
|
|
}}
|
2018-11-09 02:55:12 +08:00
|
|
|
ariaLabel={intl.formatMessage(intlMessages.webcamLabel)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockShareWebcam"
|
2018-11-09 02:55:12 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockSeeOtherViewersWebcamItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2018-11-09 02:55:12 +08:00
|
|
|
{intl.formatMessage(intlMessages.otherViewersWebcamLabel)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2019-09-10 21:43:06 +08:00
|
|
|
{this.displayLockStatus(usersProp.webcamsOnlyForModerator)}
|
2018-11-09 02:55:12 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2019-09-09 22:21:54 +08:00
|
|
|
defaultChecked={usersProp.webcamsOnlyForModerator}
|
2018-11-09 02:55:12 +08:00
|
|
|
onChange={() => {
|
2019-09-09 22:21:54 +08:00
|
|
|
this.toggleUserProps('webcamsOnlyForModerator');
|
2018-11-10 06:03:25 +08:00
|
|
|
}}
|
2018-11-09 02:55:12 +08:00
|
|
|
ariaLabel={intl.formatMessage(intlMessages.otherViewersWebcamLabel)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockSeeOtherViewersWebcam"
|
2018-11-09 02:55:12 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockShareMicrophoneItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2018-11-09 02:55:12 +08:00
|
|
|
{intl.formatMessage(intlMessages.microphoneLable)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2019-09-10 21:43:06 +08:00
|
|
|
{this.displayLockStatus(lockSettingsProps.disableMic)}
|
2018-11-09 02:55:12 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2019-09-09 22:21:54 +08:00
|
|
|
defaultChecked={lockSettingsProps.disableMic}
|
2018-11-09 02:55:12 +08:00
|
|
|
onChange={() => {
|
2019-09-09 22:21:54 +08:00
|
|
|
this.toggleLockSettings('disableMic');
|
2018-11-10 06:03:25 +08:00
|
|
|
}}
|
2018-11-09 02:55:12 +08:00
|
|
|
ariaLabel={intl.formatMessage(intlMessages.microphoneLable)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockShareMicrophone"
|
2018-11-09 02:55:12 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2019-07-18 05:00:33 +08:00
|
|
|
|
2024-06-14 21:30:48 +08:00
|
|
|
{isChatEnabled ? (
|
2019-07-18 05:00:33 +08:00
|
|
|
<Fragment>
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockPublicChatItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2019-07-18 05:00:33 +08:00
|
|
|
{intl.formatMessage(intlMessages.publicChatLabel)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2019-09-10 21:43:06 +08:00
|
|
|
{this.displayLockStatus(lockSettingsProps.disablePublicChat)}
|
2019-07-18 05:00:33 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2019-09-09 22:21:54 +08:00
|
|
|
defaultChecked={lockSettingsProps.disablePublicChat}
|
2019-07-18 05:00:33 +08:00
|
|
|
onChange={() => {
|
2019-09-09 22:21:54 +08:00
|
|
|
this.toggleLockSettings('disablePublicChat');
|
2019-07-18 05:00:33 +08:00
|
|
|
}}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.publicChatLabel)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockPublicChat"
|
2019-07-18 05:00:33 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockPrivateChatItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2019-07-18 05:00:33 +08:00
|
|
|
{intl.formatMessage(intlMessages.privateChatLable)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2019-09-10 21:43:06 +08:00
|
|
|
{this.displayLockStatus(lockSettingsProps.disablePrivateChat)}
|
2019-07-18 05:00:33 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2019-09-09 22:21:54 +08:00
|
|
|
defaultChecked={lockSettingsProps.disablePrivateChat}
|
2019-07-18 05:00:33 +08:00
|
|
|
onChange={() => {
|
2019-09-09 22:21:54 +08:00
|
|
|
this.toggleLockSettings('disablePrivateChat');
|
2019-07-18 05:00:33 +08:00
|
|
|
}}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.privateChatLable)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockPrivateChat"
|
2019-07-18 05:00:33 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2019-07-18 05:00:33 +08:00
|
|
|
</Fragment>
|
|
|
|
) : null
|
|
|
|
}
|
2024-06-14 21:30:48 +08:00
|
|
|
{isSharedNotesEnabled
|
2019-07-18 05:00:33 +08:00
|
|
|
? (
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockEditSharedNotesItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2019-07-18 05:00:33 +08:00
|
|
|
{intl.formatMessage(intlMessages.notesLabel)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2021-10-16 03:07:13 +08:00
|
|
|
{this.displayLockStatus(lockSettingsProps.disableNotes)}
|
2019-07-18 05:00:33 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2021-10-16 03:07:13 +08:00
|
|
|
defaultChecked={lockSettingsProps.disableNotes}
|
2019-07-18 05:00:33 +08:00
|
|
|
onChange={() => {
|
2021-10-16 03:07:13 +08:00
|
|
|
this.toggleLockSettings('disableNotes');
|
2019-07-18 05:00:33 +08:00
|
|
|
}}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.notesLabel)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockEditSharedNotes"
|
2019-07-18 05:00:33 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2019-07-18 05:00:33 +08:00
|
|
|
)
|
2019-03-29 02:47:11 +08:00
|
|
|
: null
|
|
|
|
}
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="lockUserListItem">
|
2021-10-29 21:41:24 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2019-08-10 07:45:26 +08:00
|
|
|
{intl.formatMessage(intlMessages.userListLabel)}
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2019-09-10 21:43:06 +08:00
|
|
|
{this.displayLockStatus(lockSettingsProps.hideUserList)}
|
2019-08-10 07:45:26 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
2019-09-09 22:21:54 +08:00
|
|
|
defaultChecked={lockSettingsProps.hideUserList}
|
2019-08-10 07:45:26 +08:00
|
|
|
onChange={() => {
|
2019-09-09 22:21:54 +08:00
|
|
|
this.toggleLockSettings('hideUserList');
|
2019-08-10 07:45:26 +08:00
|
|
|
}}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.userListLabel)}
|
2019-09-10 21:43:06 +08:00
|
|
|
showToggleLabel={showToggleLabel}
|
2019-10-05 05:45:09 +08:00
|
|
|
invertColors={invertColors}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="lockUserList"
|
2019-08-10 07:45:26 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2022-03-22 11:10:47 +08:00
|
|
|
|
2022-08-23 05:02:31 +08:00
|
|
|
<Styled.Row data-test="hideViewersCursorItem">
|
2022-03-22 11:10:47 +08:00
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
|
|
|
{intl.formatMessage(intlMessages.hideCursorsLabel)}
|
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
|
|
|
{this.displayLockStatus(lockSettingsProps.hideViewersCursor)}
|
|
|
|
<Toggle
|
|
|
|
icons={false}
|
|
|
|
defaultChecked={lockSettingsProps.hideViewersCursor}
|
|
|
|
onChange={() => {
|
|
|
|
this.toggleLockSettings('hideViewersCursor');
|
|
|
|
}}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.hideCursorsLabel)}
|
|
|
|
showToggleLabel={showToggleLabel}
|
|
|
|
invertColors={invertColors}
|
|
|
|
data-test="hideViewersCursor"
|
|
|
|
/>
|
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2022-12-13 07:26:03 +08:00
|
|
|
|
|
|
|
<Styled.Row data-test="hideViewersAnnotation">
|
|
|
|
<Styled.Col aria-hidden="true">
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
|
|
|
{intl.formatMessage(intlMessages.hideAnnotationsLabel)}
|
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
|
|
|
{this.displayLockStatus(lockSettingsProps.hideViewersAnnotation)}
|
|
|
|
<Toggle
|
|
|
|
icons={false}
|
|
|
|
defaultChecked={lockSettingsProps.hideViewersAnnotation}
|
|
|
|
onChange={() => {
|
|
|
|
this.toggleLockSettings('hideViewersAnnotation');
|
|
|
|
}}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.hideAnnotationsLabel)}
|
|
|
|
showToggleLabel={showToggleLabel}
|
|
|
|
invertColors={invertColors}
|
|
|
|
data-test="hideViewersAnnotation"
|
|
|
|
/>
|
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Form>
|
|
|
|
</Styled.Container>
|
|
|
|
<Styled.Footer>
|
|
|
|
<Styled.Actions>
|
2022-02-09 23:52:42 +08:00
|
|
|
<Styled.ButtonCancel
|
2019-09-09 22:21:54 +08:00
|
|
|
label={intl.formatMessage(intlMessages.buttonCancel)}
|
|
|
|
onClick={closeModal}
|
2022-06-23 03:47:12 +08:00
|
|
|
color="secondary"
|
2019-09-09 22:21:54 +08:00
|
|
|
/>
|
2022-02-09 23:52:42 +08:00
|
|
|
<Styled.ButtonApply
|
2019-09-09 22:21:54 +08:00
|
|
|
color="primary"
|
|
|
|
label={intl.formatMessage(intlMessages.buttonApply)}
|
|
|
|
onClick={() => {
|
|
|
|
updateLockSettings(lockSettingsProps);
|
|
|
|
updateWebcamsOnlyForModerator(usersProp.webcamsOnlyForModerator);
|
|
|
|
closeModal();
|
|
|
|
}}
|
2022-01-29 03:52:22 +08:00
|
|
|
data-test="applyLockSettings"
|
2019-09-09 22:21:54 +08:00
|
|
|
/>
|
2021-10-29 21:41:24 +08:00
|
|
|
</Styled.Actions>
|
|
|
|
</Styled.Footer>
|
|
|
|
</Styled.LockViewersModal>
|
2018-11-09 02:55:12 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-09 22:21:54 +08:00
|
|
|
LockViewersComponent.propTypes = propTypes;
|
|
|
|
|
2018-11-09 02:55:12 +08:00
|
|
|
export default injectIntl(LockViewersComponent);
|