next fix for app.js
This commit is contained in:
parent
4f96b919be
commit
b8b2aec67d
@ -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 = '') {
|
||||
|
||||
@ -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 %}
|
||||
Loading…
x
Reference in New Issue
Block a user