Re-add logic for if no integ url is configured

pull/21833/head
David Baker 2019-07-10 15:27:33 +01:00
parent 0316aa11b7
commit f4be4ab271
1 changed files with 12 additions and 2 deletions

View File

@ -22,12 +22,22 @@ import { TermsNotSignedError } from '../Terms';
export async function showIntegrationsManager(opts) {
const IntegrationsManager = sdk.getComponent("views.settings.IntegrationsManager");
let props = {};
if (ScalarAuthClient.isPossible()) {
props.loading = true;
} else {
props.configured = false;
}
const close = Modal.createTrackedDialog(
'Integrations Manager', '', IntegrationsManager, { loading: true }, "mx_IntegrationsManager",
'Integrations Manager', '', IntegrationsManager, props, "mx_IntegrationsManager",
).close;
if (!ScalarAuthClient.isPossible()) {
return;
}
const scalarClient = new ScalarAuthClient();
let props;
try {
await scalarClient.connect();
if (!scalarClient.hasCredentials()) {