feat(native-participants-panel) created participants panel overflowmenu button

This commit is contained in:
Calin Chitu 2021-05-11 18:04:22 +03:00 committed by Hristo Terezov
parent 76f8302aeb
commit 81e9fca03b
4 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,48 @@
// @flow
import type { Dispatch } from 'redux';
import { translate } from '../../../base/i18n';
import { IconParticipants } from '../../../base/icons';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
type Props = AbstractButtonProps & {
/**
* The redux {@code dispatch} function.
*/
dispatch: Dispatch<any>
};
/**
* Implements an {@link AbstractButton} to open the participants panel.
*/
class ParticipantsPanelButton extends AbstractButton<Props, *> {
accessibilityLabel = 'toolbar.accessibilityLabel.participants';
icon = IconParticipants;
label = 'toolbar.participants';
/**
* Handles clicking / pressing the button, and opens the participants panel.
*
* @private
* @returns {void}
*/
}
/**
* Maps part of the redux state to the component's props.
*
* @param {Object} state - The redux store/state.
* @returns {Props}
*/
function mapStateToProps(state: Object) {
return {
state
};
}
export default translate(connect(mapStateToProps)(ParticipantsPanelButton));

View File

@ -0,0 +1,3 @@
// @flow
export { default as ParticipantsPanelButton } from './ParticipantsPanelButton';

View File

@ -9,6 +9,7 @@ import { StyleType } from '../../../base/styles';
import { SharedDocumentButton } from '../../../etherpad';
import { InviteButton } from '../../../invite';
import { AudioRouteButton } from '../../../mobile/audio-mode';
import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
import { ReactionMenu } from '../../../reactions/components';
import { LiveStreamButton, RecordButton } from '../../../recording';
import SecurityDialogButton from '../../../security/components/security-dialog/SecurityDialogButton';
@ -131,6 +132,7 @@ class OverflowMenu extends PureComponent<Props, State> {
? null
: this._renderReactionMenu }>
<AudioRouteButton { ...topButtonProps } />
<ParticipantsPaneButton { ...buttonProps } />
{!toolbarButtons.has('invite') && <InviteButton { ...buttonProps } />}
<AudioOnlyButton { ...buttonProps } />
<SecurityDialogButton { ...buttonProps } />