Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

MuteEveryoneDialog.js 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import React from 'react';
  2. import Dialog from 'react-native-dialog';
  3. import { Divider } from 'react-native-paper';
  4. import { ConfirmDialog } from '../../../base/dialog';
  5. import { translate } from '../../../base/i18n';
  6. import { connect } from '../../../base/redux';
  7. import AbstractMuteEveryoneDialog, {
  8. type Props,
  9. abstractMapStateToProps as _mapStateToProps } from '../AbstractMuteEveryoneDialog';
  10. import styles from './styles';
  11. /**
  12. * A React Component with the contents for a dialog that asks for confirmation
  13. * from the user before muting all remote participants.
  14. *
  15. * @augments AbstractMuteEveryoneDialog
  16. */
  17. class MuteEveryoneDialog extends AbstractMuteEveryoneDialog<Props> {
  18. /**
  19. * Renders the dialog switch.
  20. *
  21. * @returns {React$Component}
  22. */
  23. _renderSwitch() {
  24. return (
  25. this.props.exclude.length === 0
  26. && <Dialog.Switch
  27. label = { this.props.t('dialog.moderationAudioLabel') }
  28. onValueChange = { this._onToggleModeration }
  29. value = { !this.state.audioModerationEnabled } />
  30. );
  31. }
  32. /**
  33. * Implements {@code Component#render}.
  34. *
  35. * @inheritdoc
  36. */
  37. render() {
  38. return (
  39. <ConfirmDialog
  40. confirmLabel = 'dialog.muteParticipantButton'
  41. descriptionKey = { this.state.content }
  42. onSubmit = { this._onSubmit }
  43. title = { this.props.title } >
  44. <Divider style = { styles.dividerDialog } />
  45. { this._renderSwitch() }
  46. </ConfirmDialog>
  47. );
  48. }
  49. }
  50. export default translate(connect(_mapStateToProps)(MuteEveryoneDialog));