mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Merge pull request #2158 from flopp999/patch-2
Weather - forecast change day of week
This commit is contained in:
commit
da302fce32
@ -13,6 +13,8 @@ _This release is scheduled to be released on 2021-01-01._
|
|||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand
|
||||||
|
|
||||||
### Deleted
|
### Deleted
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -10,7 +10,13 @@
|
|||||||
{% set forecast = forecast.slice(0, numSteps) %}
|
{% set forecast = forecast.slice(0, numSteps) %}
|
||||||
{% for f in forecast %}
|
{% for f in forecast %}
|
||||||
<tr {% if config.colored %}class="colored"{% endif %} {% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}>
|
<tr {% if config.colored %}class="colored"{% endif %} {% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}>
|
||||||
|
{% if (currentStep == 0) %}
|
||||||
|
<td class="day">{{ "TODAY" | translate }}</td>
|
||||||
|
{% elif (currentStep == 1) %}
|
||||||
|
<td class="day">{{ "TOMORROW" | translate }}</td>
|
||||||
|
{% else %}
|
||||||
<td class="day">{{ f.date.format('ddd') }}</td>
|
<td class="day">{{ f.date.format('ddd') }}</td>
|
||||||
|
{% endif %}
|
||||||
<td class="bright weather-icon"><span class="wi weathericon wi-{{ f.weatherType }}"></span></td>
|
<td class="bright weather-icon"><span class="wi weathericon wi-{{ f.weatherType }}"></span></td>
|
||||||
<td class="align-right bright max-temp">
|
<td class="align-right bright max-temp">
|
||||||
{{ f.maxTemperature | roundValue | unit("temperature") }}
|
{{ f.maxTemperature | roundValue | unit("temperature") }}
|
||||||
|
@ -186,7 +186,7 @@ describe("Weather module", function () {
|
|||||||
const weather = generateWeatherForecast();
|
const weather = generateWeatherForecast();
|
||||||
await setup({ template, data: weather });
|
await setup({ template, data: weather });
|
||||||
|
|
||||||
const days = ["Fri", "Sat", "Sun", "Mon", "Tue"];
|
const days = ["Today", "Tomorrow", "Sun", "Mon", "Tue"];
|
||||||
|
|
||||||
for (const [index, day] of days.entries()) {
|
for (const [index, day] of days.entries()) {
|
||||||
await app.client.waitUntilTextExists(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(1)`, day, 10000);
|
await app.client.waitUntilTextExists(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(1)`, day, 10000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user