Fix lint errs

This commit is contained in:
Ilya Daynatovich 2016-12-14 12:36:42 +02:00
parent 3190bfa058
commit e716c1738c
2 changed files with 30 additions and 15 deletions

View File

@ -1,4 +1,4 @@
/* global APP, $ */
/* global APP, JitsiMeetJS, loggingConfig $ */
import React from 'react';
import { Provider } from 'react-redux';
import { compose } from 'redux';
@ -19,7 +19,10 @@ import settings from '../../../../modules/settings/Settings';
import URLProcessor from '../../../../modules/config/URLProcessor';
import getTokenData from '../../../../modules/tokendata/TokenData';
import JitsiMeetLogStorage from '../../../../modules/util/JitsiMeetLogStorage';
// eslint-disable-next-line max-len
import KeyboardShortcut from '../../../../modules/keyboardshortcut/keyboardshortcut';
const Logger = require('jitsi-meet-logger');
const LogCollector = Logger.LogCollector;
@ -103,7 +106,8 @@ export class App extends AbstractApp {
* @returns {void}
*/
function configureLoggingLevels() {
// NOTE The library Logger is separated from the app loggers, so the levels
// NOTE The library Logger is separated from
// the app loggers, so the levels
// have to be set in two places
// Set default logging level

View File

@ -1,4 +1,5 @@
/* global APP, $, interfaceConfig */
/* global APP, $, interfaceConfig, config */
import React, { Component } from 'react';
import { connect as reactReduxConnect } from 'react-redux';
@ -10,6 +11,8 @@ import ConferenceUrl from '../../../../modules/URL/ConferenceUrl';
import HttpConfigFetch from '../../../../modules/config/HttpConfigFetch';
import BoshAddressChoice from '../../../../modules/config/BoshAddressChoice';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/**
* For legacy reasons, inline style for display none.
* @type {{display: string}}
@ -30,6 +33,7 @@ class Conference extends Component {
* @inheritdoc
*/
componentDidMount() {
/**
* If JWT token data it will be used for local user settings.
*
@ -39,11 +43,16 @@ class Conference extends Component {
const localUser = APP.tokenData.caller;
if (localUser) {
APP.settings.setEmail((localUser.getEmail() || '').trim(), true);
APP.settings.setAvatarUrl((localUser.getAvatarUrl() || '').trim());
APP.settings.setDisplayName((localUser.getName() || '').trim(), true);
const email = localUser.getEmail();
const avatarUrl = localUser.getAvatarUrl();
const name = localUser.getName();
APP.settings.setEmail((email || '').trim(), true);
APP.settings.setAvatarUrl((avatarUrl || '').trim());
APP.settings.setDisplayName((name || '').trim(), true);
}
}
/**
* Initialization of the app.
*
@ -55,26 +64,28 @@ class Conference extends Component {
// Initialize the conference URL handler
APP.ConferenceUrl = new ConferenceUrl(window.location);
}
/**
* If we have an HTTP endpoint for getting config.json configured we're going to
* read it and override properties from config.js and interfaceConfig.js.
* If there is no endpoint we'll just continue with initialization.
* Keep in mind that if the endpoint has been configured and we fail to obtain
* the config for any reason then the conference won't start and error message
* will be displayed to the user.
* If we have an HTTP endpoint for getting config.json configured
* we're going to read it and override properties from config.js and
* interfaceConfig.js. If there is no endpoint we'll just
* continue with initialization.
* Keep in mind that if the endpoint has been configured and we fail
* to obtain the config for any reason then the conference won't
* start and error message will be displayed to the user.
*
* @returns {void}
*/
function obtainConfigAndInit() {
const roomName = APP.conference.roomName;
const room = APP.conference.roomName;
if (config.configLocation) {
const configFetch = HttpConfigFetch;
const location = config.configLocation;
configFetch.obtainConfig(location, roomName, obtainConfigHandler);
configFetch.obtainConfig(location, room, obtainConfigHandler);
} else {
BoshAddressChoice.chooseAddress(config, roomName);
BoshAddressChoice.chooseAddress(config, room);
init();
}
}