v1.01 - Table tweaks

This commit is contained in:
fraxle
2026-05-16 11:58:06 +01:00
parent 7eba879acf
commit 5d371008e5
+15 -4
View File
@@ -152,7 +152,7 @@ export function UTCIForecast() {
farming: { farming: {
label: 'Farming', label: 'Farming',
icon: '🌾', 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: { outdoors: {
label: 'Places', label: 'Places',
@@ -1316,6 +1316,17 @@ ${isPro && (activeProfile === 'custom' || FILTER_PROFILES[activeProfile].cols['a
if (t < 50) return 'rgba(210, 70, 50,0.10)'; if (t < 50) return 'rgba(210, 70, 50,0.10)';
return 'rgba(160, 30, 30,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) => { const scaleBg = (v, min, max, rgb, maxAlpha = 0.14) => {
if (v == null || isNaN(v)) return 'transparent'; if (v == null || isNaN(v)) return 'transparent';
if (v <= min) return 'transparent'; if (v <= min) return 'transparent';
@@ -1408,15 +1419,15 @@ ${isPro && (activeProfile === 'custom' || FILTER_PROFILES[activeProfile].cols['a
${burnLabel(burnMins)} ${burnLabel(burnMins)}
</td>`} </td>`}
${visibleCols.vehicleT && html` ${visibleCols.vehicleT && html`
<td style=${{ color: r.vehicleT != null && r.vehicleT > 45 ? '#c0392b' : r.vehicleT != null && r.vehicleT > 35 ? '#e67e22' : '#7f8c8d', fontWeight: 'bold', background: tempBg(r.vehicleT) }}> <td style=${{ color: r.vehicleT != null && 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) : ''} ${r.vehicleT != null ? r.vehicleT.toFixed(1) : ''}
</td>`} </td>`}
${indoorMode === 'on' && !indoorManaged && html` ${indoorMode === 'on' && !indoorManaged && html`
<td style=${{ color: r.indoorT != null && r.indoorT > 32 ? '#c0392b' : r.indoorT != null && r.indoorT > 26 ? '#e67e22' : '#4a7a4a', fontWeight: 'bold', background: tempBg(r.indoorT) }}> <td style=${{ color: r.indoorT != null && 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) : ''} ${r.indoorT != null ? r.indoorT.toFixed(1) : ''}
</td>`} </td>`}
${indoorMode === 'on' && indoorManaged && html` ${indoorMode === 'on' && indoorManaged && html`
<td style=${{ color: r.managedT != null && r.managedT > 32 ? '#c0392b' : r.managedT != null && r.managedT > 26 ? '#e67e22' : '#4a7a4a', fontWeight: 'bold', background: tempBg(r.managedT) }}> <td style=${{ color: r.managedT != null && 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) : ''} ${r.managedT != null ? r.managedT.toFixed(1) : ''}
</td>`} </td>`}
${visibleCols.precip && html` ${visibleCols.precip && html`