Commit bca2291f authored by Romain Courteaud's avatar Romain Courteaud

xxx offline

parent d8ab35a2
......@@ -904,21 +904,21 @@
render_timestamp: new Date().getTime()
})
.push(undefined, function (error) {
// couscous
if (!navigator.onLine) {
console.log('not online');
return gadget.changeState({
error_text: 'Offline',
// request_error_text: request_error_text,
url: undefined
})
return route(gadget, 'translation_gadget', 'translate',
['You are offline.'])
.push(function (message) {
return route(gadget, "notification", 'notify',
[{
"message": message,
"status": "error"
}]);
})
.push(function () {
return rJS.loopEventListener(window, 'online', false,
function backOnline() {
console.log('let reload');
return gadget.render(route_result, keep_message);
// return location.reload();
});
function backOnline() {
return location.reload();
});
});
}
throw error;
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>993.36177.33163.46728</string> </value>
<value> <string>993.37256.4522.58726</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1626796612.69</float>
<float>1626860658.98</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment