mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-15 14:47:48 +00:00
* Javadoc introduced @code as a replacement of <code> and <tt> which is better aligned with other javadoc tags such as @link. Use it in the Java source code. If we switch to Kotlin, then we'll definitely use Markdown. * There are more uses of @code in the JavaScript source code than <tt> so use @code for the sake of consistency. Eventually, I'd rather we switch to Markdown because it's easier on my eyes. * Xcode is plain confused by @code and @link. The Internet says that Xcode supports the backquote character to denote the beginning and end of a string of characters which should be formatted for display as code but it doesn't work for me. <tt> is not rendered at all. So use the backquote which is rendered itself. Hopefully, if we switch to Markdown, then it'll be common between JavaScript and Objective-C source code.
81 lines
2.0 KiB
JavaScript
81 lines
2.0 KiB
JavaScript
/* @flow */
|
|
|
|
import PropTypes from 'prop-types';
|
|
import React, { Component } from 'react';
|
|
import { connect } from 'react-redux';
|
|
|
|
import { destroyLocalTracks } from '../../base/tracks';
|
|
import { NetworkActivityIndicator } from '../../mobile/network-activity';
|
|
|
|
import { isWelcomePageAppEnabled } from '../functions';
|
|
import LocalVideoTrackUnderlay from './LocalVideoTrackUnderlay';
|
|
import styles from './styles';
|
|
|
|
/**
|
|
* The React {@code Component} displayed by {@code AbstractApp} when it has no
|
|
* {@code Route} to render. Renders a progress indicator when there are ongoing
|
|
* network requests.
|
|
*/
|
|
class BlankPage extends Component {
|
|
/**
|
|
* {@code BlankPage} React {@code Component}'s prop types.
|
|
*
|
|
* @static
|
|
*/
|
|
static propTypes = {
|
|
/**
|
|
* The indicator which determines whether {@code WelcomePage} is (to
|
|
* be) rendered.
|
|
*
|
|
* @private
|
|
*/
|
|
_welcomePageEnabled: PropTypes.bool,
|
|
|
|
dispatch: PropTypes.func
|
|
};
|
|
|
|
/**
|
|
* Destroys the local tracks (if any) since no media is desired when this
|
|
* component is rendered.
|
|
*
|
|
* @inheritdoc
|
|
* @returns {void}
|
|
*/
|
|
componentWillMount() {
|
|
this.props._welcomePageEnabled
|
|
|| this.props.dispatch(destroyLocalTracks());
|
|
}
|
|
|
|
/**
|
|
* Implements React's {@link Component#render()}.
|
|
*
|
|
* @inheritdoc
|
|
* @returns {ReactElement}
|
|
*/
|
|
render() {
|
|
return (
|
|
<LocalVideoTrackUnderlay style = { styles.blankPage }>
|
|
<NetworkActivityIndicator />
|
|
</LocalVideoTrackUnderlay>
|
|
);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Maps (parts of) the redux state to the React {@code Component} props of
|
|
* {@code BlankPage}.
|
|
*
|
|
* @param {Object} state - The redux state.
|
|
* @private
|
|
* @returns {{
|
|
* _welcomePageEnabled: boolean
|
|
* }}
|
|
*/
|
|
function _mapStateToProps(state) {
|
|
return {
|
|
_welcomePageEnabled: isWelcomePageAppEnabled(state)
|
|
};
|
|
}
|
|
|
|
export default connect(_mapStateToProps)(BlankPage);
|