Files
jitsi-meet/react/features/video-menu/components/web/ConnectionStatusButton.js
Robert Pintilii 91437c50e3 feat(thumbnail) Video thumbnails redesign and refactor (#10351)
Update video thumbnail design
Update design of indicators
In filmstrip view move Screen Sharing indicator to the top
Removed dominant speaker indicator
Use ContextMenu component for the connection stats popover
Combine Remove video menu and Meeting participant context menu into one component
Moved some styles from SCSS to JSS
Fix mobile avatars too big
Fix mobile horizontal scroll
Created button for Send to breakout room action
2021-12-15 15:18:41 +02:00

48 lines
1.1 KiB
JavaScript

// @flow
import React, { useCallback } from 'react';
import ContextMenuItem from '../../../base/components/context-menu/ContextMenuItem';
import { translate } from '../../../base/i18n';
import { IconInfo } from '../../../base/icons';
import { connect } from '../../../base/redux';
import { renderConnectionStatus } from '../../actions.web';
type Props = {
/**
* The Redux dispatch function.
*/
dispatch: Function,
/**
* The ID of the participant for which to show connection stats.
*/
participantId: string,
/**
* The function to be used to translate i18n labels.
*/
t: Function
};
const ConnectionStatusButton = ({
dispatch,
t
}: Props) => {
const onClick = useCallback(e => {
e.stopPropagation();
dispatch(renderConnectionStatus(true));
}, [ dispatch ]);
return (
<ContextMenuItem
accessibilityLabel = { t('videothumbnail.connectionInfo') }
icon = { IconInfo }
onClick = { onClick }
text = { t('videothumbnail.connectionInfo') } />
);
};
export default translate(connect()(ConnectionStatusButton));