Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Calin Chitu81e9fca03be5
diff --git a/react/features/participants-pane/components/native/ParticipantsPanel.js b/react/features/participants-pane/components/native/ParticipantsPanel.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/react/features/participants-pane/components/native/ParticipantsPanelButton.js b/react/features/participants-pane/components/native/ParticipantsPanelButton.js
new file mode 100644
index 0000000000..58b040cf2b
--- /dev/null
+++ b/react/features/participants-pane/components/native/ParticipantsPanelButton.js
@@ -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));
diff --git a/react/features/participants-pane/components/native/index.js b/react/features/participants-pane/components/native/index.js
new file mode 100644
index 0000000000..23876f024c
--- /dev/null
+++ b/react/features/participants-pane/components/native/index.js
@@ -0,0 +1,3 @@
+// @flow
+
+export { default as ParticipantsPanelButton } from './ParticipantsPanelButton';
diff --git a/react/features/toolbox/components/native/OverflowMenu.js b/react/features/toolbox/components/native/OverflowMenu.js
index a2ec33467b..d9f5e29863 100644
--- a/react/features/toolbox/components/native/OverflowMenu.js
+++ b/react/features/toolbox/components/native/OverflowMenu.js
@@ -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 } />