mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat: Drops connection on prejoin screen. (#13538)
* 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.
This commit is contained in:
@@ -2,11 +2,12 @@ import { Theme } from '@mui/material';
|
||||
import { withStyles } from '@mui/styles';
|
||||
import React from 'react';
|
||||
import { WithTranslation } from 'react-i18next';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
// @ts-expect-error
|
||||
import UIEvents from '../../../../../service/UI/UIEvents';
|
||||
import { createProfilePanelButtonEvent } from '../../../analytics/AnalyticsEvents';
|
||||
import { sendAnalytics } from '../../../analytics/functions';
|
||||
import { IStore } from '../../../app/types';
|
||||
import { login, logout } from '../../../authentication/actions.web';
|
||||
import Avatar from '../../../base/avatar/components/Avatar';
|
||||
import AbstractDialogTab, {
|
||||
IProps as AbstractDialogTabProps } from '../../../base/dialog/components/web/AbstractDialogTab';
|
||||
@@ -14,7 +15,6 @@ import { translate } from '../../../base/i18n/functions';
|
||||
import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
||||
import Button from '../../../base/ui/components/web/Button';
|
||||
import Input from '../../../base/ui/components/web/Input';
|
||||
import { openLogoutDialog } from '../../actions';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link ProfileTab}.
|
||||
@@ -22,7 +22,7 @@ import { openLogoutDialog } from '../../actions';
|
||||
export interface IProps extends AbstractDialogTabProps, WithTranslation {
|
||||
|
||||
/**
|
||||
* Whether or not server-side authentication is available.
|
||||
* Whether server-side authentication is available.
|
||||
*/
|
||||
authEnabled: boolean;
|
||||
|
||||
@@ -36,6 +36,11 @@ export interface IProps extends AbstractDialogTabProps, WithTranslation {
|
||||
*/
|
||||
classes: any;
|
||||
|
||||
/**
|
||||
* Invoked to change the configured calendar integration.
|
||||
*/
|
||||
dispatch: IStore['dispatch'];
|
||||
|
||||
/**
|
||||
* The display name to display for the local participant.
|
||||
*/
|
||||
@@ -204,13 +209,11 @@ class ProfileTab extends AbstractDialogTab<IProps, any> {
|
||||
if (this.props.authLogin) {
|
||||
sendAnalytics(createProfilePanelButtonEvent('logout.button'));
|
||||
|
||||
APP.store.dispatch(openLogoutDialog(
|
||||
() => APP.UI.emitEvent(UIEvents.LOGOUT)
|
||||
));
|
||||
this.props.dispatch(logout());
|
||||
} else {
|
||||
sendAnalytics(createProfilePanelButtonEvent('login.button'));
|
||||
|
||||
APP.UI.emitEvent(UIEvents.AUTH_CLICKED);
|
||||
this.props.dispatch(login());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,4 +249,4 @@ class ProfileTab extends AbstractDialogTab<IProps, any> {
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(styles)(translate(ProfileTab));
|
||||
export default withStyles(styles)(translate(connect()(ProfileTab)));
|
||||
|
||||
Reference in New Issue
Block a user