5.0.3
The Week Ahead - Best Times Out
This commit is contained in:
+9
-5
@@ -198,7 +198,9 @@ export function deriveProfileMain(activeProfile, outdoorsVariant) {
|
||||
const mainField = isHomeOrOffice ? 'indoorT' : isVehicleProfile ? 'vehicleT' : isPetsProfile ? 'furSurfaceT' : 'utciAdj';
|
||||
// Pets pairs Fur Temp with PET Shade: the human Shade column is now a UTCI
|
||||
// felt number on a human comfort scale, which says nothing about a cat.
|
||||
const secondaryField = isHomeOrOffice ? 'managedT' : isPetsProfile ? 'petShadeT' : isVehicleProfile ? null : 'shadeT';
|
||||
// Vehicle/Driver pairs the cabin temp with plain air temperature, so the
|
||||
// gap between outside and inside the vehicle is visible at a glance.
|
||||
const secondaryField = isHomeOrOffice ? 'managedT' : isPetsProfile ? 'petShadeT' : isVehicleProfile ? 'Ta' : 'shadeT';
|
||||
const mainLabel = activeProfile === 'outdoors'
|
||||
? (OUTDOORS_VARIANTS[outdoorsVariant]?.name || FILTER_PROFILES.outdoors.label)
|
||||
: (FILTER_PROFILES[activeProfile]?.label || 'SunSoak');
|
||||
@@ -209,16 +211,18 @@ export function deriveProfileMain(activeProfile, outdoorsVariant) {
|
||||
// every field matches its column key except utciAdj, whose column is utciP.
|
||||
const colKey = mainField === 'utciAdj' ? 'utciP' : mainField;
|
||||
const mainMetric = COL_DESCRIPTIONS[colKey] || {};
|
||||
// Vehicle/Driver has no secondary column — the day tab shows only the cabin
|
||||
// temp for the config actually selected (vehicle type, ventilation, speed).
|
||||
const secondaryMetric = secondaryField ? (COL_DESCRIPTIONS[secondaryField] || {}) : null;
|
||||
// Same mapping for the secondary field: Ta's column key is `air`.
|
||||
const secColKey = secondaryField === 'Ta' ? 'air' : secondaryField;
|
||||
const secondaryMetric = secColKey ? (COL_DESCRIPTIONS[secColKey] || {}) : null;
|
||||
|
||||
return {
|
||||
isHomeOrOffice, isVehicleProfile, isPetsProfile,
|
||||
mainConfigKey, mainField, secondaryField, mainLabel,
|
||||
mainMetricLabel: mainMetric.title || '',
|
||||
mainMetricDesc: mainMetric.desc || '',
|
||||
secondaryMetricLabel: secondaryMetric?.title || '',
|
||||
// "Air Temperature" is too wide for the day-tab legend column, so the
|
||||
// vehicle pairing shows it as just "Air" (the tooltip still spells it out).
|
||||
secondaryMetricLabel: secColKey === 'air' ? 'Air' : (secondaryMetric?.title || ''),
|
||||
secondaryMetricDesc: secondaryMetric?.desc || '',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user