next fix for app.js

This commit is contained in:
oberon 2026-02-16 09:19:27 +01:00
parent 4f96b919be
commit b8b2aec67d
2 changed files with 9 additions and 11 deletions

View File

@ -21,12 +21,11 @@ document.addEventListener('DOMContentLoaded', () => {
}
// ── Config & globale Sounds aus Template ──────────────────────────────────
const config = {{ config | tojson | safe }};
const globalSounds = {{ global_sounds | tojson | safe }};
window.mkConfig = config; // global verfügbar
const config = window.mkConfig || {};
const globalSounds = window.mkGlobalSounds || [];
console.log("Config im JS:", config);
console.log("Globale Sounds:", globalSounds);
console.log("app.js verwendet config:", config);
console.log("app.js verwendet globalSounds:", globalSounds);
// ── Status-Anzeige ─────────────────────────────────────────────────────────
function updateStatus(connected, message = '') {

View File

@ -167,12 +167,11 @@
{% block scripts %}
<script>
// Config + globale Sounds direkt ins JS übergeben
const config = {{ config | tojson | safe }};
const globalSounds = {{ global_sounds | tojson | safe }};
window.mkConfig = config; // falls du es global brauchst
// Config + globale Sounds global verfügbar machen
window.mkConfig = {{ config | tojson | safe }};
window.mkGlobalSounds = {{ global_sounds | tojson | safe }};
console.log("Config im JS:", config);
console.log("Globale Sounds:", globalSounds);
console.log("window.mkConfig gesetzt:", window.mkConfig);
console.log("window.mkGlobalSounds:", window.mkGlobalSounds);
</script>
{% endblock %}