Use slim socketio again (this time with .map file) change socket behavior

This commit is contained in:
Patrick Jentsch
2020-03-26 17:32:26 +01:00
parent d6206bef34
commit 8bedbfeae5
4 changed files with 85 additions and 84 deletions

View File

@ -45,9 +45,16 @@
<script src="{{ url_for('static', filename='js/JSONPatch.js/jsonpatch.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/Dark_Reader/darkreader.js') }}"></script>
<script src="{{ url_for('static', filename='js/List.js/list.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/Socket.IO/socket.io.js') }}"></script>
<script src="{{ url_for('static', filename='js/Socket.IO/socket.io.slim.js') }}"></script>
<script src="{{ url_for('static', filename='js/nopaque.js') }}"></script>
<script src="{{ url_for('static', filename='js/nopaque.lists.js') }}"></script>
<script>
nopaque.user.isAuthenticated = {{ current_user.is_authenticated|tojson }};
nopaque.user.settings.darkMode = {{ (current_user.is_authenticated and current_user.is_dark)|tojson }};
{% for category, message in get_flashed_messages(with_categories=true) %}
nopaque.flashedMessages.push({category: {{ category|tojson }}, message: {{ message|tojson }}});
{% endfor %}
</script>
</head>
<body>
<header>
@ -88,7 +95,7 @@
{% endif %}
</ul>
<ul id="sidenav-main" class="sidenav sidenav-fixed hide">
<ul id="sidenav-main" class="sidenav sidenav-fixed{% if not current_user.is_authenticated %} hide{% endif %}">
<li><a href="{{ url_for('main.index') }}"><i class="material-icons">opacity</i>nopaque</a></li>
<li><a href="#"><i class="material-icons">linear_scale</i>Workflow</a></li>
<li><a href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a></li>
@ -220,18 +227,8 @@
<script src="{{ url_for('static', filename='js/Materialize/materialize.min.js') }}"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
{% if current_user.is_authenticated and current_user.is_dark %}
DarkReader.enable({"brightness": 150, "contrast": 100, "sepia": 0});
{% endif %}
{% for flashed_message in get_flashed_messages() %}
nopaque.toast("{{ flashed_message }}");
{% endfor %}
});
</script>
{% if current_user.is_authenticated %}
<script>
document.getElementById("sidenav-main").classList.remove("hide");
</script>
{% endif %}
</body>
</html>