mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-30 07:41:17 +01:00 
			
		
		
		
	actually use the config file for default HS and IS URLs...
This commit is contained in:
		
							parent
							
								
									8cd6d70c0a
								
							
						
					
					
						commit
						435a9cd9e4
					
				| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user