Added air temps to day tabs. Changed cabin sensitivity.
This commit is contained in:
fraxle
2026-06-26 12:46:54 +01:00
parent ba0e0b1da2
commit 4d98df43d7
3 changed files with 22 additions and 11 deletions
+17 -6
View File
@@ -313,6 +313,9 @@ export function DayTabs({
const utcipVals = d.rows.map(r => r.utciAdj).filter(v => isFinite(v));
const dayHi = utcipVals.length ? Math.round(Math.max(...utcipVals)) : null;
const dayLo = utcipVals.length ? Math.round(Math.min(...utcipVals)) : null;
const airVals = d.rows.map(r => r.Ta).filter(v => isFinite(v));
const airHi = airVals.length ? Math.round(Math.max(...airVals)) : null;
const airLo = airVals.length ? Math.round(Math.min(...airVals)) : null;
// Day-tab weather icon - use core daylight rows (elev > 10°) where
// available, falling back to any above-horizon rows, then all rows.
@@ -399,18 +402,26 @@ export function DayTabs({
</span>
${dayHi !== null && html`
<span style=${{
display: 'block',
display: 'flex',
alignItems: 'stretch',
justifyContent: 'center',
gap: '6px',
fontFamily: 'Manrope, sans-serif',
fontStyle: 'normal',
fontSize: '13px',
marginTop: '0px',
letterSpacing: 0,
textTransform: 'none',
textShadow: '0 0 14px rgba(255,255,255,0.85), 0 0 11px rgba(255,255,255,0.7), 0 0 8px rgba(255,255,255,0.6), 0 0 5px rgba(255,255,255,0.5)',
marginTop: '2px',
}}>
<span style=${{ color: '#c0622a', fontWeight: 800 }}>${dayHi}°</span>
<span style=${{ opacity: 0.5 }}> / </span>
<span style=${{ color: '#3a6080', fontWeight: 800 }}>${dayLo}°</span>
<span style=${{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '1px' }}>
<span style=${{ color: '#c0622a', fontWeight: 800, fontSize: '14px', lineHeight: 1.1 }}>${dayHi}°</span>
${airHi !== null && html`<span style=${{ color: '#c0622a', fontWeight: 600, fontSize: '11px', lineHeight: 1.1 }}>${airHi}°</span>`}
</span>
<span style=${{ width: '1px', background: 'rgba(0,0,0,0.15)', margin: '2px 0', alignSelf: 'stretch' }}></span>
<span style=${{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '1px' }}>
<span style=${{ color: '#3a6080', fontWeight: 800, fontSize: '14px', lineHeight: 1.1 }}>${dayLo}°</span>
${airLo !== null && html`<span style=${{ color: '#3a6080', fontWeight: 600, fontSize: '11px', lineHeight: 1.1 }}>${airLo}°</span>`}
</span>
</span>`}
</button>`;
})}
+1 -1
View File
@@ -521,7 +521,7 @@ export function computeGlanceSummary(todayRows, profile, variant, skinType, cols
icon: '🌡',
label: 'Peak cabin temp',
value: peakCabin ? `${Math.round(peakCabin.vehicleT)}° at ${hhmm(peakCabin.iso)}` : '-',
alert: !!(peakCabin && peakCabin.vehicleT >= 35),
alert: !!(peakCabin && peakCabin.vehicleT > 31.5),
}, {
icon: '🧒',
label: 'Children/pets in car',