2021-02-24 21:45:07 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
2022-08-03 11:24:44 +00:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
|
|
import { connect } from '../../../base/redux/functions';
|
2022-10-10 09:12:02 +00:00
|
|
|
import Dialog from '../../../base/ui/components/web/Dialog';
|
2022-08-03 11:24:44 +00:00
|
|
|
import Switch from '../../../base/ui/components/web/Switch';
|
2022-09-27 07:10:28 +00:00
|
|
|
import AbstractMuteEveryonesVideoDialog, { type Props, abstractMapStateToProps }
|
2021-02-24 21:45:07 +00:00
|
|
|
from '../AbstractMuteEveryonesVideoDialog';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A React Component with the contents for a dialog that asks for confirmation
|
|
|
|
* from the user before disabling all remote participants cameras.
|
|
|
|
*
|
2021-11-04 21:10:43 +00:00
|
|
|
* @augments AbstractMuteEveryonesVideoDialog
|
2021-02-24 21:45:07 +00:00
|
|
|
*/
|
|
|
|
class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
|
2021-09-10 11:05:16 +00:00
|
|
|
|
2021-02-24 21:45:07 +00:00
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Dialog
|
2022-10-10 09:12:02 +00:00
|
|
|
ok = {{ translationKey: 'dialog.muteParticipantsVideoButton' }}
|
2021-02-24 21:45:07 +00:00
|
|
|
onSubmit = { this._onSubmit }
|
2022-10-10 09:12:02 +00:00
|
|
|
title = { this.props.title }>
|
2021-09-10 11:05:16 +00:00
|
|
|
<div className = 'mute-dialog'>
|
|
|
|
{this.state.content}
|
2021-10-01 13:47:13 +00:00
|
|
|
{ this.props.isModerationSupported && this.props.exclude.length === 0 && (
|
2021-09-10 11:05:16 +00:00
|
|
|
<>
|
|
|
|
<div className = 'separator-line' />
|
|
|
|
<div className = 'control-row'>
|
|
|
|
<label htmlFor = 'moderation-switch'>
|
|
|
|
{this.props.t('dialog.moderationVideoLabel')}
|
|
|
|
</label>
|
|
|
|
<Switch
|
2022-08-03 11:24:44 +00:00
|
|
|
checked = { !this.state.moderationEnabled }
|
2021-09-10 11:05:16 +00:00
|
|
|
id = 'moderation-switch'
|
2022-08-03 11:24:44 +00:00
|
|
|
onChange = { this._onToggleModeration } />
|
2021-09-10 11:05:16 +00:00
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
)}
|
2021-02-24 21:45:07 +00:00
|
|
|
</div>
|
|
|
|
</Dialog>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(connect(abstractMapStateToProps)(MuteEveryonesVideoDialog));
|