Skip server details on registration with a default HS
If Riot has been configured with a `default_hs_url` (or `default_server_name`, which then sets a default HS URL), then skip the server details on registration by default. Fixes https://github.com/vector-im/riot-web/issues/8840
This commit is contained in:
parent
8b66b6bdb3
commit
fe141412b6
2 changed files with 17 additions and 2 deletions
|
@ -245,6 +245,17 @@ export default React.createClass({
|
|||
return this.state.defaultIsUrl || "https://vector.im";
|
||||
},
|
||||
|
||||
/**
|
||||
* Whether to skip the server details phase of registration and start at the
|
||||
* actual form.
|
||||
* @return {boolean}
|
||||
* If there was a configured default HS or default server name, skip the
|
||||
* the server details.
|
||||
*/
|
||||
skipServerDetailsForRegistration() {
|
||||
return !!this.state.defaultHsUrl;
|
||||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
SdkConfig.put(this.props.config);
|
||||
|
||||
|
@ -1891,6 +1902,7 @@ export default React.createClass({
|
|||
defaultServerDiscoveryError={this.state.defaultServerDiscoveryError}
|
||||
defaultHsUrl={this.getDefaultHsUrl()}
|
||||
defaultIsUrl={this.getDefaultIsUrl()}
|
||||
skipServerDetails={this.skipServerDetailsForRegistration()}
|
||||
brand={this.props.config.brand}
|
||||
customHsUrl={this.getCurrentHsUrl()}
|
||||
customIsUrl={this.getCurrentIsUrl()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue