v0.6.6
This commit is contained in:
+7
-1
@@ -1439,7 +1439,13 @@ document.addEventListener('click', async event => {
|
||||
return;
|
||||
}
|
||||
if (action === 'house-preset') {
|
||||
try { const result=await api('/api/house/preset',{method:'POST',body:{preset:button.dataset.value}}); app.zones=result.zones||app.zones; renderHouseClimate(); renderZones(); scheduleControlPlanLoad(); toast(tr('house.presetUpdated')); }
|
||||
try {
|
||||
const result=await api('/api/house/preset',{method:'POST',body:{preset:button.dataset.value}});
|
||||
app.settings=result.settings||app.settings; app.zones=result.zones||app.zones; app.devices=result.devices||app.devices;
|
||||
renderAll(); scheduleControlPlanLoad();
|
||||
const failed=Array.isArray(result.failed)?result.failed.length:0;
|
||||
if(failed) toast(tr('house.powerPartial',{count:failed}),true); else toast(tr('house.presetUpdated'));
|
||||
}
|
||||
catch(error){ toast(error.message,true); } return;
|
||||
}
|
||||
if (action === 'zone-temperature') { const zone=app.zones.find(v=>v.id===button.dataset.id); if(zone) { const base=Number(zone.manual_setpoint ?? zone.effective_setpoint ?? zone.setpoint); queueZoneTemperature(zone, base+Number(button.dataset.delta)); } return; }
|
||||
|
||||
+2
-2
@@ -37,11 +37,11 @@
|
||||
<div class="hero-temp" id="heroTemperature">--<small>°C</small></div>
|
||||
</div>
|
||||
<div class="metrics" id="metrics"></div>
|
||||
<div class="panel house-climate" id="houseClimate"></div>
|
||||
<div class="panel house-power-panel">
|
||||
<div><span class="eyebrow" data-i18n="house.powerAllEyebrow">Global power</span><h3 data-i18n="house.powerAllTitle">All air conditioners</h3><p data-i18n="house.powerAllHint">Direct power control for all enabled units, independent from thermostat presets.</p></div>
|
||||
<div><span class="eyebrow" data-i18n="house.powerAllEyebrow">Global power</span><h3 data-i18n="house.powerAllTitle">All air conditioners</h3><p data-i18n="house.powerAllHint">Master power for all enabled units. Whole-house mode or profile selection automatically switches it back on.</p></div>
|
||||
<div class="house-power-actions"><button id="housePowerOn" type="button" class="secondary" data-action="house-power" data-value="true" data-i18n="house.powerOnAll">Turn all on</button><button id="housePowerOff" type="button" class="secondary" data-action="house-power" data-value="false" data-i18n="house.powerOffAll">Turn all off</button></div>
|
||||
</div>
|
||||
<div class="panel house-climate" id="houseClimate"></div>
|
||||
<div class="section-heading"><div><span class="eyebrow" data-i18n="plan.eyebrow">Control plan</span><h2 data-i18n="plan.title">What happens next</h2></div></div>
|
||||
<div class="automation-plan-grid" id="controlPlan"></div>
|
||||
<div class="section-heading"><div><span class="eyebrow" data-i18n="nav.zones">Zones</span><h2 data-i18n="dashboard.quickThermostats">Quick thermostats</h2></div></div>
|
||||
|
||||
+3
-3
@@ -298,7 +298,7 @@ legend { padding: 0 5px; color: var(--muted); font-size: 11px; }
|
||||
.mode-row, .fan-row, .preset-row { scrollbar-width: none; }
|
||||
.mode-row::-webkit-scrollbar, .fan-row::-webkit-scrollbar, .preset-row::-webkit-scrollbar { display: none; }
|
||||
|
||||
.house-climate { display: grid; gap: 16px; margin: -15px 0 12px; }
|
||||
.house-climate { display: grid; gap: 16px; margin: 0 0 12px; }
|
||||
.house-climate-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
||||
.house-climate-head h3 { margin: 2px 0 4px; font-size: 20px; }
|
||||
.house-climate-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
|
||||
@@ -325,7 +325,7 @@ legend { padding: 0 5px; color: var(--muted); font-size: 11px; }
|
||||
.plan-loading { grid-column: 1/-1; padding: 18px; color: var(--muted); }
|
||||
.house-mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
|
||||
.house-mode-row button { min-height: 44px; color: var(--muted); background: var(--surface-muted); }
|
||||
.house-power-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 34px; }
|
||||
.house-power-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -15px 0 12px; }
|
||||
.house-power-panel h3 { margin: 2px 0 4px; font-size: 18px; }
|
||||
.house-power-panel p { margin: 0; max-width: 650px; color: var(--muted); font-size: 12px; line-height: 1.45; }
|
||||
.house-power-actions { display: flex; flex: 0 0 auto; gap: 8px; }
|
||||
@@ -360,7 +360,7 @@ legend { padding: 0 5px; color: var(--muted); font-size: 11px; }
|
||||
.warning-note { color: var(--warning); }
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.house-climate { margin-top: -20px; }
|
||||
.house-power-panel { margin-top: -20px; }
|
||||
.house-climate-head { align-items: flex-start; }
|
||||
.house-climate-head p { max-width: 220px; }
|
||||
.house-power-panel { align-items: stretch; flex-direction: column; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const CACHE = 'gree-controller-v065';
|
||||
const CACHE = 'gree-controller-v066';
|
||||
const SCOPE = new URL(self.registration.scope).pathname.replace(/\/$/, '');
|
||||
const path = value => `${SCOPE}${value.startsWith('/') ? value : `/${value}`}` || '/';
|
||||
const ASSETS = [path('/'), path('/styles.css'), path('/app.js'), path('/theme-init.js'), path('/favicon.svg'), path('/manifest.webmanifest'), path('/lang/index.json'), path('/lang/en.json')];
|
||||
|
||||
Reference in New Issue
Block a user