update for app.js
This commit is contained in:
+12
-3
@@ -86,9 +86,18 @@
|
||||
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Eigenes JS -->
|
||||
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
|
||||
<!-- Globale JavaScript-Module (immer laden) -->
|
||||
<script src="{{ url_for('static', filename='js/config.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/ui-status.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/ui-connect.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/ui-channels.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/ui-soundboard.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/connection-check.js') }}"></script>
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
<!-- Einstiegspunkt – lädt und initialisiert alles -->
|
||||
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
|
||||
|
||||
<!-- Seiten-spezifische Config setzen (nur wenn config existiert) -->
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
+18
-7
@@ -165,13 +165,24 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<!-- Seiten-spezifische Config setzen (nur wenn config existiert) -->
|
||||
{% block scripts %}
|
||||
<script>
|
||||
// Config + globale Sounds global verfügbar machen
|
||||
window.mkConfig = {{ config | tojson | safe }};
|
||||
window.mkGlobalSounds = {{ global_sounds | tojson | safe }};
|
||||
{% if config %}
|
||||
<script>
|
||||
// Config + globale Sounds global verfügbar machen (nur auf Seiten mit config)
|
||||
window.mkConfig = {{ config | tojson | safe }};
|
||||
window.mkGlobalSounds = {{ global_sounds | tojson | safe }};
|
||||
|
||||
console.log("window.mkConfig gesetzt:", window.mkConfig);
|
||||
console.log("window.mkGlobalSounds:", window.mkGlobalSounds);
|
||||
</script>
|
||||
console.log("base.html → mkConfig gesetzt:", window.mkConfig);
|
||||
console.log("base.html → mkGlobalSounds:", window.mkGlobalSounds);
|
||||
|
||||
// Module initialisieren (kann auch in app.js passieren, hier nur für Sicherheit)
|
||||
initConfig();
|
||||
initStatus();
|
||||
initConnect();
|
||||
initChannels();
|
||||
initSoundboard();
|
||||
// connection-check wird von connect/reconnect aufgerufen
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user