import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Dialog, hideDialog } from '../../base/dialog'; import { translate } from '../../base/i18n'; import { getParticipantById } from '../../base/participants'; declare var APP: Object; /** * Implements a dialog for remote control authorization. */ class RemoteControlAuthorizationDialog extends Component { /** * RemoteControlAuthorizationDialog component's property types. * * @static */ static propTypes = { /** * The display name of the participant who is requesting authorization * for remote desktop control session. * * @private */ _displayName: React.PropTypes.string, /** * Used to show/hide the dialog on cancel. */ dispatch: React.PropTypes.func, /** * The ID of the participant who is requesting authorization for remote * desktop control session. * * @public */ participantId: React.PropTypes.string, /** * Invoked to obtain translated strings. */ t: React.PropTypes.func }; /** * Initializes a new RemoteControlAuthorizationDialog instance. * * @param {Object} props - The read-only properties with which the new * instance is to be initialized. */ constructor(props) { super(props); this._onCancel = this._onCancel.bind(this); this._onSubmit = this._onSubmit.bind(this); } /** * Implements React's {@link Component#render()}. * * @inheritdoc */ render() { return ( ); } /** * Renders additional message text for the dialog. * * @private * @returns {ReactElement} */ _getAdditionalMessage() { // FIXME: Once we have this information in redux we should // start getting it from there. if (APP.conference.isSharingScreen && APP.conference.getDesktopSharingSourceType() === 'screen') { return null; } return (