1.5.1
Profile button fixes
This commit is contained in:
+2
-2
@@ -151,7 +151,7 @@ export function UTCIForecast() {
|
|||||||
// Which columns appear in the hourly table by default.
|
// Which columns appear in the hourly table by default.
|
||||||
// true = visible on first load (and the only ones free users see)
|
// true = visible on first load (and the only ones free users see)
|
||||||
// false = hidden by default (Pro users can toggle these on)
|
// false = hidden by default (Pro users can toggle these on)
|
||||||
const [visibleCols, setVisibleCols] = useState({ ...FILTER_PROFILES.basic.cols, vis: false, aqi: false, pollen: false });
|
const [visibleCols, setVisibleCols] = useState({ ...FILTER_PROFILES.basic.cols });
|
||||||
const toggleCol = (col) => setVisibleCols(prev => ({ ...prev, [col]: !prev[col] }));
|
const toggleCol = (col) => setVisibleCols(prev => ({ ...prev, [col]: !prev[col] }));
|
||||||
|
|
||||||
// Skin type for the sunburn-time column. Fitzpatrick II is typical UK fair.
|
// Skin type for the sunburn-time column. Fitzpatrick II is typical UK fair.
|
||||||
@@ -995,7 +995,7 @@ ${isPro && (activeProfile === 'custom' || activeCols['air']) && html`<button cla
|
|||||||
${isPro && (activeProfile === 'custom' || activeCols['cloud']) && html`<button class=${`col-toggle${visibleCols.cloud ? ' on' : ''}`} onClick=${() => toggleCol('cloud')}>Cloud</button>`}
|
${isPro && (activeProfile === 'custom' || activeCols['cloud']) && html`<button class=${`col-toggle${visibleCols.cloud ? ' on' : ''}`} onClick=${() => toggleCol('cloud')}>Cloud</button>`}
|
||||||
${isPro && (activeProfile === 'custom' || activeCols['vis']) && html`<button class=${`col-toggle${visibleCols.vis ? ' on' : ''}`} onClick=${() => toggleCol('vis')}>Visibility</button>`}
|
${isPro && (activeProfile === 'custom' || activeCols['vis']) && html`<button class=${`col-toggle${visibleCols.vis ? ' on' : ''}`} onClick=${() => toggleCol('vis')}>Visibility</button>`}
|
||||||
${isPro && (activeProfile === 'custom' || activeCols['aqi']) && html`<button class=${`col-toggle${visibleCols.aqi ? ' on' : ''}`} onClick=${() => toggleCol('aqi')}>Air Quality</button>`}
|
${isPro && (activeProfile === 'custom' || activeCols['aqi']) && html`<button class=${`col-toggle${visibleCols.aqi ? ' on' : ''}`} onClick=${() => toggleCol('aqi')}>Air Quality</button>`}
|
||||||
${(isPro || activeCols['pollen']) && html`<${CustomSelect}
|
${(isPro ? (activeProfile === 'custom' || activeCols['pollen']) : activeCols['pollen']) && html`<${CustomSelect}
|
||||||
value=${pollenType}
|
value=${pollenType}
|
||||||
isOn=${visibleCols.pollen}
|
isOn=${visibleCols.pollen}
|
||||||
hideLabel="Pollen"
|
hideLabel="Pollen"
|
||||||
|
|||||||
Reference in New Issue
Block a user