Commit aa0a7c72 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: add compatibility for Firefox in private mode

Firefox disables IndexedDB in private mode.
Use memory storage in such case. This allows user to have a normal erp5js usage until the window is reloaded.
parent 72046a82
...@@ -387,8 +387,14 @@ ...@@ -387,8 +387,14 @@
.push(function (result) { .push(function (result) {
setting_gadget = result; setting_gadget = result;
return setting_gadget.createJio({ return setting_gadget.createJio({
type: "fallback",
sub_storage: {
type: "indexeddb", type: "indexeddb",
database: "setting" database: "setting"
},
fallback_storage: {
type: "memory"
}
}); });
}) })
.push(function () { .push(function () {
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.35438.36279.54937</string> </value> <value> <string>994.54001.34070.45704</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>1630683787.8</float> <float>1631797534.82</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -1068,9 +1068,15 @@ ...@@ -1068,9 +1068,15 @@
gadget.props.jio_gadget = jio_gadget; gadget.props.jio_gadget = jio_gadget;
return jio_gadget.createJio({ return jio_gadget.createJio({
type: "sha", type: "sha",
sub_storage: {
type: "fallback",
sub_storage: { sub_storage: {
type: "indexeddb", type: "indexeddb",
database: "selection" database: "selection"
},
fallback_storage: {
type: "memory"
}
} }
}); });
}); });
...@@ -1081,9 +1087,15 @@ ...@@ -1081,9 +1087,15 @@
gadget.props.jio_navigation_gadget = jio_gadget; gadget.props.jio_navigation_gadget = jio_gadget;
return jio_gadget.createJio({ return jio_gadget.createJio({
type: "query", type: "query",
sub_storage: {
type: "fallback",
sub_storage: { sub_storage: {
type: "indexeddb", type: "indexeddb",
database: "navigation_history" database: "navigation_history"
},
fallback_storage: {
type: "memory"
}
} }
}); });
}); });
...@@ -1093,8 +1105,14 @@ ...@@ -1093,8 +1105,14 @@
.push(function (jio_gadget) { .push(function (jio_gadget) {
gadget.props.jio_state_gadget = jio_gadget; gadget.props.jio_state_gadget = jio_gadget;
return jio_gadget.createJio({ return jio_gadget.createJio({
type: "fallback",
sub_storage: {
type: "indexeddb", type: "indexeddb",
database: "document_state" database: "document_state"
},
fallback_storage: {
type: "memory"
}
}); });
}); });
}()), }()),
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>991.63596.55319.30839</string> </value> <value> <string>994.53726.18332.61542</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1620663195.92</float> <float>1631797697.91</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