Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes related to coding style

Lyubomir Marinovee651840bf14
diff --git a/react/features/base/react/components/Watermarks.web.js b/react/features/base/react/components/Watermarks.web.js
index b6b216f2a8..60b674e455 100644
--- a/react/features/base/react/components/Watermarks.web.js
+++ b/react/features/base/react/components/Watermarks.web.js
@@ -1,11 +1,16 @@
-/* global APP, interfaceConfig */
+/* @flow */
import React, { Component } from 'react';
+declare var APP: Object;
+declare var interfaceConfig: Object;
+
/**
* The CSS style of the element with CSS class <tt>rightwatermark</tt>.
+ *
+ * @private
*/
-const RIGHT_WATERMARK_STYLE = {
+const _RIGHT_WATERMARK_STYLE = {
backgroundImage: 'url(images/rightwatermark.png)'
};
@@ -14,13 +19,22 @@ const RIGHT_WATERMARK_STYLE = {
* etc.
*/
export class Watermarks extends Component {
+ state = {
+ brandWatermarkLink: String,
+ jitsiWatermarkLink: String,
+ showBrandWatermark: Boolean,
+ showJitsiWatermark: Boolean,
+ showJitsiWatermarkForGuests: Boolean,
+ showPoweredBy: Boolean
+ };
+
/**
* Initializes a new Watermarks instance.
*
* @param {Object} props - The read-only properties with which the new
* instance is to be initialized.
*/
- constructor(props) {
+ constructor(props: Object) {
super(props);
let showBrandWatermark;
@@ -87,7 +101,7 @@ export class Watermarks extends Component {
target = '_new'>
<div
className = 'watermark rightwatermark'
- style = { RIGHT_WATERMARK_STYLE } />
+ style = { _RIGHT_WATERMARK_STYLE } />
</a>
);
}
diff --git a/react/features/conference/components/Conference.native.js b/react/features/conference/components/Conference.native.js
index 9c1c5f92a7..593acb645e 100644
--- a/react/features/conference/components/Conference.native.js
+++ b/react/features/conference/components/Conference.native.js
@@ -13,11 +13,14 @@ import { styles } from './styles';
/**
* The timeout in milliseconds after which the toolbar will be hidden.
+ *
+ * @private
+ * @type {number}
*/
-const TOOLBAR_TIMEOUT_MS = 5000;
+const _TOOLBAR_TIMEOUT_MS = 5000;
/**
- * The conference page of the application.
+ * The conference page of the mobile (i.e. React Native) application.
*/
class Conference extends Component {
/**
@@ -220,7 +223,7 @@ class Conference extends Component {
this._clearToolbarTimeout();
if (toolbarVisible) {
this._toolbarTimeout
- = setTimeout(this._onClick, TOOLBAR_TIMEOUT_MS);
+ = setTimeout(this._onClick, _TOOLBAR_TIMEOUT_MS);
}
}
}
diff --git a/react/features/conference/components/Conference.web.js b/react/features/conference/components/Conference.web.js
index 1feece33d8..c69ca7b0ca 100644
--- a/react/features/conference/components/Conference.web.js
+++ b/react/features/conference/components/Conference.web.js
@@ -9,14 +9,18 @@ import { FeedbackButton } from '../../feedback';
/**
* For legacy reasons, inline style for display none.
- * @type {{display: string}}
+ *
+ * @private
+ * @type {{
+ * display: string
+ * }}
*/
-const DISPLAY_NONE_STYLE = {
+const _DISPLAY_NONE_STYLE = {
display: 'none'
};
/**
- * Implements a React Component which renders initial conference layout
+ * The conference page of the Web application.
*/
class Conference extends Component {
@@ -68,7 +72,7 @@ class Conference extends Component {
<div
className = 'notice'
id = 'notice'
- style = { DISPLAY_NONE_STYLE }>
+ style = { _DISPLAY_NONE_STYLE }>
<span
className = 'noticeText'
id = 'noticeText' />
@@ -135,16 +139,14 @@ class Conference extends Component {
<span
className = 'videocontainer'
id = 'localVideoContainer'>
- <div
- className = 'videocontainer__background' />
+ <div className = 'videocontainer__background' />
<span id = 'localVideoWrapper' />
<audio
autoPlay = { true }
id = 'localAudio'
muted = { true } />
<div className = 'videocontainer__toolbar' />
- <div
- className = 'videocontainer__toptoolbar' />
+ <div className = 'videocontainer__toptoolbar' />
<div
className
= 'videocontainer__hoverOverlay' />
diff --git a/react/features/feedback/components/FeedbackButton.web.js b/react/features/feedback/components/FeedbackButton.web.js
index 0970b797e4..14b4ac12d3 100644
--- a/react/features/feedback/components/FeedbackButton.web.js
+++ b/react/features/feedback/components/FeedbackButton.web.js
@@ -1,10 +1,30 @@
-/* global config */
+/* @flow */
+
import React, { Component } from 'react';
+declare var config: Object;
+
/**
- * A Web Component which renders feedback button.
+ * Implements a Web/React Component which renders a feedback button.
*/
export class FeedbackButton extends Component {
+ state = {
+ callStatsID: String
+ };
+
+ /**
+ * Initializes a new FeedbackButton instance.
+ *
+ * @param {Object} props - The read-only properties with which the new
+ * instance is to be initialized.
+ */
+ constructor(props: Object) {
+ super(props);
+
+ this.state = {
+ callStatsID: config.callStatsID
+ };
+ }
/**
* Implements React's {@link Component#render()}.
@@ -13,9 +33,8 @@ export class FeedbackButton extends Component {
* @returns {ReactElement}
*/
render() {
-
- // if there is no callstats configured skip rendering
- if (!config.callStatsID) {
+ // If callstats.io-support is not configured, skip rendering.
+ if (!this.state.callStatsID) {
return null;
}