refactor icon finding scripts

This commit is contained in:
Matt Walsh
2025-05-14 15:03:35 -05:00
parent 7fae649357
commit e2877aad77
9 changed files with 365 additions and 363 deletions

View File

@@ -4,7 +4,7 @@
import STATUS from './status.mjs';
import { json } from './utils/fetch.mjs';
import { DateTime } from '../vendor/auto/luxon.mjs';
import { getWeatherIconFromIconLink } from './icons.mjs';
import { getLargeIcon } from './icons.mjs';
import { preloadImg } from './utils/image.mjs';
import WeatherDisplay from './weatherdisplay.mjs';
import { registerDisplay } from './navigation.mjs';
@@ -101,7 +101,7 @@ const parse = (fullForecast) => {
// get the object to modify/populate
const fDay = forecast[destIndex];
// high temperature will always be last in the source array so it will overwrite the low values assigned below
fDay.icon = getWeatherIconFromIconLink(period.icon);
fDay.icon = getLargeIcon(period.icon);
fDay.text = shortenExtendedForecastText(period.shortForecast);
fDay.dayName = dates[destIndex];