|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+// @flow
|
|
|
2
|
+
|
|
|
3
|
+import React from 'react';
|
|
|
4
|
+import { Text } from 'react-native';
|
|
|
5
|
+
|
|
|
6
|
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
|
|
7
|
+import { ConfirmDialog } from '../../../base/dialog';
|
|
|
8
|
+import { translate } from '../../../base/i18n';
|
|
|
9
|
+import { connect } from '../../../base/redux';
|
|
|
10
|
+import { StyleType } from '../../../base/styles';
|
|
|
11
|
+import AbstractMuteEveryonesVideoDialog, {
|
|
|
12
|
+ abstractMapStateToProps,
|
|
|
13
|
+ type Props as AbstractProps } from '../AbstractMuteEveryonesVideoDialog';
|
|
|
14
|
+
|
|
|
15
|
+type Props = AbstractProps & {
|
|
|
16
|
+
|
|
|
17
|
+ /**
|
|
|
18
|
+ * The color-schemed stylesheet of the base/dialog feature.
|
|
|
19
|
+ */
|
|
|
20
|
+ _dialogStyles: StyleType
|
|
|
21
|
+}
|
|
|
22
|
+
|
|
|
23
|
+/**
|
|
|
24
|
+ * A React Component with the contents for a dialog that asks for confirmation
|
|
|
25
|
+ * from the user before muting all remote participants.
|
|
|
26
|
+ *
|
|
|
27
|
+ * @extends AbstractMuteEveryoneDialog
|
|
|
28
|
+ */
|
|
|
29
|
+class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
|
|
|
30
|
+
|
|
|
31
|
+ /**
|
|
|
32
|
+ * Implements {@code Component#render}.
|
|
|
33
|
+ *
|
|
|
34
|
+ * @inheritdoc
|
|
|
35
|
+ */
|
|
|
36
|
+ render() {
|
|
|
37
|
+ return (
|
|
|
38
|
+ <ConfirmDialog
|
|
|
39
|
+ okKey = 'dialog.muteEveryonesVideoDialogOk'
|
|
|
40
|
+ onSubmit = { this._onSubmit } >
|
|
|
41
|
+ <Text style = { this.props._dialogStyles.text }>
|
|
|
42
|
+ { `${this.props.title} \n\n ${this.props.content}` }
|
|
|
43
|
+ </Text>
|
|
|
44
|
+ </ConfirmDialog>
|
|
|
45
|
+ );
|
|
|
46
|
+ }
|
|
|
47
|
+
|
|
|
48
|
+ _onSubmit: () => boolean;
|
|
|
49
|
+}
|
|
|
50
|
+
|
|
|
51
|
+/**
|
|
|
52
|
+ * Maps part of the Redux state to the props of this component.
|
|
|
53
|
+ *
|
|
|
54
|
+ * @param {Object} state - The Redux state.
|
|
|
55
|
+ * @param {Props} ownProps - The own props of the component.
|
|
|
56
|
+ * @returns {{
|
|
|
57
|
+ * _dialogStyles: StyleType
|
|
|
58
|
+ * }}
|
|
|
59
|
+ */
|
|
|
60
|
+function _mapStateToProps(state: Object, ownProps: Props) {
|
|
|
61
|
+ return {
|
|
|
62
|
+ ...abstractMapStateToProps(state, ownProps),
|
|
|
63
|
+ _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog')
|
|
|
64
|
+ };
|
|
|
65
|
+}
|
|
|
66
|
+
|
|
|
67
|
+export default translate(connect(_mapStateToProps)(MuteEveryonesVideoDialog));
|