/* global APP, interfaceConfig */ import React from 'react'; import { connect } from 'react-redux'; import { Conference } from '../../conference'; import { AbstractWelcomePage, mapStateToProps } from './AbstractWelcomePage'; /** * The CSS style of the element with CSS class rightwatermark. */ const RIGHT_WATERMARK_STYLE = { backgroundImage: 'url(images/rightwatermark.png)' }; /* eslint-disable require-jsdoc */ /** * The Web container rendering the welcome page. * * @extends AbstractWelcomePage */ class WelcomePage extends AbstractWelcomePage { /* eslint-enable require-jsdoc */ /** * Initializes a new WelcomePage instance. * * @param {Object} props - The read-only properties with which the new * instance is to be initialized. */ constructor(props) { super(props); this._initState(); // Bind event handlers so they are only bound once for every instance. this._onDisableWelcomeChange = this._onDisableWelcomeChange.bind(this); this._onKeyDown = this._onKeyDown.bind(this); this._onRoomChange = this._onRoomChange.bind(this); } /** * This method is executed when comonent is mounted. * * @inheritdoc * @returns {void} */ componentDidMount() { if (this.state.generateRoomnames) { this._updateRoomname(); } } /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement|null} */ 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 (