actually use the config file for default HS and IS URLs...
parent
1188c4c69f
commit
379fed813e
|
@ -25,10 +25,9 @@ var Loader = require("react-loader");
|
||||||
|
|
||||||
var RegisterController = require('../../../../controllers/templates/Register')
|
var RegisterController = require('../../../../controllers/templates/Register')
|
||||||
|
|
||||||
module.exports = React.createClass({
|
var config = require('../../../../../config.json');
|
||||||
DEFAULT_HS_URL: 'https://matrix.org',
|
|
||||||
DEFAULT_IS_URL: 'https://vector.im',
|
|
||||||
|
|
||||||
|
module.exports = React.createClass({
|
||||||
displayName: 'Register',
|
displayName: 'Register',
|
||||||
mixins: [RegisterController],
|
mixins: [RegisterController],
|
||||||
|
|
||||||
|
@ -39,8 +38,8 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
this.customHsUrl = this.DEFAULT_HS_URL;
|
this.customHsUrl = config.default_hs_url;
|
||||||
this.customIsUrl = this.DEFAULT_IS_URL;
|
this.customIsUrl = config.default_is_url;
|
||||||
},
|
},
|
||||||
|
|
||||||
getRegFormVals: function() {
|
getRegFormVals: function() {
|
||||||
|
@ -56,7 +55,7 @@ module.exports = React.createClass({
|
||||||
if (this.state.serverConfigVisible) {
|
if (this.state.serverConfigVisible) {
|
||||||
return this.customHsUrl;
|
return this.customHsUrl;
|
||||||
} else {
|
} else {
|
||||||
return this.DEFAULT_HS_URL;
|
return config.default_hs_url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -64,7 +63,7 @@ module.exports = React.createClass({
|
||||||
if (this.state.serverConfigVisible) {
|
if (this.state.serverConfigVisible) {
|
||||||
return this.customIsUrl;
|
return this.customIsUrl;
|
||||||
} else {
|
} else {
|
||||||
return this.DEFAULT_IS_URL;
|
return config.default_is_url;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue