You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MuteEveryonesVideoDialog.tsx 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import React from 'react';
  2. import { translate } from '../../../base/i18n/functions';
  3. import { connect } from '../../../base/redux/functions';
  4. import Dialog from '../../../base/ui/components/web/Dialog';
  5. import Switch from '../../../base/ui/components/web/Switch';
  6. import AbstractMuteEveryonesVideoDialog, { type Props, abstractMapStateToProps }
  7. from '../AbstractMuteEveryonesVideoDialog';
  8. /**
  9. * A React Component with the contents for a dialog that asks for confirmation
  10. * from the user before disabling all remote participants cameras.
  11. *
  12. * @augments AbstractMuteEveryonesVideoDialog
  13. */
  14. class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
  15. /**
  16. * Implements React's {@link Component#render()}.
  17. *
  18. * @inheritdoc
  19. * @returns {ReactElement}
  20. */
  21. render() {
  22. return (
  23. <Dialog
  24. ok = {{ translationKey: 'dialog.muteParticipantsVideoButton' }}
  25. onSubmit = { this._onSubmit }
  26. title = { this.props.title }>
  27. <div className = 'mute-dialog'>
  28. {this.state.content}
  29. { this.props.isModerationSupported && this.props.exclude.length === 0 && (
  30. <>
  31. <div className = 'separator-line' />
  32. <div className = 'control-row'>
  33. <label htmlFor = 'moderation-switch'>
  34. {this.props.t('dialog.moderationVideoLabel')}
  35. </label>
  36. <Switch
  37. checked = { !this.state.moderationEnabled }
  38. id = 'moderation-switch'
  39. onChange = { this._onToggleModeration } />
  40. </div>
  41. </>
  42. )}
  43. </div>
  44. </Dialog>
  45. );
  46. }
  47. }
  48. export default translate(connect(abstractMapStateToProps)(MuteEveryonesVideoDialog));