3.5.8
Day tab labels
This commit is contained in:
+21
-1
@@ -192,7 +192,27 @@ export function deriveProfileMain(activeProfile, outdoorsVariant) {
|
||||
const mainLabel = activeProfile === 'outdoors'
|
||||
? (OUTDOORS_VARIANTS[outdoorsVariant]?.name || FILTER_PROFILES.outdoors.label)
|
||||
: (FILTER_PROFILES[activeProfile]?.label || 'SunSoak');
|
||||
return { isHomeOrOffice, isVehicleProfile, isPetsProfile, mainConfigKey, mainField, secondaryField, mainLabel };
|
||||
|
||||
// Human names for the two numbers stacked in each day tab, so the label
|
||||
// column beside the strip can say what they are. Pulled from
|
||||
// COL_DESCRIPTIONS so they never drift from the table column tooltips —
|
||||
// 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 small number is a live
|
||||
// re-run of the cabin model with ventilation forced on (see DayTabs).
|
||||
const secondaryMetric = isVehicleProfile
|
||||
? { title: 'Windows Open', desc: 'The same vehicle interior estimate, recalculated with the windows open — how much cooler the cabin would run if it were ventilated.' }
|
||||
: (secondaryField ? (COL_DESCRIPTIONS[secondaryField] || {}) : null);
|
||||
|
||||
return {
|
||||
isHomeOrOffice, isVehicleProfile, isPetsProfile,
|
||||
mainConfigKey, mainField, secondaryField, mainLabel,
|
||||
mainMetricLabel: mainMetric.title || '',
|
||||
mainMetricDesc: mainMetric.desc || '',
|
||||
secondaryMetricLabel: secondaryMetric?.title || '',
|
||||
secondaryMetricDesc: secondaryMetric?.desc || '',
|
||||
};
|
||||
}
|
||||
|
||||
// Emoji glyph per place/activity variant.
|
||||
|
||||
Reference in New Issue
Block a user