浏览代码

fix(presence-label):styles

j8
hristoterezov 7 年前
父节点
当前提交
9331b0870b

+ 0
- 1
css/_videolayout_default.scss 查看文件

627
     padding-left: 10px;
627
     padding-left: 10px;
628
     padding-right: 10px;
628
     padding-right: 10px;
629
 }
629
 }
630
-#remotePresenceMessage .no-presence,
631
 #remoteConnectionMessage {
630
 #remoteConnectionMessage {
632
     display: none;
631
     display: none;
633
 }
632
 }

+ 1
- 4
modules/UI/videolayout/LargeVideoManager.js 查看文件

429
                 <Provider store = { APP.store }>
429
                 <Provider store = { APP.store }>
430
                     <I18nextProvider i18n = { i18next }>
430
                     <I18nextProvider i18n = { i18next }>
431
                         <PresenceLabel
431
                         <PresenceLabel
432
-                            noContentStyles = { {
433
-                                className: 'presence-label no-presence'
434
-                            } }
435
                             participantID = { id }
432
                             participantID = { id }
436
-                            styles = { { className: 'presence-label' } } />
433
+                            className = 'presence-label' />
437
                     </I18nextProvider>
434
                     </I18nextProvider>
438
                 </Provider>,
435
                 </Provider>,
439
                 presenceLabelContainer.get(0));
436
                 presenceLabelContainer.get(0));

+ 1
- 4
modules/UI/videolayout/RemoteVideo.js 查看文件

574
             <Provider store = { APP.store }>
574
             <Provider store = { APP.store }>
575
                 <I18nextProvider i18n = { i18next }>
575
                 <I18nextProvider i18n = { i18next }>
576
                     <PresenceLabel
576
                     <PresenceLabel
577
-                        noContentStyles = { {
578
-                            className: 'presence-label no-presence'
579
-                        } }
580
                         participantID = { this.id }
577
                         participantID = { this.id }
581
-                        styles = { { className: 'presence-label' } } />
578
+                        className = 'presence-label' />
582
                 </I18nextProvider>
579
                 </I18nextProvider>
583
             </Provider>,
580
             </Provider>,
584
             presenceLabelContainer);
581
             presenceLabelContainer);

+ 1
- 1
react/features/invite/components/callee-info/CalleeInfo.js 查看文件

64
                     <Container { ...this._style('ringing__status') }>
64
                     <Container { ...this._style('ringing__status') }>
65
                         <PresenceLabel
65
                         <PresenceLabel
66
                             defaultPresence = { status }
66
                             defaultPresence = { status }
67
-                            styles = { this._style('ringing__text') } />
67
+                            { ...this._style('ringing__text') } />
68
                     </Container>
68
                     </Container>
69
                     <Container { ...this._style('ringing__name') }>
69
                     <Container { ...this._style('ringing__name') }>
70
                         <Text
70
                         <Text

+ 18
- 12
react/features/presence-status/components/PresenceLabel.js 查看文件

37
         _presence: PropTypes.string,
37
         _presence: PropTypes.string,
38
 
38
 
39
         /**
39
         /**
40
-         * Default presence status that will be displayed if user's presence
41
-         * status is not available.
40
+         * Class name for the presence label.
42
          */
41
          */
43
-        defaultPresence: PropTypes.string,
42
+        className: PropTypes.string,
44
 
43
 
45
         /**
44
         /**
46
-         * Styles for the case where there isn't any content to be shown.
45
+         * Default presence status that will be displayed if user's presence
46
+         * status is not available.
47
          */
47
          */
48
-        noContentStyles: PropTypes.object,
48
+        defaultPresence: PropTypes.string,
49
 
49
 
50
         /**
50
         /**
51
          * The ID of the participant whose presence status shoul display.
51
          * The ID of the participant whose presence status shoul display.
55
         /**
55
         /**
56
          * Styles for the presence label.
56
          * Styles for the presence label.
57
          */
57
          */
58
-        styles: PropTypes.object,
58
+        style: PropTypes.object,
59
 
59
 
60
         /**
60
         /**
61
          * Invoked to obtain translated strings.
61
          * Invoked to obtain translated strings.
70
      * @returns {ReactElement}
70
      * @returns {ReactElement}
71
      */
71
      */
72
     render() {
72
     render() {
73
-        const { _presence, styles, noContentStyles } = this.props;
74
-        const combinedStyles = _presence ? styles : noContentStyles;
73
+        const text = this._getPresenceText();
74
+
75
+        if (text === null) {
76
+            return null;
77
+        }
78
+
79
+        const { style, className } = this.props;
75
 
80
 
76
         return (
81
         return (
77
-            <Text { ...combinedStyles }>
78
-                { this._getPresenceText() }
79
-            </Text>
80
-        );
82
+            <Text
83
+                className = { className }
84
+                { ...style }>
85
+                { text }
86
+            </Text>);
81
     }
87
     }
82
 
88
 
83
     /**
89
     /**

正在加载...
取消
保存