v0.8.14-fix_css

This commit is contained in:
Mateusz Gruszczyński
2026-08-30 15:27:00 +02:00
parent 5c05eddb8f
commit 6465ba1125
3 changed files with 22 additions and 3 deletions
+19
View File
@@ -149,6 +149,24 @@ function updateTemporaryThermostatCountdowns() {
}
const haSensorLabel = entity => app.sensorAliases?.[entity] || app.settings?.home_assistant?.sensor_aliases?.[entity] || entity;
function syncTopbarHeight() {
const topbar = $('.topbar');
if (!topbar) return;
document.documentElement.style.setProperty('--topbar-height', `${Math.ceil(topbar.getBoundingClientRect().height)}px`);
}
function observeTopbarHeight() {
const topbar = $('.topbar');
if (!topbar) return;
syncTopbarHeight();
if ('ResizeObserver' in window) {
const observer = new ResizeObserver(syncTopbarHeight);
observer.observe(topbar);
} else {
window.addEventListener('resize', syncTopbarHeight);
}
}
function updateConnectionIndicator(status) {
app.connectionStatus = status || 'connecting';
const node = $('#connectionLabel');
@@ -3140,6 +3158,7 @@ window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', ()
if ('serviceWorker' in navigator) window.addEventListener('load', () => navigator.serviceWorker.register('/sw.js').catch(()=>{}));
async function startApplication() {
observeTopbarHeight();
applyTheme();
await loadLanguages();
applyTranslations();