Make profile bar sticky
Change to 24 hour cycle
This commit is contained in:
fraxle
2026-07-24 17:38:10 +01:00
parent e1f6efdb8b
commit 7068ad91a9
5 changed files with 37 additions and 7 deletions
+1 -1
View File
@@ -896,7 +896,7 @@ export function UTCIForecast() {
class=${`scope-play ${(playing || simMs != null) ? 'is-playing' : ''}`}
onClick=${() => { if (playing || simMs != null) { setPlaying(false); setSimMs(null); } else setPlaying(true); }}
title=${playing ? 'Stop time-lapse' : 'Play a 24-hour time-lapse on the scope'}>
<span class="scope-play-icon">${(playing || simMs != null) ? '◼' : '▶'}</span><span class="scope-play-label">${simClock ?? 'Day cycle'}</span>
<span class="scope-play-icon">${(playing || simMs != null) ? '◼' : '▶'}</span><span class="scope-play-label">${simClock ?? 'Cycle 24h'}</span>
</button>
<${DayTimeline}
windowStart=${windowStart}
+7 -2
View File
@@ -34,7 +34,7 @@
import { h, Fragment } from '../../vendor/preact.js';
import htm from '../../vendor/htm.js';
import { confidenceBand, utciCategory, VEHICLE_SPEEDS, VEHICLE_TYPES, BUILDING_TYPES, FUR_COLORS } from '../utils.js';
import { FREE_DAYS, UTCI_ENVIRONMENTS, deriveProfileMain } from '../config.js';
import { FREE_DAYS, UTCI_ENVIRONMENTS, deriveProfileMain, FILTER_PROFILES, variantIcons } from '../config.js';
import { calcVehicleInteriorTemp } from '../physics.js';
import { CloudIcon, PrecipIcon, HouseIcon, CarIcon, FogIcon, IceIcon } from '../components.js';
import { SubscribeModal } from './SubscribeModal.js';
@@ -175,7 +175,12 @@ export function DayTabs({
title="Change profile & settings">
<span class="active-profile-row-item">
<span class="active-profile-row-label">Profile</span>
<span class="active-profile-row-value">${mainLabel}</span>
<span class="active-profile-row-value">
${activeProfile === 'outdoors'
? (variantIcons[outdoorsVariant] || '🌤️')
: (FILTER_PROFILES[activeProfile]?.icon || '🎯')}
${mainLabel}
</span>
</span>
${mainConfigValue && html`
<span class="active-profile-row-sep" aria-hidden="true">·</span>