浏览代码

Fixes related to coding style

efficient_tiling
Lyubomir Marinov 8 年前
父节点
当前提交
ee651840bf

+ 18
- 4
react/features/base/react/components/Watermarks.web.js 查看文件

1
-/* global APP, interfaceConfig */
1
+/* @flow */
2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
+declare var APP: Object;
6
+declare var interfaceConfig: Object;
7
+
5
 /**
8
 /**
6
  * The CSS style of the element with CSS class <tt>rightwatermark</tt>.
9
  * The CSS style of the element with CSS class <tt>rightwatermark</tt>.
10
+ *
11
+ * @private
7
  */
12
  */
8
-const RIGHT_WATERMARK_STYLE = {
13
+const _RIGHT_WATERMARK_STYLE = {
9
     backgroundImage: 'url(images/rightwatermark.png)'
14
     backgroundImage: 'url(images/rightwatermark.png)'
10
 };
15
 };
11
 
16
 
14
  * etc.
19
  * etc.
15
  */
20
  */
16
 export class Watermarks extends Component {
21
 export class Watermarks extends Component {
22
+    state = {
23
+        brandWatermarkLink: String,
24
+        jitsiWatermarkLink: String,
25
+        showBrandWatermark: Boolean,
26
+        showJitsiWatermark: Boolean,
27
+        showJitsiWatermarkForGuests: Boolean,
28
+        showPoweredBy: Boolean
29
+    };
30
+
17
     /**
31
     /**
18
      * Initializes a new Watermarks instance.
32
      * Initializes a new Watermarks instance.
19
      *
33
      *
20
      * @param {Object} props - The read-only properties with which the new
34
      * @param {Object} props - The read-only properties with which the new
21
      * instance is to be initialized.
35
      * instance is to be initialized.
22
      */
36
      */
23
-    constructor(props) {
37
+    constructor(props: Object) {
24
         super(props);
38
         super(props);
25
 
39
 
26
         let showBrandWatermark;
40
         let showBrandWatermark;
87
                     target = '_new'>
101
                     target = '_new'>
88
                     <div
102
                     <div
89
                         className = 'watermark rightwatermark'
103
                         className = 'watermark rightwatermark'
90
-                        style = { RIGHT_WATERMARK_STYLE } />
104
+                        style = { _RIGHT_WATERMARK_STYLE } />
91
                 </a>
105
                 </a>
92
             );
106
             );
93
         }
107
         }

+ 6
- 3
react/features/conference/components/Conference.native.js 查看文件

13
 
13
 
14
 /**
14
 /**
15
  * The timeout in milliseconds after which the toolbar will be hidden.
15
  * The timeout in milliseconds after which the toolbar will be hidden.
16
+ *
17
+ * @private
18
+ * @type {number}
16
  */
19
  */
17
-const TOOLBAR_TIMEOUT_MS = 5000;
20
+const _TOOLBAR_TIMEOUT_MS = 5000;
18
 
21
 
19
 /**
22
 /**
20
- * The conference page of the application.
23
+ * The conference page of the mobile (i.e. React Native) application.
21
  */
24
  */
22
 class Conference extends Component {
25
 class Conference extends Component {
23
     /**
26
     /**
220
         this._clearToolbarTimeout();
223
         this._clearToolbarTimeout();
221
         if (toolbarVisible) {
224
         if (toolbarVisible) {
222
             this._toolbarTimeout
225
             this._toolbarTimeout
223
-                = setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
226
+                = setTimeout(this._onClick, _TOOLBAR_TIMEOUT_MS);
224
         }
227
         }
225
     }
228
     }
226
 }
229
 }

+ 10
- 8
react/features/conference/components/Conference.web.js 查看文件

9
 
9
 
10
 /**
10
 /**
11
  * For legacy reasons, inline style for display none.
11
  * For legacy reasons, inline style for display none.
12
- * @type {{display: string}}
12
+ *
13
+ * @private
14
+ * @type {{
15
+ *     display: string
16
+ * }}
13
  */
17
  */
14
-const DISPLAY_NONE_STYLE = {
18
+const _DISPLAY_NONE_STYLE = {
15
     display: 'none'
19
     display: 'none'
16
 };
20
 };
17
 
21
 
18
 /**
22
 /**
19
- * Implements a React Component which renders initial conference layout
23
+ * The conference page of the Web application.
20
  */
24
  */
21
 class Conference extends Component {
25
 class Conference extends Component {
22
 
26
 
68
                     <div
72
                     <div
69
                         className = 'notice'
73
                         className = 'notice'
70
                         id = 'notice'
74
                         id = 'notice'
71
-                        style = { DISPLAY_NONE_STYLE }>
75
+                        style = { _DISPLAY_NONE_STYLE }>
72
                         <span
76
                         <span
73
                             className = 'noticeText'
77
                             className = 'noticeText'
74
                             id = 'noticeText' />
78
                             id = 'noticeText' />
135
                             <span
139
                             <span
136
                                 className = 'videocontainer'
140
                                 className = 'videocontainer'
137
                                 id = 'localVideoContainer'>
141
                                 id = 'localVideoContainer'>
138
-                                <div
139
-                                    className = 'videocontainer__background' />
142
+                                <div className = 'videocontainer__background' />
140
                                 <span id = 'localVideoWrapper' />
143
                                 <span id = 'localVideoWrapper' />
141
                                 <audio
144
                                 <audio
142
                                     autoPlay = { true }
145
                                     autoPlay = { true }
143
                                     id = 'localAudio'
146
                                     id = 'localAudio'
144
                                     muted = { true } />
147
                                     muted = { true } />
145
                                 <div className = 'videocontainer__toolbar' />
148
                                 <div className = 'videocontainer__toolbar' />
146
-                                <div
147
-                                    className = 'videocontainer__toptoolbar' />
149
+                                <div className = 'videocontainer__toptoolbar' />
148
                                 <div
150
                                 <div
149
                                     className
151
                                     className
150
                                         = 'videocontainer__hoverOverlay' />
152
                                         = 'videocontainer__hoverOverlay' />

+ 24
- 5
react/features/feedback/components/FeedbackButton.web.js 查看文件

1
-/* global config */
1
+/* @flow */
2
+
2
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
3
 
4
 
5
+declare var config: Object;
6
+
4
 /**
7
 /**
5
- * A Web Component which renders feedback button.
8
+ * Implements a Web/React Component which renders a feedback button.
6
  */
9
  */
7
 export class FeedbackButton extends Component {
10
 export class FeedbackButton extends Component {
11
+    state = {
12
+        callStatsID: String
13
+    };
14
+
15
+    /**
16
+     * Initializes a new FeedbackButton instance.
17
+     *
18
+     * @param {Object} props - The read-only properties with which the new
19
+     * instance is to be initialized.
20
+     */
21
+    constructor(props: Object) {
22
+        super(props);
23
+
24
+        this.state = {
25
+            callStatsID: config.callStatsID
26
+        };
27
+    }
8
 
28
 
9
     /**
29
     /**
10
      * Implements React's {@link Component#render()}.
30
      * Implements React's {@link Component#render()}.
13
      * @returns {ReactElement}
33
      * @returns {ReactElement}
14
      */
34
      */
15
     render() {
35
     render() {
16
-
17
-        // if there is no callstats configured skip rendering
18
-        if (!config.callStatsID) {
36
+        // If callstats.io-support is not configured, skip rendering.
37
+        if (!this.state.callStatsID) {
19
             return null;
38
             return null;
20
         }
39
         }
21
 
40
 

正在加载...
取消
保存