|
|
@@ -6,6 +6,7 @@ import {
|
|
6
|
6
|
createRecordingDialogEvent,
|
|
7
|
7
|
sendAnalytics
|
|
8
|
8
|
} from '../../../analytics';
|
|
|
9
|
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
|
9
|
10
|
import {
|
|
10
|
11
|
_abstractMapStateToProps
|
|
11
|
12
|
} from '../../../base/dialog';
|
|
|
@@ -22,16 +23,12 @@ import { connect } from '../../../base/redux';
|
|
22
|
23
|
import { ColorPalette, StyleType } from '../../../base/styles';
|
|
23
|
24
|
import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
|
|
24
|
25
|
|
|
25
|
|
-import {
|
|
26
|
|
- default as styles,
|
|
27
|
|
- DROPBOX_LOGO,
|
|
28
|
|
- ICON_SHARE,
|
|
29
|
|
- JITSI_LOGO
|
|
30
|
|
-} from './styles';
|
|
31
|
|
-
|
|
32
|
26
|
import { RECORDING_TYPES } from '../../constants';
|
|
33
|
27
|
import { getRecordingDurationEstimation } from '../../functions';
|
|
34
|
28
|
|
|
|
29
|
+import { DROPBOX_LOGO, ICON_SHARE, JITSI_LOGO } from './styles';
|
|
|
30
|
+
|
|
|
31
|
+
|
|
35
|
32
|
type Props = {
|
|
36
|
33
|
|
|
37
|
34
|
/**
|
|
|
@@ -39,6 +36,11 @@ type Props = {
|
|
39
|
36
|
*/
|
|
40
|
37
|
_dialogStyles: StyleType,
|
|
41
|
38
|
|
|
|
39
|
+ /**
|
|
|
40
|
+ * The color-schemed stylesheet of this component.
|
|
|
41
|
+ */
|
|
|
42
|
+ _styles: StyleType,
|
|
|
43
|
+
|
|
42
|
44
|
/**
|
|
43
|
45
|
* The redux dispatch function.
|
|
44
|
46
|
*/
|
|
|
@@ -138,6 +140,8 @@ class StartRecordingDialogContent extends Component<Props> {
|
|
138
|
140
|
* @returns {React$Component}
|
|
139
|
141
|
*/
|
|
140
|
142
|
render() {
|
|
|
143
|
+ const { _styles: styles } = this.props;
|
|
|
144
|
+
|
|
141
|
145
|
return (
|
|
142
|
146
|
<Container
|
|
143
|
147
|
className = 'recording-dialog'
|
|
|
@@ -161,10 +165,13 @@ class StartRecordingDialogContent extends Component<Props> {
|
|
161
|
165
|
|
|
162
|
166
|
const {
|
|
163
|
167
|
_dialogStyles,
|
|
|
168
|
+ _styles: styles,
|
|
164
|
169
|
isValidating,
|
|
165
|
170
|
onSharingSettingChanged,
|
|
166
|
171
|
selectedRecordingService,
|
|
167
|
|
- sharingSetting, t } = this.props;
|
|
|
172
|
+ sharingSetting,
|
|
|
173
|
+ t
|
|
|
174
|
+ } = this.props;
|
|
168
|
175
|
|
|
169
|
176
|
const controlDisabled = selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE;
|
|
170
|
177
|
let mainContainerClasses = 'recording-header recording-header-line';
|
|
|
@@ -222,7 +229,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
|
222
|
229
|
return null;
|
|
223
|
230
|
}
|
|
224
|
231
|
|
|
225
|
|
- const { _dialogStyles, isValidating, t } = this.props;
|
|
|
232
|
+ const { _dialogStyles, _styles: styles, isValidating, t } = this.props;
|
|
226
|
233
|
|
|
227
|
234
|
const switchContent
|
|
228
|
235
|
= this.props.integrationsEnabled
|
|
|
@@ -274,7 +281,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
|
274
|
281
|
return null;
|
|
275
|
282
|
}
|
|
276
|
283
|
|
|
277
|
|
- const { _dialogStyles, isTokenValid, isValidating, t } = this.props;
|
|
|
284
|
+ const { _dialogStyles, _styles: styles, isTokenValid, isValidating, t } = this.props;
|
|
278
|
285
|
|
|
279
|
286
|
let content = null;
|
|
280
|
287
|
let switchContent = null;
|
|
|
@@ -421,7 +428,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
|
421
|
428
|
* @returns {React$Component}
|
|
422
|
429
|
*/
|
|
423
|
430
|
_renderSignOut() {
|
|
424
|
|
- const { spaceLeft, t, userName } = this.props;
|
|
|
431
|
+ const { _styles: styles, spaceLeft, t, userName } = this.props;
|
|
425
|
432
|
const duration = getRecordingDurationEstimation(spaceLeft);
|
|
426
|
433
|
|
|
427
|
434
|
return (
|
|
|
@@ -471,12 +478,22 @@ class StartRecordingDialogContent extends Component<Props> {
|
|
471
|
478
|
* @returns {void}
|
|
472
|
479
|
*/
|
|
473
|
480
|
_onSignOut() {
|
|
474
|
|
- sendAnalytics(
|
|
475
|
|
- createRecordingDialogEvent('start', 'signOut.button')
|
|
476
|
|
- );
|
|
|
481
|
+ sendAnalytics(createRecordingDialogEvent('start', 'signOut.button'));
|
|
477
|
482
|
this.props.dispatch(updateDropboxToken());
|
|
478
|
483
|
}
|
|
479
|
484
|
}
|
|
480
|
485
|
|
|
481
|
|
-export default translate(
|
|
482
|
|
- connect(_abstractMapStateToProps)(StartRecordingDialogContent));
|
|
|
486
|
+/**
|
|
|
487
|
+ * Maps part of the redux state to the props of this component.
|
|
|
488
|
+ *
|
|
|
489
|
+ * @param {Object} state - The Redux state.
|
|
|
490
|
+ * @returns {Props}
|
|
|
491
|
+ */
|
|
|
492
|
+function _mapStateToProps(state) {
|
|
|
493
|
+ return {
|
|
|
494
|
+ ..._abstractMapStateToProps(state),
|
|
|
495
|
+ _styles: ColorSchemeRegistry.get(state, 'StartRecordingDialogContent')
|
|
|
496
|
+ };
|
|
|
497
|
+}
|
|
|
498
|
+
|
|
|
499
|
+export default translate(connect(_mapStateToProps)(StartRecordingDialogContent));
|