progress/menu #167

This commit is contained in:
Matt Walsh
2026-04-20 14:21:32 -05:00
parent cd2035490a
commit 0f1c12bf67
5 changed files with 20 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ class Progress extends WeatherDisplay {
// if no displays provided just draw the backgrounds (above)
if (!displays) return;
const lines = displays.map((display, index) => {
if (display.showOnProgress === false) return false;
// all displays are drawn, some are tagged as only showing on the progress page in portrait
const fill = {
name: display.name,
};
@@ -50,6 +50,8 @@ class Progress extends WeatherDisplay {
links.classList.remove(...statusClasses);
links.classList.add(statusClass);
links.dataset.index = index;
// hide items not shown unless in portrait
if (!display.showOnProgress) line.classList.add('portrait-only');
return line;
}).filter((d) => d);