Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

AudioDeviceToggleButton.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import { openDialog } from '../../../base/dialog';
  4. import { translate } from '../../../base/i18n';
  5. import { IconVolumeEmpty } from '../../../base/icons';
  6. import { connect } from '../../../base/redux';
  7. import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
  8. import AudioRoutePickerDialog from './AudioRoutePickerDialog';
  9. type Props = AbstractButtonProps & {
  10. /**
  11. * The Redux dispatch function.
  12. */
  13. dispatch: Dispatch<any>
  14. };
  15. /**
  16. * Implements an {@link AbstractButton} to open the audio device list.
  17. */
  18. class AudioDeviceToggleButton extends AbstractButton<Props, *> {
  19. accessibilityLabel = 'toolbar.accessibilityLabel.audioRoute';
  20. icon = IconVolumeEmpty;
  21. label = 'toolbar.accessibilityLabel.audioRoute';
  22. /**
  23. * Handles clicking / pressing the button, and opens the appropriate dialog.
  24. *
  25. * @private
  26. * @returns {void}
  27. */
  28. _handleClick() {
  29. this.props.dispatch(openDialog(AudioRoutePickerDialog));
  30. }
  31. }
  32. export default translate(connect()(AudioDeviceToggleButton));