From 10f6abfe1795e292d1742c52abdaad2d470d8d48 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 17 Jun 2019 18:47:20 +0100 Subject: [PATCH] Allow changing server if validation has failed Show the server config section if there's an error and fix an if case where we forgot to un-set the busy flag --- src/components/structures/auth/Registration.js | 6 +++++- src/components/views/auth/ServerConfig.js | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 20b13e4da9..662444379f 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -168,6 +168,8 @@ module.exports = React.createClass({ _replaceClient: async function(serverConfig) { this.setState({ errorText: null, + serverDeadError: null, + serverErrorIsFatal: false, // busy while we do liveness check (we need to avoid trying to render // the UI auth component while we don't have a matrix client) busy: true, @@ -429,7 +431,9 @@ module.exports = React.createClass({ // If we're on a different phase, we only show the server type selector, // which is always shown if we allow custom URLs at all. - if (PHASES_ENABLED && this.state.phase !== PHASE_SERVER_DETAILS) { + // (if there's a fatal server error, we need to show the full server + // config as the user may need to change servers to resolve the error). + if (PHASES_ENABLED && this.state.phase !== PHASE_SERVER_DETAILS && !this.state.serverErrorIsFatal) { return