From a4a85dc54179cb03554daad1e76678aa8fe99906 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 11 Sep 2019 23:02:52 +0100 Subject: [PATCH] Hide the change HS url button on SSO login flow if custom urls disabled Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/auth/Login.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 0317462ebd..ad77ed49a5 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -567,6 +567,12 @@ module.exports = createReactClass({ _renderSsoStep: function(url) { const SignInToText = sdk.getComponent('views.auth.SignInToText'); + + let onEditServerDetailsClick = null; + // If custom URLs are allowed, wire up the server details edit link. + if (PHASES_ENABLED && !SdkConfig.get()['disable_custom_urls']) { + onEditServerDetailsClick = this.onEditServerDetailsClick; + } // XXX: This link does *not* have a target="_blank" because single sign-on relies on // redirecting the user back to a URI once they're logged in. On the web, this means // we use the same window and redirect back to riot. On electron, this actually @@ -578,7 +584,7 @@ module.exports = createReactClass({ return (