Merge pull request #9741 from jfsiebel/prevent-680-error-screen
Show correct screen when user leaves meeting
This commit is contained in:
commit
75cd8c2ea3
@ -7,7 +7,6 @@ import ErrorScreen from '/imports/ui/components/error-screen/component';
|
|||||||
import MeetingEnded from '/imports/ui/components/meeting-ended/component';
|
import MeetingEnded from '/imports/ui/components/meeting-ended/component';
|
||||||
import LoadingScreen from '/imports/ui/components/loading-screen/component';
|
import LoadingScreen from '/imports/ui/components/loading-screen/component';
|
||||||
import Settings from '/imports/ui/services/settings';
|
import Settings from '/imports/ui/services/settings';
|
||||||
import AudioManager from '/imports/ui/services/audio-manager';
|
|
||||||
import logger from '/imports/startup/client/logger';
|
import logger from '/imports/startup/client/logger';
|
||||||
import Users from '/imports/api/users';
|
import Users from '/imports/api/users';
|
||||||
import { Session } from 'meteor/session';
|
import { Session } from 'meteor/session';
|
||||||
@ -161,8 +160,8 @@ class Base extends Component {
|
|||||||
const { updateLoadingState } = this;
|
const { updateLoadingState } = this;
|
||||||
const stateControls = { updateLoadingState };
|
const stateControls = { updateLoadingState };
|
||||||
const { loading } = this.state;
|
const { loading } = this.state;
|
||||||
const codeError = Session.get('codeError');
|
|
||||||
const {
|
const {
|
||||||
|
codeError,
|
||||||
ejected,
|
ejected,
|
||||||
meetingExist,
|
meetingExist,
|
||||||
meetingHasEnded,
|
meetingHasEnded,
|
||||||
@ -176,14 +175,12 @@ class Base extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ejected) {
|
if (ejected) {
|
||||||
AudioManager.exitAudio();
|
|
||||||
return (<MeetingEnded code="403" />);
|
return (<MeetingEnded code="403" />);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meetingHasEnded && meetingIsBreakout) window.close();
|
if (meetingHasEnded && meetingIsBreakout) window.close();
|
||||||
|
|
||||||
if (((meetingHasEnded && !meetingIsBreakout)) || (codeError && (User && User.loggedOut))) {
|
if (((meetingHasEnded && !meetingIsBreakout)) || (codeError && (User && User.loggedOut))) {
|
||||||
AudioManager.exitAudio();
|
|
||||||
return (<MeetingEnded code={codeError} />);
|
return (<MeetingEnded code={codeError} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,10 +188,11 @@ class Base extends Component {
|
|||||||
// 680 is set for the codeError when the user requests a logout
|
// 680 is set for the codeError when the user requests a logout
|
||||||
if (codeError !== '680') {
|
if (codeError !== '680') {
|
||||||
logger.error({ logCode: 'startup_client_usercouldnotlogin_error' }, `User could not log in HTML5, hit ${codeError}`);
|
logger.error({ logCode: 'startup_client_usercouldnotlogin_error' }, `User could not log in HTML5, hit ${codeError}`);
|
||||||
|
return (<ErrorScreen code={codeError} />);
|
||||||
}
|
}
|
||||||
return (<ErrorScreen code={codeError} />);
|
return (<MeetingEnded code={codeError} />);
|
||||||
}
|
}
|
||||||
// this.props.annotationsHandler.stop();
|
|
||||||
return (<AppContainer {...this.props} baseControls={stateControls} />);
|
return (<AppContainer {...this.props} baseControls={stateControls} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,6 +362,8 @@ const BaseContainer = withTracker(() => {
|
|||||||
Session.set('openPanel', '');
|
Session.set('openPanel', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const codeError = Session.get('codeError');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
approved,
|
approved,
|
||||||
ejected,
|
ejected,
|
||||||
@ -379,6 +379,7 @@ const BaseContainer = withTracker(() => {
|
|||||||
meetingIsBreakout: AppService.meetingIsBreakout(),
|
meetingIsBreakout: AppService.meetingIsBreakout(),
|
||||||
subscriptionsReady: Session.get('subscriptionsReady'),
|
subscriptionsReady: Session.get('subscriptionsReady'),
|
||||||
loggedIn,
|
loggedIn,
|
||||||
|
codeError,
|
||||||
};
|
};
|
||||||
})(Base);
|
})(Base);
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { defineMessages, injectIntl } from 'react-intl';
|
import { defineMessages, injectIntl } from 'react-intl';
|
||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
import { Session } from 'meteor/session';
|
import { Session } from 'meteor/session';
|
||||||
|
import AudioManager from '/imports/ui/services/audio-manager';
|
||||||
import { styles } from './styles';
|
import { styles } from './styles';
|
||||||
|
|
||||||
const intlMessages = defineMessages({
|
const intlMessages = defineMessages({
|
||||||
@ -41,6 +42,7 @@ const defaultProps = {
|
|||||||
|
|
||||||
class ErrorScreen extends PureComponent {
|
class ErrorScreen extends PureComponent {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
AudioManager.exitAudio();
|
||||||
Meteor.disconnect();
|
Meteor.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { PureComponent } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { defineMessages, injectIntl } from 'react-intl';
|
import { defineMessages, injectIntl } from 'react-intl';
|
||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
@ -10,6 +10,7 @@ import Rating from './rating/component';
|
|||||||
import { styles } from './styles';
|
import { styles } from './styles';
|
||||||
import logger from '/imports/startup/client/logger';
|
import logger from '/imports/startup/client/logger';
|
||||||
import Users from '/imports/api/users';
|
import Users from '/imports/api/users';
|
||||||
|
import AudioManager from '/imports/ui/services/audio-manager';
|
||||||
|
|
||||||
const intlMessage = defineMessages({
|
const intlMessage = defineMessages({
|
||||||
410: {
|
410: {
|
||||||
@ -89,7 +90,7 @@ const propTypes = {
|
|||||||
code: PropTypes.string.isRequired,
|
code: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
class MeetingEnded extends React.PureComponent {
|
class MeetingEnded extends PureComponent {
|
||||||
static getComment() {
|
static getComment() {
|
||||||
const textarea = document.getElementById('feedbackComment');
|
const textarea = document.getElementById('feedbackComment');
|
||||||
const comment = textarea.value;
|
const comment = textarea.value;
|
||||||
@ -110,9 +111,8 @@ class MeetingEnded extends React.PureComponent {
|
|||||||
this.setSelectedStar = this.setSelectedStar.bind(this);
|
this.setSelectedStar = this.setSelectedStar.bind(this);
|
||||||
this.sendFeedback = this.sendFeedback.bind(this);
|
this.sendFeedback = this.sendFeedback.bind(this);
|
||||||
this.shouldShowFeedback = getFromUserSettings('bbb_ask_for_feedback_on_logout', Meteor.settings.public.app.askForFeedbackOnLogout);
|
this.shouldShowFeedback = getFromUserSettings('bbb_ask_for_feedback_on_logout', Meteor.settings.public.app.askForFeedbackOnLogout);
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
AudioManager.exitAudio();
|
||||||
Meteor.disconnect();
|
Meteor.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user