diff --git a/apps/ui/templates/garage.html b/apps/ui/templates/garage.html index b6026ea..0ddbf4e 100644 --- a/apps/ui/templates/garage.html +++ b/apps/ui/templates/garage.html @@ -394,20 +394,22 @@ label.className = 'toggle-label'; label.textContent = currentPower ? 'Ein' : 'Aus'; - // State display - const stateDisplay = document.createElement('div'); - stateDisplay.style.marginTop = '16px'; - stateDisplay.style.fontSize = '18px'; - stateDisplay.style.fontWeight = '600'; - stateDisplay.style.color = currentPower ? '#34c759' : '#666'; - stateDisplay.textContent = `Status: ${currentPower ? 'Eingeschaltet' : 'Ausgeschaltet'}`; - controlGroup.appendChild(toggleSwitch); controlGroup.appendChild(label); - controlGroup.appendChild(stateDisplay); card.appendChild(controlGroup); container.appendChild(card); + + // State display as separate card + const stateCard = document.createElement('div'); + stateCard.className = 'card'; + stateCard.style.textAlign = 'center'; + stateCard.innerHTML = ` +
+ Status: ${currentPower ? 'Eingeschaltet' : 'Ausgeschaltet'} +
+ `; + container.appendChild(stateCard); } function renderThreePhasePowerDisplay(container, device) { @@ -565,11 +567,15 @@ toggleSwitch.className = `toggle-switch ${isOn ? 'on' : ''}`; label.textContent = isOn ? 'Ein' : 'Aus'; - // Update state display - const stateDisplay = section.querySelector('.control-group div:last-child'); - if (stateDisplay) { - stateDisplay.style.color = isOn ? '#34c759' : '#666'; - stateDisplay.textContent = `Status: ${isOn ? 'Eingeschaltet' : 'Ausgeschaltet'}`; + // Update state display in separate card + const cards = section.querySelectorAll('.card'); + if (cards.length >= 3) { // Header, Control, State + const stateCard = cards[2]; + stateCard.innerHTML = ` +
+ Status: ${isOn ? 'Eingeschaltet' : 'Ausgeschaltet'} +
+ `; } } }