diff sat_templates/templates/bulma/base/base.html @ 329:6a26c8a43d10

bulma (chat): fix chat: those change are done to have a minimal chat working, but it's really basic. A full-featured chat should come in a future version.
author Goffi <goffi@goffi.org>
date Fri, 07 May 2021 15:38:10 +0200
parents 34b8de7be336
children ff67c700405e
line wrap: on
line diff
--- a/sat_templates/templates/bulma/base/base.html	Sat May 01 18:47:35 2021 +0200
+++ b/sat_templates/templates/bulma/base/base.html	Fri May 07 15:38:10 2021 +0200
@@ -70,12 +70,22 @@
         <script>var csrf_token = "{{csrf_token}}"; var session_uuid="{{session_uuid}}";</script>
     {% endif %}
 
+    {# FIXME: websocket handling is to be replaced by Brython #}
+    {% if websocket is defined %}
+        {{ script.include('websocket', '') }}
+    {% endif %}
+
     {{ script.generate_scripts() }}
 
     {% for script in scripts %}
         <script{{ {'src': script.src, 'type': script.type} | xmlattr }}>{{script.content|safe}}</script>
     {% endfor %}
 
+    {# FIXME: websocket handling is to be replaced by Brython #}
+    {% if websocket is defined %}
+        <script>var socket=new WSHandler("{{websocket.url}}", "{{websocket.token}}", {{websocket.debug}});</script>
+    {% endif %}
+
     {% block favicon %}
         <link rel="icon" href="{{media_path}}icons/apps/64/sat.png">
     {% endblock favicon %}