1.8.3
Filter colours to match group Expand units tick box
This commit is contained in:
@@ -134,7 +134,7 @@ export function useAppState() {
|
||||
?? FILTER_PROFILES.outdoors.cols;
|
||||
return { ...variantCols };
|
||||
}
|
||||
// For 'custom' profile, always use the configured custom cols (all 25 columns)
|
||||
// For custom profile, load from config - blank slate with only Hour on.
|
||||
if (saved === 'custom') {
|
||||
return { ...FILTER_PROFILES.custom?.cols ?? FILTER_PROFILES.basic.cols };
|
||||
}
|
||||
@@ -154,7 +154,7 @@ export function useAppState() {
|
||||
setIndoorMode(hasIndoor ? 'on' : 'off');
|
||||
setIndoorManaged(false);
|
||||
} else {
|
||||
// Custom profile ALWAYS initializes from config - with all 25 columns active
|
||||
// Custom profile initializes from config - blank slate, user picks columns.
|
||||
const customCols = FILTER_PROFILES.custom?.cols;
|
||||
if (customCols) {
|
||||
setVisibleCols({ ...customCols });
|
||||
@@ -217,16 +217,16 @@ export function useAppState() {
|
||||
return next;
|
||||
});
|
||||
|
||||
const [showDegree, setShowDegree] = useState(() => {
|
||||
const [showUnits, setShowUnits] = useState(() => {
|
||||
try {
|
||||
const s = localStorage.getItem('sunscope_show_degree');
|
||||
const s = localStorage.getItem('sunscope_show_units');
|
||||
if (s !== null) return s !== '0';
|
||||
return typeof window !== 'undefined' ? window.innerWidth >= 640 : true;
|
||||
} catch (e) { return true; }
|
||||
});
|
||||
const toggleShowDegree = () => setShowDegree(v => {
|
||||
const toggleShowUnits = () => setShowUnits(v => {
|
||||
const next = !v;
|
||||
try { localStorage.setItem('sunscope_show_degree', next ? '1' : '0'); } catch (e) { /* ignore */ }
|
||||
try { localStorage.setItem('sunscope_show_units', next ? '1' : '0'); } catch (e) { /* ignore */ }
|
||||
return next;
|
||||
});
|
||||
|
||||
@@ -452,7 +452,7 @@ export function useAppState() {
|
||||
indoorMode, setIndoorMode,
|
||||
pollenType, setPollenTypeAndSave,
|
||||
showDecimals, toggleShowDecimals,
|
||||
showDegree, toggleShowDegree,
|
||||
showUnits, toggleShowUnits,
|
||||
// table refs
|
||||
headStickyRef, headTrackRef, headTableRef,
|
||||
bodyScrollRef, bodyTableRef, tableWrapRef,
|
||||
|
||||
Reference in New Issue
Block a user