您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MuteEveryonesVideoDialog.js 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // @flow
  2. import React from 'react';
  3. import { Text } from 'react-native';
  4. import { ColorSchemeRegistry } from '../../../base/color-scheme';
  5. import { ConfirmDialog } from '../../../base/dialog';
  6. import { translate } from '../../../base/i18n';
  7. import { connect } from '../../../base/redux';
  8. import { StyleType } from '../../../base/styles';
  9. import AbstractMuteEveryonesVideoDialog, {
  10. abstractMapStateToProps,
  11. type Props as AbstractProps } from '../AbstractMuteEveryonesVideoDialog';
  12. type Props = AbstractProps & {
  13. /**
  14. * The color-schemed stylesheet of the base/dialog feature.
  15. */
  16. _dialogStyles: StyleType
  17. }
  18. /**
  19. * A React Component with the contents for a dialog that asks for confirmation
  20. * from the user before muting all remote participants.
  21. *
  22. * @extends AbstractMuteEveryoneDialog
  23. */
  24. class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
  25. /**
  26. * Implements {@code Component#render}.
  27. *
  28. * @inheritdoc
  29. */
  30. render() {
  31. return (
  32. <ConfirmDialog
  33. okKey = 'dialog.muteEveryonesVideoDialogOk'
  34. onSubmit = { this._onSubmit } >
  35. <Text style = { this.props._dialogStyles.text }>
  36. { `${this.props.title} \n\n ${this.props.content}` }
  37. </Text>
  38. </ConfirmDialog>
  39. );
  40. }
  41. _onSubmit: () => boolean;
  42. }
  43. /**
  44. * Maps part of the Redux state to the props of this component.
  45. *
  46. * @param {Object} state - The Redux state.
  47. * @param {Props} ownProps - The own props of the component.
  48. * @returns {{
  49. * _dialogStyles: StyleType
  50. * }}
  51. */
  52. function _mapStateToProps(state: Object, ownProps: Props) {
  53. return {
  54. ...abstractMapStateToProps(state, ownProps),
  55. _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog')
  56. };
  57. }
  58. export default translate(connect(_mapStateToProps)(MuteEveryonesVideoDialog));