From 7dc895172cbe0fbbb32cd035565494ecee14ff46 Mon Sep 17 00:00:00 2001 From: Mark Rapson Date: Fri, 28 Aug 2026 20:17:45 +0100 Subject: [PATCH] Release 2.10.2 --- CHANGELOG.md | 6 ++++++ build/package.player.json | 2 +- build/package.web.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- .../views/data-sources/weather/forecast-preview.hbs | 11 +++++++---- test/weather-forecast.test.js | 3 ++- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e76d3a5..fc5fb0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## 2.10.2 - 2026-08-28 + +### Fixed + +- Fixed the weather forecast preview to show only its first-fetch message until a successful forecast is available. + ## 2.10.1 - 2026-08-28 ### Added diff --git a/build/package.player.json b/build/package.player.json index 540c403..4887222 100644 --- a/build/package.player.json +++ b/build/package.player.json @@ -1,6 +1,6 @@ { "name": "pulse-signage-player", - "version": "2.10.1", + "version": "2.10.2", "private": false, "description": "Pulse Signage player application bundle", "engines": { diff --git a/build/package.web.json b/build/package.web.json index 267fc73..896232f 100644 --- a/build/package.web.json +++ b/build/package.web.json @@ -1,6 +1,6 @@ { "name": "pulse-signage-web", - "version": "2.10.1", + "version": "2.10.2", "private": false, "description": "Pulse Signage web and bridge application bundle", "engines": { diff --git a/package-lock.json b/package-lock.json index 7f0203a..5e10b51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pulse-signage", - "version": "2.10.1", + "version": "2.10.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pulse-signage", - "version": "2.10.1", + "version": "2.10.2", "dependencies": { "@sparticuz/chromium": "^149.0.0", "animate.css": "^4.1.1", diff --git a/package.json b/package.json index 4100d38..0afcf0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pulse-signage", - "version": "2.10.1", + "version": "2.10.2", "private": false, "description": "Pulse Signage application with MySQL and media storage", "engines": { diff --git a/src/web/views/data-sources/weather/forecast-preview.hbs b/src/web/views/data-sources/weather/forecast-preview.hbs index 11e8bc1..7bb3ee9 100644 --- a/src/web/views/data-sources/weather/forecast-preview.hbs +++ b/src/web/views/data-sources/weather/forecast-preview.hbs @@ -1,8 +1,11 @@
-

Forecast preview

+

Forecast preview

{{#if weatherPreview.hasSnapshot}}
{{/if}}
- {{#unless weatherPreview.hasSnapshot}}
Daily and hourly forecasts will appear here after the first successful fetch.
{{/unless}} -
{{#each weatherPreview.forecast}}
{{day}}
{{condition}}
{{high}}°{{low}}°
{{rain}} rain
{{/each}}
-
Hourly forecast · next 24 hours
{{#each weatherPreview.hourly}}
{{day}}
{{temperature}}°
{{rain}}
{{/each}}
+ {{#if weatherPreview.hasSnapshot}} +
{{#each weatherPreview.forecast}}
{{day}}
{{condition}}
{{high}}°{{low}}°
{{rain}} rain
{{/each}}
+
Hourly forecast · next 24 hours
{{#each weatherPreview.hourly}}
{{day}}
{{temperature}}°
{{rain}}
{{/each}}
+ {{else}} +
Daily and hourly forecasts will appear here after the first successful fetch.
+ {{/if}}
diff --git a/test/weather-forecast.test.js b/test/weather-forecast.test.js index a86e811..9e0f5f2 100644 --- a/test/weather-forecast.test.js +++ b/test/weather-forecast.test.js @@ -34,5 +34,6 @@ test('Open-Meteo hourly forecast starts at the current hour and spans 24 hours', test('weather forecast preview only shows the fetch hint without a snapshot', () => { const template = fs.readFileSync(path.join(__dirname, '..', 'src', 'web', 'views', 'data-sources', 'weather', 'forecast-preview.hbs'), 'utf8'); - assert.match(template, /\{\{#unless weatherPreview\.hasSnapshot\}\}.*Daily and hourly forecasts will appear here after the first successful fetch\..*\{\{\/unless\}\}/); + assert.match(template, /\{\{#if weatherPreview\.hasSnapshot\}\}[\s\S]*weather-daily-forecast[\s\S]*weather-hourly-forecast[\s\S]*\{\{\/if\}\}/); + assert.match(template, /Daily and hourly forecasts will appear here after the first successful fetch\./); }); \ No newline at end of file