You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Default to registration phase when custom URLs disabled
This commit is contained in:
@@ -560,7 +560,6 @@ module.exports = React.createClass({
|
|||||||
const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig");
|
const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig");
|
||||||
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
||||||
|
|
||||||
// TODO: May need to adjust the behavior of this config option
|
|
||||||
if (SdkConfig.get()['disable_custom_urls']) {
|
if (SdkConfig.get()['disable_custom_urls']) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
|
const customURLsAllowed = !SdkConfig.get()['disable_custom_urls'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
busy: false,
|
busy: false,
|
||||||
errorText: null,
|
errorText: null,
|
||||||
@@ -90,6 +92,8 @@ module.exports = React.createClass({
|
|||||||
serverType: null,
|
serverType: null,
|
||||||
hsUrl: this.props.customHsUrl,
|
hsUrl: this.props.customHsUrl,
|
||||||
isUrl: this.props.customIsUrl,
|
isUrl: this.props.customIsUrl,
|
||||||
|
// Phase of the overall registration dialog.
|
||||||
|
phase: customURLsAllowed ? PHASE_SERVER_DETAILS : PHASE_REGISTRATION,
|
||||||
flows: null,
|
flows: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -367,7 +371,6 @@ module.exports = React.createClass({
|
|||||||
const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig");
|
const ModularServerConfig = sdk.getComponent("auth.ModularServerConfig");
|
||||||
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
||||||
|
|
||||||
// TODO: May need to adjust the behavior of this config option
|
|
||||||
if (SdkConfig.get()['disable_custom_urls']) {
|
if (SdkConfig.get()['disable_custom_urls']) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user