import React from 'react'; import { TextInput, TouchableHighlight, View } from 'react-native'; import { connect } from 'react-redux'; import { translate } from '../../base/i18n'; import { Link, Text } from '../../base/react'; import { ColorPalette } from '../../base/styles'; import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage'; import styles from './styles'; /** * The URL at which the privacy policy is available to the user. */ const PRIVACY_URL = 'https://jitsi.org/meet/privacy'; /** * The URL at which the user may send feedback. */ const SEND_FEEDBACK_URL = 'mailto:support@jitsi.org'; /** * The URL at which the terms (of service/use) are available to the user. */ const TERMS_URL = 'https://jitsi.org/meet/terms'; /** * The native container rendering the welcome page. * * @extends AbstractWelcomePage */ class WelcomePage extends AbstractWelcomePage { /** * WelcomePage component's property types. * * @static */ static propTypes = AbstractWelcomePage.propTypes /** * Renders a prompt for entering a room name. * * @returns {ReactElement} */ render() { return ( { this._renderLocalVideo() } { this._renderLocalVideoOverlay() } ); } /** * Renders legal-related content such as Terms of service/use, Privacy * policy, etc. * * @private * @returns {ReactElement} */ _renderLegalese() { const { t } = this.props; return ( { t('welcomepage.terms') } { t('welcomepage.privacy') } { t('welcomepage.sendFeedback') } ); } /** * Renders a View over the local video. The latter is thought of as the * background (content) of this WelcomePage. The former is thought of as the * foreground (content) of this WelcomePage such as the room name input, the * button to initiate joining the specified room, etc. * * @private * @returns {ReactElement} */ _renderLocalVideoOverlay() { const { t } = this.props; return ( { t('welcomepage.roomname') } { t('welcomepage.join') } { this._renderLegalese() } ); } } export default translate(connect(_mapStateToProps)(WelcomePage));