浏览代码

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

master
Calin Chitu 4 年前
父节点
当前提交
81e9fca03b

+ 0
- 0
react/features/participants-pane/components/native/ParticipantsPanel.js 查看文件


+ 48
- 0
react/features/participants-pane/components/native/ParticipantsPanelButton.js 查看文件

@@ -0,0 +1,48 @@
1
+// @flow
2
+
3
+import type { Dispatch } from 'redux';
4
+
5
+import { translate } from '../../../base/i18n';
6
+import { IconParticipants } from '../../../base/icons';
7
+import { connect } from '../../../base/redux';
8
+import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
9
+
10
+type Props = AbstractButtonProps & {
11
+
12
+    /**
13
+     * The redux {@code dispatch} function.
14
+     */
15
+    dispatch: Dispatch<any>
16
+};
17
+
18
+
19
+/**
20
+ * Implements an {@link AbstractButton} to open the participants panel.
21
+ */
22
+class ParticipantsPanelButton extends AbstractButton<Props, *> {
23
+    accessibilityLabel = 'toolbar.accessibilityLabel.participants';
24
+    icon = IconParticipants;
25
+    label = 'toolbar.participants';
26
+
27
+    /**
28
+     * Handles clicking / pressing the button, and opens the participants panel.
29
+     *
30
+     * @private
31
+     * @returns {void}
32
+     */
33
+}
34
+
35
+/**
36
+ * Maps part of the redux state to the component's props.
37
+ *
38
+ * @param {Object} state - The redux store/state.
39
+ * @returns {Props}
40
+ */
41
+function mapStateToProps(state: Object) {
42
+
43
+    return {
44
+        state
45
+    };
46
+}
47
+
48
+export default translate(connect(mapStateToProps)(ParticipantsPanelButton));

+ 3
- 0
react/features/participants-pane/components/native/index.js 查看文件

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

+ 2
- 0
react/features/toolbox/components/native/OverflowMenu.js 查看文件

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

正在加载...
取消
保存