Ver código fonte

Fixes related to coding style

j8
Lyubomir Marinov 8 anos atrás
pai
commit
ee651840bf

+ 18
- 4
react/features/base/react/components/Watermarks.web.js Ver arquivo

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

+ 6
- 3
react/features/conference/components/Conference.native.js Ver arquivo

@@ -13,11 +13,14 @@ import { styles } from './styles';
13 13
 
14 14
 /**
15 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 25
 class Conference extends Component {
23 26
     /**
@@ -220,7 +223,7 @@ class Conference extends Component {
220 223
         this._clearToolbarTimeout();
221 224
         if (toolbarVisible) {
222 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 Ver arquivo

@@ -9,14 +9,18 @@ import { FeedbackButton } from '../../feedback';
9 9
 
10 10
 /**
11 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 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 25
 class Conference extends Component {
22 26
 
@@ -68,7 +72,7 @@ class Conference extends Component {
68 72
                     <div
69 73
                         className = 'notice'
70 74
                         id = 'notice'
71
-                        style = { DISPLAY_NONE_STYLE }>
75
+                        style = { _DISPLAY_NONE_STYLE }>
72 76
                         <span
73 77
                             className = 'noticeText'
74 78
                             id = 'noticeText' />
@@ -135,16 +139,14 @@ class Conference extends Component {
135 139
                             <span
136 140
                                 className = 'videocontainer'
137 141
                                 id = 'localVideoContainer'>
138
-                                <div
139
-                                    className = 'videocontainer__background' />
142
+                                <div className = 'videocontainer__background' />
140 143
                                 <span id = 'localVideoWrapper' />
141 144
                                 <audio
142 145
                                     autoPlay = { true }
143 146
                                     id = 'localAudio'
144 147
                                     muted = { true } />
145 148
                                 <div className = 'videocontainer__toolbar' />
146
-                                <div
147
-                                    className = 'videocontainer__toptoolbar' />
149
+                                <div className = 'videocontainer__toptoolbar' />
148 150
                                 <div
149 151
                                     className
150 152
                                         = 'videocontainer__hoverOverlay' />

+ 24
- 5
react/features/feedback/components/FeedbackButton.web.js Ver arquivo

@@ -1,10 +1,30 @@
1
-/* global config */
1
+/* @flow */
2
+
2 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 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 30
      * Implements React's {@link Component#render()}.
@@ -13,9 +33,8 @@ export class FeedbackButton extends Component {
13 33
      * @returns {ReactElement}
14 34
      */
15 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 38
             return null;
20 39
         }
21 40
 

Carregando…
Cancelar
Salvar