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

AudioDeviceToggleButton.js 1.1KB

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