This commit is contained in:
Mateusz Gruszczyński
2026-08-30 23:00:29 +02:00
parent 6465ba1125
commit 4054fe3f76
32 changed files with 3722 additions and 3272 deletions
+20
View File
@@ -0,0 +1,20 @@
let historyResizeTimer;
window.addEventListener('resize', () => { if (app.currentView === 'history') { clearTimeout(historyResizeTimer); historyResizeTimer=setTimeout(drawCurrentChartIfVisible,120); } });
window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', () => { if (app.theme === 'system') applyTheme(); });
if ('serviceWorker' in navigator) window.addEventListener('load', () => navigator.serviceWorker.register(withBase('/sw.js')).catch(()=>{}));
async function startApplication() {
observeTopbarHeight();
applyTheme();
await loadLanguages();
applyTranslations();
setupFormUx();
updateZoneSensorFields();
updateSchedulePresetField();
await loadBootstrap();
initRouter();
}
setInterval(updateLocalThermostatCountdowns, 1000);
setInterval(updateTemporaryThermostatCountdowns, 1000);
startApplication().catch(error => console.error('Application startup failed:', error));