Fixes related to coding style

This commit is contained in:
Lyubomir Marinov 2017-02-02 10:49:14 -06:00
parent 0765c60d77
commit ee651840bf
4 changed files with 58 additions and 20 deletions

View File

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

View File

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

View File

@ -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' />

View File

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