Quellcode durchsuchen

rn,recording: fix not displaying Dropbox storage text

master
Saúl Ibarra Corretgé vor 5 Jahren
Ursprung
Commit
f9071b8b6b

+ 33
- 16
react/features/recording/components/Recording/StartRecordingDialogContent.js Datei anzeigen

@@ -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));

+ 6
- 4
react/features/recording/components/Recording/styles.native.js Datei anzeigen

@@ -1,5 +1,6 @@
1 1
 // @flow
2 2
 
3
+import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
3 4
 import { BoxModel, ColorPalette } from '../../../base/styles';
4 5
 
5 6
 // XXX The "standard" {@code BoxModel.padding} has been deemed insufficient in
@@ -13,9 +14,10 @@ export const ICON_SHARE = require('../../../../../images/icon-users.png');
13 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 21
     container: {
20 22
         flex: 0,
21 23
         flexDirection: 'column'
@@ -64,6 +66,6 @@ export default {
64 66
     },
65 67
 
66 68
     text: {
67
-        color: ColorPalette.white
69
+        color: schemeColor('text')
68 70
     }
69
-};
71
+});

Laden…
Abbrechen
Speichern