mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +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
|
||||
|
||||
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand
|
||||
|
||||
### Deleted
|
||||
|
||||
### Fixed
|
||||
|
@ -10,7 +10,13 @@
|
||||
{% set forecast = forecast.slice(0, numSteps) %}
|
||||
{% for f in forecast %}
|
||||
<tr {% if config.colored %}class="colored"{% endif %} {% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}>
|
||||
<td class="day">{{ f.date.format('ddd') }}</td>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
<td class="bright weather-icon"><span class="wi weathericon wi-{{ f.weatherType }}"></span></td>
|
||||
<td class="align-right bright max-temp">
|
||||
{{ f.maxTemperature | roundValue | unit("temperature") }}
|
||||
|
@ -186,7 +186,7 @@ describe("Weather module", function () {
|
||||
const weather = generateWeatherForecast();
|
||||
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()) {
|
||||
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