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

LocalRecordingButton.web.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @flow
  2. import { createToolbarEvent, sendAnalytics } from '../../analytics';
  3. import { openDialog } from '../../base/dialog';
  4. import { translate } from '../../base/i18n';
  5. import { IconRec } from '../../base/icons';
  6. import { connect } from '../../base/redux';
  7. import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
  8. import LocalRecordingInfoDialog from './LocalRecordingInfoDialog';
  9. /**
  10. * The type of the React {@code Component} props of {@link LocalRecording}.
  11. */
  12. type Props = AbstractButtonProps & {
  13. /**
  14. * The redux {@code dispatch} function.
  15. */
  16. dispatch: Function
  17. };
  18. /**
  19. * Implementation of a button for opening local recording dialog.
  20. */
  21. class LocalRecording extends AbstractButton<Props, *> {
  22. accessibilityLabel = 'toolbar.accessibilityLabel.localRecording';
  23. icon = IconRec;
  24. label = 'localRecording.dialogTitle';
  25. tooltip = 'localRecording.dialogTitle';
  26. /**
  27. * Handles clicking / pressing the button, and opens the appropriate dialog.
  28. *
  29. * @protected
  30. * @returns {void}
  31. */
  32. _handleClick() {
  33. const { dispatch } = this.props;
  34. sendAnalytics(createToolbarEvent('local.recording'));
  35. dispatch(openDialog(LocalRecordingInfoDialog));
  36. }
  37. }
  38. export default translate(connect()(LocalRecording));