瀏覽代碼

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 查看文件

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 查看文件

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

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

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

Loading…
取消
儲存