Commit 71e46cd2 authored by Romain Courteaud's avatar Romain Courteaud

XXX erp5_web_renderjs_ui: offline support

parent 59301e8d
...@@ -906,16 +906,24 @@ ...@@ -906,16 +906,24 @@
.push(undefined, function (error) { .push(undefined, function (error) {
// couscous // couscous
if (!navigator.onLine) { if (!navigator.onLine) {
window.addEventListener('online', console.log('not online');
function backOnline() { return gadget.changeState({
return location.reload(); error_text: 'Offline',
}); // request_error_text: request_error_text,
return; url: undefined
})
.push(function () {
return rJS.loopEventListener(window, 'online', false,
function backOnline() {
console.log('let reload');
return gadget.render(route_result, keep_message);
// return location.reload();
});
});
} }
throw error; throw error;
}) })
.push(undefined, function (error) { .push(undefined, function (error) {
return displayError(gadget, error); return displayError(gadget, error);
}); });
}) })
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>993.36084.15186.27323</string> </value> <value> <string>993.36177.33163.46728</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1626790595.79</float> <float>1626796612.69</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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