mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-02-18 03:40:19 +00:00
* feat: Drops connection on prejoin screen. Refactors connection logic to reuse already existing logic from mobile. Connection is now established just before joining the room. Fixes some authentication logic with Login and Logout button in Profile tab. * squash: Drops createInitialLocalTracksAndConnect as it no longer connects. * squash: Shows an error on mobile and redirects to default. * squash: Fixes review comments. * squash: Fixes joining with prejoin disabled. * squash: Fixes adding initial local tracks. * squash: Fixes comments. * squash: Drop no longer used method. * squash: Fixes old web code imported into mobile builds. * squash: Drop unused prop. * squash: Drops recoverable flag on REDIRECT. * squash: Drops unused variable and fix connection access. * squash: Xmpp connect returns promise again. * squash: Execute xmpp connect and creating local tracks in parallel. * squash: Moves notification about problem jwt. * squash: Moves startConference to conference.js for the no prejoin case. And move the startConference in prejoin feature for the prejoin case. * squash: Fix passing filtered tracks when starting conference with no prejoin. * squash: Fix clearing listeners on connection established. Keeps mobile behaviour after merging web and mobile. * squash: Drops unused code.
89 lines
2.2 KiB
TypeScript
89 lines
2.2 KiB
TypeScript
import React, { PureComponent } from 'react';
|
|
import { WithTranslation } from 'react-i18next';
|
|
import { connect } from 'react-redux';
|
|
|
|
import { IStore } from '../../../app/types';
|
|
import { translate } from '../../../base/i18n/functions';
|
|
import Dialog from '../../../base/ui/components/web/Dialog';
|
|
import { cancelWaitForOwner, login } from '../../actions.web';
|
|
|
|
/**
|
|
* The type of the React {@code Component} props of {@link WaitForOwnerDialog}.
|
|
*/
|
|
interface IProps extends WithTranslation {
|
|
|
|
/**
|
|
* Redux store dispatch method.
|
|
*/
|
|
dispatch: IStore['dispatch'];
|
|
}
|
|
|
|
/**
|
|
* Authentication message dialog for host confirmation.
|
|
*
|
|
* @returns {React$Element<any>}
|
|
*/
|
|
class WaitForOwnerDialog extends PureComponent<IProps> {
|
|
/**
|
|
* Instantiates a new component.
|
|
*
|
|
* @param {Object} props - The read-only properties with which the new
|
|
* instance is to be initialized.
|
|
*/
|
|
constructor(props: IProps) {
|
|
super(props);
|
|
|
|
this._onCancelWaitForOwner = this._onCancelWaitForOwner.bind(this);
|
|
this._onIAmHost = this._onIAmHost.bind(this);
|
|
}
|
|
|
|
/**
|
|
* Called when the cancel button is clicked.
|
|
*
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
_onCancelWaitForOwner() {
|
|
const { dispatch } = this.props;
|
|
|
|
dispatch(cancelWaitForOwner());
|
|
}
|
|
|
|
/**
|
|
* Called when the OK button is clicked.
|
|
*
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
_onIAmHost() {
|
|
this.props.dispatch(login());
|
|
}
|
|
|
|
/**
|
|
* Implements React's {@link Component#render()}.
|
|
*
|
|
* @inheritdoc
|
|
*/
|
|
render() {
|
|
const {
|
|
t
|
|
} = this.props;
|
|
|
|
return (
|
|
<Dialog
|
|
disableBackdropClose = { true }
|
|
hideCloseButton = { true }
|
|
ok = {{ translationKey: 'dialog.IamHost' }}
|
|
onCancel = { this._onCancelWaitForOwner }
|
|
onSubmit = { this._onIAmHost }
|
|
titleKey = { t('dialog.WaitingForHostTitle') }>
|
|
<span>
|
|
{ t('dialog.WaitForHostMsg') }
|
|
</span>
|
|
</Dialog>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default translate(connect()(WaitForOwnerDialog));
|