Преглед изворни кода

rn,recording: fix not displaying Dropbox storage text

master
Saúl Ibarra Corretgé пре 5 година
родитељ
комит
f9071b8b6b

+ 33
- 16
react/features/recording/components/Recording/StartRecordingDialogContent.js Прегледај датотеку

6
     createRecordingDialogEvent,
6
     createRecordingDialogEvent,
7
     sendAnalytics
7
     sendAnalytics
8
 } from '../../../analytics';
8
 } from '../../../analytics';
9
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
9
 import {
10
 import {
10
     _abstractMapStateToProps
11
     _abstractMapStateToProps
11
 } from '../../../base/dialog';
12
 } from '../../../base/dialog';
22
 import { ColorPalette, StyleType } from '../../../base/styles';
23
 import { ColorPalette, StyleType } from '../../../base/styles';
23
 import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
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
 import { RECORDING_TYPES } from '../../constants';
26
 import { RECORDING_TYPES } from '../../constants';
33
 import { getRecordingDurationEstimation } from '../../functions';
27
 import { getRecordingDurationEstimation } from '../../functions';
34
 
28
 
29
+import { DROPBOX_LOGO, ICON_SHARE, JITSI_LOGO } from './styles';
30
+
31
+
35
 type Props = {
32
 type Props = {
36
 
33
 
37
     /**
34
     /**
39
      */
36
      */
40
     _dialogStyles: StyleType,
37
     _dialogStyles: StyleType,
41
 
38
 
39
+    /**
40
+     * The color-schemed stylesheet of this component.
41
+     */
42
+    _styles: StyleType,
43
+
42
     /**
44
     /**
43
      * The redux dispatch function.
45
      * The redux dispatch function.
44
      */
46
      */
138
      * @returns {React$Component}
140
      * @returns {React$Component}
139
      */
141
      */
140
     render() {
142
     render() {
143
+        const { _styles: styles } = this.props;
144
+
141
         return (
145
         return (
142
             <Container
146
             <Container
143
                 className = 'recording-dialog'
147
                 className = 'recording-dialog'
161
 
165
 
162
         const {
166
         const {
163
             _dialogStyles,
167
             _dialogStyles,
168
+            _styles: styles,
164
             isValidating,
169
             isValidating,
165
             onSharingSettingChanged,
170
             onSharingSettingChanged,
166
             selectedRecordingService,
171
             selectedRecordingService,
167
-            sharingSetting, t } = this.props;
172
+            sharingSetting,
173
+            t
174
+        } = this.props;
168
 
175
 
169
         const controlDisabled = selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE;
176
         const controlDisabled = selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE;
170
         let mainContainerClasses = 'recording-header recording-header-line';
177
         let mainContainerClasses = 'recording-header recording-header-line';
222
             return null;
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
         const switchContent
234
         const switchContent
228
             = this.props.integrationsEnabled
235
             = this.props.integrationsEnabled
274
             return null;
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
         let content = null;
286
         let content = null;
280
         let switchContent = null;
287
         let switchContent = null;
421
      * @returns {React$Component}
428
      * @returns {React$Component}
422
      */
429
      */
423
     _renderSignOut() {
430
     _renderSignOut() {
424
-        const { spaceLeft, t, userName } = this.props;
431
+        const { _styles: styles, spaceLeft, t, userName } = this.props;
425
         const duration = getRecordingDurationEstimation(spaceLeft);
432
         const duration = getRecordingDurationEstimation(spaceLeft);
426
 
433
 
427
         return (
434
         return (
471
      * @returns {void}
478
      * @returns {void}
472
      */
479
      */
473
     _onSignOut() {
480
     _onSignOut() {
474
-        sendAnalytics(
475
-            createRecordingDialogEvent('start', 'signOut.button')
476
-        );
481
+        sendAnalytics(createRecordingDialogEvent('start', 'signOut.button'));
477
         this.props.dispatch(updateDropboxToken());
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));

+ 6
- 4
react/features/recording/components/Recording/styles.native.js Прегледај датотеку

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
3
 import { BoxModel, ColorPalette } from '../../../base/styles';
4
 import { BoxModel, ColorPalette } from '../../../base/styles';
4
 
5
 
5
 // XXX The "standard" {@code BoxModel.padding} has been deemed insufficient in
6
 // XXX The "standard" {@code BoxModel.padding} has been deemed insufficient in
13
 export const JITSI_LOGO = require('../../../../../images/jitsiLogo_square.png');
14
 export const JITSI_LOGO = require('../../../../../images/jitsiLogo_square.png');
14
 
15
 
15
 /**
16
 /**
16
- * The styles of the React {@code Components} of the feature recording.
17
+ * Color schemed styles for the @{code StartRecordingDialogContent} component.
17
  */
18
  */
18
-export default {
19
+ColorSchemeRegistry.register('StartRecordingDialogContent', {
20
+
19
     container: {
21
     container: {
20
         flex: 0,
22
         flex: 0,
21
         flexDirection: 'column'
23
         flexDirection: 'column'
64
     },
66
     },
65
 
67
 
66
     text: {
68
     text: {
67
-        color: ColorPalette.white
69
+        color: schemeColor('text')
68
     }
70
     }
69
-};
71
+});

Loading…
Откажи
Сачувај