mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-22 13:53:48 +01:00
better handling when device is connected to wifi-box acces point
This commit is contained in:
parent
4d77ab2ffe
commit
f499693465
@ -18,7 +18,7 @@ export default class Doodle3DManager extends EventDispatcher {
|
||||
wifiboxid: 'Node JS Server',
|
||||
localip: '127.0.0.1:3000'
|
||||
}*/];
|
||||
this.checkNonServerBoxes = false;
|
||||
this.checkNonServerBoxes = true;
|
||||
|
||||
this.autoUpdate = false;
|
||||
}
|
||||
@ -39,12 +39,11 @@ export default class Doodle3DManager extends EventDispatcher {
|
||||
}
|
||||
}
|
||||
async _checkNew() {
|
||||
let boxes;
|
||||
let boxes = [];
|
||||
try {
|
||||
boxes = await rest.get(`${ this.api }list.php`);
|
||||
} catch(error) {
|
||||
console.warn('fail connecting to Doodle3D server');
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.checkNonServerBoxes) boxes = boxes.concat(this.nonServerBoxes);
|
||||
|
Loading…
Reference in New Issue
Block a user