// @flow import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { FieldTextStateless as TextField } from '@atlaskit/field-text'; import { setPassword } from '../../base/conference'; import { Dialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; /** * Implements a React Component which prompts the user when a password is * required to join a conference. */ class PasswordRequiredPrompt extends Component { /** * PasswordRequiredPrompt component's property types. * * @static */ static propTypes = { /** * The JitsiConference which requires a password. * * @type {JitsiConference} */ conference: PropTypes.object, dispatch: PropTypes.func, t: PropTypes.func }; state = { password: '' }; /** * Initializes a new PasswordRequiredPrompt instance. * * @param {Object} props - The read-only properties with which the new * instance is to be initialized. */ constructor(props) { super(props); // Bind event handlers so they are only bound once per instance. this._onPasswordChanged = this._onPasswordChanged.bind(this); this._onSubmit = this._onSubmit.bind(this); } /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement} */ render() { return ( ); } /** * Display component in dialog body. * * @returns {ReactElement} * @protected */ _renderBody() { return (