diff libervia/web/pages/_browser/cache.py @ 1619:a2cd4222c702

browser: Updates for new design: This patch add code to handle the new design for chat. New bridge method are used to invite users to MUC or get list of occupants. A new modules is used for components, with a first one for collapsible cards. rel 457
author Goffi <goffi@goffi.org>
date Sat, 12 Apr 2025 00:21:45 +0200
parents 9b451115e726
children
line wrap: on
line diff
--- a/libervia/web/pages/_browser/cache.py	Sat Oct 26 23:07:01 2024 +0200
+++ b/libervia/web/pages/_browser/cache.py	Sat Apr 12 00:21:45 2025 +0200
@@ -2,6 +2,7 @@
 from browser.local_storage import storage
 from dialog import notification
 from bridge import Bridge, AsyncBridge
+import javascript
 import json
 
 log.warning = log.warn
@@ -42,7 +43,9 @@
 
     def update(self):
         log.debug(f"updating: {self._cache}")
-        storage['libervia_cache'] = json.dumps(self._cache)
+        # FIXME: workaround in Brython 3.13.0
+        # storage['libervia_cache'] = json.dumps(self._cache)
+        storage['libervia_cache'] = javascript.JSON.stringify(self._cache)
         log.debug("cache stored")
 
     def _store_if_complete(self):