diff --git a/assets/js/app.js b/assets/js/app.js index a90f509..1317086 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -152,7 +152,7 @@ export function UTCIForecast() { farming: { label: 'Farming', icon: '🌾', - cols: { hour: true, air: true, rh: true, dew: true, wind: true, dir: true, cloud: true, sun: true, direct: false, diffuse: false, tmrt: false, delta: false, utci: true, uvA: false, uvB: false, burn: false, utciP: false, precip: true, soilT: true, soilT6: true, soilM: true, concreteT: false, vehicleT: false, indoorT: false, managedT: false }, + cols: { hour: true, air: true, rh: true, dew: true, wind: true, dir: true, cloud: true, sun: true, direct: false, diffuse: false, tmrt: false, delta: false, utci: false, uvA: false, uvB: false, burn: false, utciP: true, precip: true, soilT: true, soilT6: true, soilM: true, concreteT: false, vehicleT: false, indoorT: false, managedT: false }, }, outdoors: { label: 'Places', @@ -1316,6 +1316,17 @@ ${isPro && (activeProfile === 'custom' || FILTER_PROFILES[activeProfile].cols['a if (t < 50) return 'rgba(210, 70, 50,0.10)'; return 'rgba(160, 30, 30,0.10)'; }; + const tempBgStrong = (t) => { + if (t == null) return 'transparent'; + if (t < 0) return 'rgba(100,160,230,0.20)'; + if (t < 10) return 'rgba(140,200,200,0.20)'; + if (t < 18) return 'rgba(140,200,150,0.20)'; + if (t < 26) return 'rgba(100,190,100,0.20)'; + if (t < 32) return 'rgba(230,200, 80,0.20)'; + if (t < 40) return 'rgba(230,140, 50,0.20)'; + if (t < 50) return 'rgba(210, 70, 50,0.20)'; + return 'rgba(160, 30, 30,0.20)'; + }; const scaleBg = (v, min, max, rgb, maxAlpha = 0.14) => { if (v == null || isNaN(v)) return 'transparent'; if (v <= min) return 'transparent'; @@ -1408,15 +1419,15 @@ ${isPro && (activeProfile === 'custom' || FILTER_PROFILES[activeProfile].cols['a ${burnLabel(burnMins)} `} ${visibleCols.vehicleT && html` - 45 ? '#c0392b' : r.vehicleT != null && r.vehicleT > 35 ? '#e67e22' : '#7f8c8d', fontWeight: 'bold', background: tempBg(r.vehicleT) }}> + 45 ? '#c0392b' : r.vehicleT != null && r.vehicleT > 35 ? '#e67e22' : '#7f8c8d', fontWeight: 'bold', background: tempBgStrong(r.vehicleT) }}> ${r.vehicleT != null ? r.vehicleT.toFixed(1) : '—'} `} ${indoorMode === 'on' && !indoorManaged && html` - 32 ? '#c0392b' : r.indoorT != null && r.indoorT > 26 ? '#e67e22' : '#4a7a4a', fontWeight: 'bold', background: tempBg(r.indoorT) }}> + 32 ? '#c0392b' : r.indoorT != null && r.indoorT > 26 ? '#e67e22' : '#4a7a4a', fontWeight: 'bold', background: tempBgStrong(r.indoorT) }}> ${r.indoorT != null ? r.indoorT.toFixed(1) : '—'} `} ${indoorMode === 'on' && indoorManaged && html` - 32 ? '#c0392b' : r.managedT != null && r.managedT > 26 ? '#e67e22' : '#4a7a4a', fontWeight: 'bold', background: tempBg(r.managedT) }}> + 32 ? '#c0392b' : r.managedT != null && r.managedT > 26 ? '#e67e22' : '#4a7a4a', fontWeight: 'bold', background: tempBgStrong(r.managedT) }}> ${r.managedT != null ? r.managedT.toFixed(1) : '—'} `} ${visibleCols.precip && html`