Intercept cases of disabled/no integration managers

We already intercepted most of the cases where no integration manager was present, though there was a bug in many components where openAll() would be called regardless of an integration manager being available.

The integration manager being disabled by the user is handled in the IntegrationManager classes rather than on click because we have quite a few calls to these functions. The StickerPicker is an exception because it does slightly different behaviour.

This also removes the old "no integration manager configured" state from the IntegrationManager component as it is now replaced by a dialog.
This commit is contained in:
Travis Ralston 2019-11-20 20:40:39 -07:00
parent 81c9bdd9f3
commit 94fed922cf
7 changed files with 147 additions and 22 deletions

View file

@ -23,9 +23,6 @@ import dis from '../../../dispatcher';
export default class IntegrationManager extends React.Component {
static propTypes = {
// false to display an error saying that there is no integration manager configured
configured: PropTypes.bool.isRequired,
// false to display an error saying that we couldn't connect to the integration manager
connected: PropTypes.bool.isRequired,
@ -40,7 +37,6 @@ export default class IntegrationManager extends React.Component {
};
static defaultProps = {
configured: true,
connected: true,
loading: false,
};
@ -70,15 +66,6 @@ export default class IntegrationManager extends React.Component {
};
render() {
if (!this.props.configured) {
return (
<div className='mx_IntegrationManager_error'>
<h3>{_t("No integration manager configured")}</h3>
<p>{_t("This Riot instance does not have an integration manager configured.")}</p>
</div>
);
}
if (this.props.loading) {
const Spinner = sdk.getComponent("elements.Spinner");
return (