mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Network ui tweaks
This commit is contained in:
parent
200052dae0
commit
a0b5c92b2f
@ -47,7 +47,7 @@ function SettingsWindow() {
|
|||||||
// because the webserver needs time to switch
|
// because the webserver needs time to switch
|
||||||
// this time is multiplied 3 times after access point creation
|
// this time is multiplied 3 times after access point creation
|
||||||
this.retrieveNetworkStatusDelay; // setTimout delay
|
this.retrieveNetworkStatusDelay; // setTimout delay
|
||||||
this.retrieveNetworkStatusDelayTime = 3000;
|
this.retrieveNetworkStatusDelayTime = 4000;
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
SettingsWindow.SETTINGS_LOADED = "settingsLoaded";
|
SettingsWindow.SETTINGS_LOADED = "settingsLoaded";
|
||||||
@ -316,10 +316,13 @@ function SettingsWindow() {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: self.timeoutTime,
|
timeout: self.timeoutTime,
|
||||||
success: function(response){
|
success: function(response){
|
||||||
console.log("Settings:updateNetworkStatus response: ",response);
|
console.log("Settings:retrieveNetworkStatus response: ",response);
|
||||||
if(response.status == "error") {
|
if(response.status == "error" || response.data.ssid == "") {
|
||||||
clearTimeout(self.retryRetrieveNetworkStatusDelay);
|
//clearTimeout(self.retryRetrieveNetworkStatusDelay);
|
||||||
self.retryRetrieveNetworkStatusDelay = setTimeout(function() { self.retrieveNetworkStatus() },self.retryDelay); // retry after delay
|
//self.retryRetrieveNetworkStatusDelay = setTimeout(function() { self.retrieveNetworkStatus() },self.retryDelay); // retry after delay
|
||||||
|
|
||||||
|
self.setClientModeState(SettingsWindow.NOT_CONNECTED);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var data = response.data;
|
var data = response.data;
|
||||||
switch(data.mode) {
|
switch(data.mode) {
|
||||||
@ -359,7 +362,7 @@ function SettingsWindow() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).fail(function() {
|
}).fail(function() {
|
||||||
console.log("Settings:updateNetworkStatus: failed");
|
console.log("Settings:retrieveNetworkStatus: failed");
|
||||||
clearTimeout(self.retryRetrieveNetworkStatusDelay);
|
clearTimeout(self.retryRetrieveNetworkStatusDelay);
|
||||||
self.retryRetrieveNetworkStatusDelay = setTimeout(function() { self.retrieveNetworkStatus() },self.retryDelay); // retry after delay
|
self.retryRetrieveNetworkStatusDelay = setTimeout(function() { self.retrieveNetworkStatus() },self.retryDelay); // retry after delay
|
||||||
});
|
});
|
||||||
@ -415,7 +418,8 @@ function SettingsWindow() {
|
|||||||
if(self.selectedNetwork == undefined) return;
|
if(self.selectedNetwork == undefined) return;
|
||||||
postData = {
|
postData = {
|
||||||
ssid:self.selectedNetwork,
|
ssid:self.selectedNetwork,
|
||||||
phrase:self.form.find("#password").val()
|
phrase:self.form.find("#password").val(),
|
||||||
|
recreate:true
|
||||||
}
|
}
|
||||||
console.log(" postData: ",postData);
|
console.log(" postData: ",postData);
|
||||||
if (communicateWithWifibox) {
|
if (communicateWithWifibox) {
|
||||||
|
Loading…
Reference in New Issue
Block a user