Initial setup history; Removing baseURL

This commit is contained in:
James Barnsley
2019-01-24 16:37:10 +13:00
parent 05d3d0c549
commit 5e6a9567e8
11 changed files with 18330 additions and 12628 deletions

View File

@ -35,6 +35,7 @@ class InitialSetup extends React.Component{
handleSubmit(e){
e.preventDefault();
var self = this;
// Force local username change, even if remote connection absent/failed
@ -52,18 +53,19 @@ class InitialSetup extends React.Component{
this.setState({saving: true});
// Wait a jiffy to allow changes to apply to store
setTimeout(function(){
setTimeout(() => {
// We've changed a connection setting, so need to reload
if (self.state.host !== self.props.host || self.state.port !== self.props.port){
// We've changed a connection setting, so need to reload
if (self.state.host !== self.props.host || self.state.port !== self.props.port){
window.location = '/';
window.location = global.baseURL;
// Safe to just close modal
} else {
this.props.history.push(global.baseURL);
}
}, 200);
// Safe to just close modal
} else {
self.props.history.push('/');
}
},
200
);
return false;
}