21 lines
826 B
JavaScript
21 lines
826 B
JavaScript
// static/js/app.js – MK Control Frontend – Haupt-Einstieg
|
||
|
||
document.addEventListener('DOMContentLoaded', () => {
|
||
console.log('MK Control Frontend gestartet');
|
||
|
||
// Module laden (in dieser Reihenfolge wichtig!)
|
||
initConfig(); // config & globalSounds bereitstellen
|
||
initStatus(); // Status-Badge & Reconnect
|
||
initConnect(); // Connect- & Reconnect-Button
|
||
initChannels(); // Kanäle rendern + Listener
|
||
initSoundboard(); // Soundboard-Buttons + Volume
|
||
initConnectionCheck(); // Hintergrund-Status-Polling
|
||
|
||
// Initialen Status setzen
|
||
updateStatus(false);
|
||
|
||
// Status-Check nur starten, wenn auf Steuerseite
|
||
if (document.getElementById('connect-btn')) {
|
||
// startConnectionCheck(); // wird jetzt von connect/reconnect aufgerufen
|
||
}
|
||
}); |