3.5
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:
+8
-1
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user