UI Overhaul
Profiles now in popup
Current profile always on screen
Hidden columns only when edit neeeded
Add pulldowns in to profile config
Customised the day tabs for vehicle, indoor and pet
This commit is contained in:
fraxle
2026-07-18 15:45:20 +01:00
parent f92e191a44
commit 916efca55e
13 changed files with 1594 additions and 610 deletions
+8 -1
View File
@@ -37,6 +37,11 @@ import {
checkFrost,
} from './events/weather-checks.js';
import { dynamicCosmicMessage } from './events/dynamic-message.js';
import { activityChance } from './events/activity-profile.js';
// Cosmic events only surface as a banner once estimated viewing conditions
// are at least this good (see ./events/activity-profile.js for the model).
const ACTIVITY_THRESHOLD = 80;
// Re-export so callers that imported these from events.js keep working.
export { getUpcomingEvents } from './events/almanac-calendar.js';
@@ -103,7 +108,9 @@ export function getActiveEvents(rows, location) {
: new Date().toISOString().slice(0, 10);
const cosmicHits = COSMIC_CALENDAR
.filter(ev => dateStr >= ev.start && dateStr <= ev.end)
.map(ev => Object.assign({}, ev, { message: dynamicCosmicMessage(ev, dateStr) }));
.map(ev => Object.assign({}, ev, { chance: activityChance(ev, dateStr) }))
.filter(ev => ev.chance >= ACTIVITY_THRESHOLD)
.map(ev => Object.assign(ev, { message: dynamicCosmicMessage(ev, dateStr) }));
// 3. Weather-derived events (all that match, not just first)
const weatherEvents = [];