Merge pull request #1174 from jitsi/fix-disabled-welcome-page
Fix disabled Welcome page broken with the introduction of React
This commit is contained in:
commit
e8c631de01
23
app.js
23
app.js
|
@ -192,9 +192,18 @@ function init() {
|
||||||
APP.ConferenceUrl = new ConferenceUrl(window.location);
|
APP.ConferenceUrl = new ConferenceUrl(window.location);
|
||||||
// Clean up the URL displayed by the browser
|
// Clean up the URL displayed by the browser
|
||||||
replaceHistoryState(APP.ConferenceUrl.getInviteUrl());
|
replaceHistoryState(APP.ConferenceUrl.getInviteUrl());
|
||||||
|
|
||||||
|
// TODO The execution of the mobile app starts from react/index.native.js.
|
||||||
|
// Similarly, the execution of the Web app should start from
|
||||||
|
// react/index.web.js for the sake of consistency and ease of understanding.
|
||||||
|
// Temporarily though because we are at the beginning of introducing React
|
||||||
|
// into the Web app, allow the execution of the Web app to start from app.js
|
||||||
|
// in order to reduce the complexity of the beginning step.
|
||||||
|
require('./react');
|
||||||
|
|
||||||
const isUIReady = APP.UI.start();
|
const isUIReady = APP.UI.start();
|
||||||
if (isUIReady) {
|
if (isUIReady) {
|
||||||
APP.conference.init({roomName: buildRoomName()}).then(function () {
|
APP.conference.init({roomName: buildRoomName()}).then(() => {
|
||||||
|
|
||||||
if (APP.logCollector) {
|
if (APP.logCollector) {
|
||||||
// Start the LogCollector's periodic "store logs" task only if
|
// Start the LogCollector's periodic "store logs" task only if
|
||||||
|
@ -227,13 +236,13 @@ function init() {
|
||||||
|
|
||||||
APP.UI.initConference();
|
APP.UI.initConference();
|
||||||
|
|
||||||
APP.UI.addListener(UIEvents.LANG_CHANGED, function (language) {
|
APP.UI.addListener(UIEvents.LANG_CHANGED, language => {
|
||||||
APP.translation.setLanguage(language);
|
APP.translation.setLanguage(language);
|
||||||
APP.settings.setLanguage(language);
|
APP.settings.setLanguage(language);
|
||||||
});
|
});
|
||||||
|
|
||||||
APP.keyboardshortcut.init();
|
APP.keyboardshortcut.init();
|
||||||
}).catch(function (err) {
|
}).catch(err => {
|
||||||
APP.UI.hideRingOverLay();
|
APP.UI.hideRingOverLay();
|
||||||
APP.API.notifyConferenceLeft(APP.conference.roomName);
|
APP.API.notifyConferenceLeft(APP.conference.roomName);
|
||||||
logger.error(err);
|
logger.error(err);
|
||||||
|
@ -284,14 +293,6 @@ $(document).ready(function () {
|
||||||
|
|
||||||
URLProcessor.setConfigParametersFromUrl();
|
URLProcessor.setConfigParametersFromUrl();
|
||||||
|
|
||||||
// TODO The execution of the mobile app starts from react/index.native.js.
|
|
||||||
// Similarly, the execution of the Web app should start from
|
|
||||||
// react/index.web.js for the sake of consistency and ease of understanding.
|
|
||||||
// Temporarily though because we are at the beginning of introducing React
|
|
||||||
// into the Web app, allow the execution of the Web app to start from app.js
|
|
||||||
// in order to reduce the complexity of the beginning step.
|
|
||||||
require('./react');
|
|
||||||
|
|
||||||
APP.init();
|
APP.init();
|
||||||
|
|
||||||
APP.translation.init(settings.getLanguage());
|
APP.translation.init(settings.getLanguage());
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
|
import { Conference } from '../../conference';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The web container rendering the welcome page.
|
* The web container rendering the welcome page.
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +14,14 @@ export default class WelcomePage extends Component {
|
||||||
* @returns {ReactElement|null}
|
* @returns {ReactElement|null}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
|
// FIXME The rendering of Conference bellow is a very quick and dirty
|
||||||
|
// temporary fix for the following issue: when the WelcomePage is
|
||||||
|
// disabled, app.js expects Conference to be rendered already and only
|
||||||
|
// then it builds a room name but the App component expects the room
|
||||||
|
// name to be built already (by looking at the window's location) in
|
||||||
|
// order to choose between WelcomePage and Conference.
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<div id = 'welcome_page'>
|
<div id = 'welcome_page'>
|
||||||
{
|
{
|
||||||
this._renderHeader()
|
this._renderHeader()
|
||||||
|
@ -21,6 +30,8 @@ export default class WelcomePage extends Component {
|
||||||
this._renderMain()
|
this._renderMain()
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
<Conference />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue