This commit is contained in:
Mateusz Gruszczyński
2026-09-17 08:52:02 +02:00
parent ff4f2b60e7
commit b7846c3b9f
87 changed files with 3783 additions and 1418 deletions
+26
View File
@@ -0,0 +1,26 @@
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 && !APP_BASE.startsWith('/api/hassio_ingress/')) window.addEventListener('load', () => navigator.serviceWorker.register(withBase('/sw.js')).catch(() => { }));
async function startApplication() {
try {
hydrateUiIcons();
observeTopbarHeight();
applyTheme();
await loadLanguages();
applyTranslations();
} finally {
document.documentElement.classList.remove('i18n-loading');
}
setupFormUx();
updateZoneSensorFields();
updateSchedulePresetField();
await loadBootstrap();
initRouter();
}
setInterval(updateLocalThermostatCountdowns, 1000);
setInterval(updateTemporaryThermostatCountdowns, 1000);
setInterval(updateCompressorQueueCountdowns, 1000);
startApplication().catch(error => console.error('Application startup failed:', error));