mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Merge pull request #3458 from matrix-org/t3chguy/register_disable_no_custom_url_spinner
Don't show spinner if registration is disabled
This commit is contained in:
commit
54643d28d4
2 changed files with 8 additions and 2 deletions
|
@ -238,11 +238,15 @@ module.exports = createReactClass({
|
||||||
} else if (e.httpStatus === 403 && e.errcode === "M_UNKNOWN") {
|
} else if (e.httpStatus === 403 && e.errcode === "M_UNKNOWN") {
|
||||||
this.setState({
|
this.setState({
|
||||||
errorText: _t("Registration has been disabled on this homeserver."),
|
errorText: _t("Registration has been disabled on this homeserver."),
|
||||||
|
// add empty flows array to get rid of spinner
|
||||||
|
flows: [],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("Unable to query for supported registration methods.", e);
|
console.log("Unable to query for supported registration methods.", e);
|
||||||
this.setState({
|
this.setState({
|
||||||
errorText: _t("Unable to query for supported registration methods."),
|
errorText: _t("Unable to query for supported registration methods."),
|
||||||
|
// add empty flows array to get rid of spinner
|
||||||
|
flows: [],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,7 +546,7 @@ module.exports = createReactClass({
|
||||||
return <div className="mx_AuthBody_spinner">
|
return <div className="mx_AuthBody_spinner">
|
||||||
<Spinner />
|
<Spinner />
|
||||||
</div>;
|
</div>;
|
||||||
} else {
|
} else if (this.state.flows.length) {
|
||||||
let onEditServerDetailsClick = null;
|
let onEditServerDetailsClick = null;
|
||||||
// If custom URLs are allowed and we haven't selected the Free server type, wire
|
// If custom URLs are allowed and we haven't selected the Free server type, wire
|
||||||
// up the server details edit link.
|
// up the server details edit link.
|
||||||
|
|
|
@ -71,7 +71,9 @@ describe('Registration', function() {
|
||||||
|
|
||||||
// Set non-empty flows & matrixClient to get past the loading spinner
|
// Set non-empty flows & matrixClient to get past the loading spinner
|
||||||
root.setState({
|
root.setState({
|
||||||
flows: [],
|
flows: [{
|
||||||
|
stages: [],
|
||||||
|
}],
|
||||||
matrixClient: {},
|
matrixClient: {},
|
||||||
busy: false,
|
busy: false,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue