From 060ca43fc8dfc3d0589050674ac5511b1040c5cc Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 5 Jan 2022 13:13:40 +0100 Subject: [PATCH 01/12] use solid type for font awesome icons related to #2768 --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 52bb87da..4687fbec 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -239,7 +239,7 @@ Module.register("calendar", { const symbols = this.symbolsForEvent(event); symbols.forEach((s, index) => { const symbol = document.createElement("span"); - symbol.className = "fa fa-fw fa-" + s; + symbol.className = "fas fa-fw fa-" + s; if (index > 0) { symbol.style.paddingLeft = "5px"; } From 24bfaaca7e4bd84b012d645192942ad21a4b76ce Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 5 Jan 2022 13:18:08 +0100 Subject: [PATCH 02/12] use solid type for font awesome icons --- modules/default/weather/current.njk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/default/weather/current.njk b/modules/default/weather/current.njk index 40746e82..3d938b64 100755 --- a/modules/default/weather/current.njk +++ b/modules/default/weather/current.njk @@ -15,7 +15,7 @@ {% if config.showWindDirection %} {% if config.showWindDirectionAsArrow %} - + {% else %} {{ current.cardinalWindDirection() | translate }} {% endif %} @@ -47,7 +47,7 @@
{% if config.showIndoorTemperature and indoor.temperature %}
- + {{ indoor.temperature | roundValue | unit("temperature") | decimalSymbol }} @@ -55,7 +55,7 @@ {% endif %} {% if config.showIndoorHumidity and indoor.humidity %}
- + {{ indoor.humidity | roundValue | unit("humidity") | decimalSymbol }} From 404343de1d87bbd442a635ace8fb04b5689a396b Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 5 Jan 2022 13:19:55 +0100 Subject: [PATCH 03/12] use solid type for font awesome icons --- modules/default/alert/templates/alert.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/alert/templates/alert.njk b/modules/default/alert/templates/alert.njk index 5592ea35..a748d268 100644 --- a/modules/default/alert/templates/alert.njk +++ b/modules/default/alert/templates/alert.njk @@ -3,7 +3,7 @@ {% if imageUrl %} {% else %} - + {% endif %}
{% endif %} From 990d1adfb2f1bee1d2cecc08e11d41efedd869f5 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 5 Jan 2022 13:26:50 +0100 Subject: [PATCH 04/12] use solid type for font awesome icons --- modules/default/clock/clock.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 52cdb7e0..18cb2ac2 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -199,13 +199,13 @@ Module.register("clock", { sunWrapper.innerHTML = ' ' + + '"> ' + untilNextEventString + "" + - ' ' + + ' ' + formatTime(this.config, sunTimes.sunrise) + "" + - ' ' + + ' ' + formatTime(this.config, sunTimes.sunset) + ""; digitalWrapper.appendChild(sunWrapper); @@ -230,13 +230,13 @@ Module.register("clock", { moonWrapper.innerHTML = ' ' + + '"> ' + illuminatedFractionString + "" + - ' ' + + ' ' + (moonRise ? formatTime(this.config, moonRise) : "...") + "" + - ' ' + + ' ' + (moonSet ? formatTime(this.config, moonSet) : "...") + ""; digitalWrapper.appendChild(moonWrapper); From c8c4585946511e922df380c3443018dcd9b7656c Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 5 Jan 2022 13:27:20 +0100 Subject: [PATCH 05/12] use solid type for font awesome icons --- modules/default/updatenotification/updatenotification.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/updatenotification/updatenotification.njk b/modules/default/updatenotification/updatenotification.njk index aa4a5250..3149816f 100644 --- a/modules/default/updatenotification/updatenotification.njk +++ b/modules/default/updatenotification/updatenotification.njk @@ -1,7 +1,7 @@ {% if not suspended %} {% for name, status in moduleList %}
- + {% set mainTextLabel = "UPDATE_NOTIFICATION" if name === "default" else "UPDATE_NOTIFICATION_MODULE" %} {{ mainTextLabel | translate({MODULE_NAME: name}) }} From ce05f8e95821e5bf0db4cf6e45488b26c5dfaf59 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 5 Jan 2022 13:28:07 +0100 Subject: [PATCH 06/12] use solid type for font awesome icons --- modules/default/currentweather/currentweather.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 5a00fb99..5ebf1077 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -135,7 +135,7 @@ Module.register("currentweather", { var windDirection = document.createElement("sup"); if (this.config.showWindDirectionAsArrow) { if (this.windDeg !== null) { - windDirection.innerHTML = '   '; + windDirection.innerHTML = '   '; } } else { windDirection.innerHTML = " " + this.translate(this.windDirection); @@ -234,7 +234,7 @@ Module.register("currentweather", { if (this.config.showIndoorTemperature && this.indoorTemperature) { var indoorIcon = document.createElement("span"); - indoorIcon.className = "fa fa-home"; + indoorIcon.className = "fas fa-home"; large.appendChild(indoorIcon); var indoorTemperatureElem = document.createElement("span"); @@ -245,7 +245,7 @@ Module.register("currentweather", { if (this.config.showIndoorHumidity && this.indoorHumidity) { var indoorHumidityIcon = document.createElement("span"); - indoorHumidityIcon.className = "fa fa-tint"; + indoorHumidityIcon.className = "fas fa-tint"; large.appendChild(indoorHumidityIcon); var indoorHumidityElem = document.createElement("span"); From 1619dd29e9b33c0cdb7ccd7d927a4f83173cd66d Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Thu, 6 Jan 2022 21:28:25 +0100 Subject: [PATCH 07/12] Apply suggestions from code review --- modules/default/clock/clock.js | 4 ++-- modules/default/currentweather/currentweather.js | 2 +- modules/default/weather/current.njk | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 18cb2ac2..df2364a4 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -199,7 +199,7 @@ Module.register("clock", { sunWrapper.innerHTML = ' ' + + '"> ' + untilNextEventString + "" + ' ' + @@ -230,7 +230,7 @@ Module.register("clock", { moonWrapper.innerHTML = ' ' + + '"> ' + illuminatedFractionString + "" + ' ' + diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 5ebf1077..e8ced0bb 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -135,7 +135,7 @@ Module.register("currentweather", { var windDirection = document.createElement("sup"); if (this.config.showWindDirectionAsArrow) { if (this.windDeg !== null) { - windDirection.innerHTML = '   '; + windDirection.innerHTML = '   '; } } else { windDirection.innerHTML = " " + this.translate(this.windDirection); diff --git a/modules/default/weather/current.njk b/modules/default/weather/current.njk index 3d938b64..bfeb0b8f 100755 --- a/modules/default/weather/current.njk +++ b/modules/default/weather/current.njk @@ -15,7 +15,7 @@ {% if config.showWindDirection %} {% if config.showWindDirectionAsArrow %} - + {% else %} {{ current.cardinalWindDirection() | translate }} {% endif %} From e78fa11fd4a0160ed0fd9da6b907921b84154698 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Thu, 6 Jan 2022 21:40:19 +0100 Subject: [PATCH 08/12] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d42eb1d9..3975f644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ _This release is scheduled to be released on 2022-04-01._ ### Updated +- updates Font Awesome css class to new default style (fixes #2768) + ### Fixed ## [2.18.0] - 2022-01-01 From c56b601ab8a21a72234a6309a966d6cdad801c77 Mon Sep 17 00:00:00 2001 From: CFenner Date: Thu, 6 Jan 2022 21:49:09 +0100 Subject: [PATCH 09/12] adjust test case --- tests/e2e/modules/weather_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/modules/weather_spec.js b/tests/e2e/modules/weather_spec.js index b2dce4fb..4612f46e 100644 --- a/tests/e2e/modules/weather_spec.js +++ b/tests/e2e/modules/weather_spec.js @@ -117,7 +117,7 @@ describe("Weather module", function () { }); it("should render showWindDirectionAsArrow = true", function () { - const elem = getElement(".weather .normal.medium sup i.fa-long-arrow-up"); + const elem = getElement(".weather .normal.medium sup i.fa-long-arrow-alt-up"); expect(elem.outerHTML).toContain("transform:rotate(250deg);"); }); From 4c43f5db15b922ee14f7f78d08a5e37883122b35 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Sun, 9 Jan 2022 08:38:48 +0100 Subject: [PATCH 10/12] use alternative calendar icon --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 4687fbec..016547dc 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -43,7 +43,7 @@ Module.register("calendar", { tableClass: "small", calendars: [ { - symbol: "calendar", + symbol: "calendar-alt", url: "https://www.calendarlabs.com/templates/ical/US-Holidays.ics" } ], From 84175908933849e9b5348b2363a15a0ed8a3d1cc Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Sun, 9 Jan 2022 11:10:00 +0100 Subject: [PATCH 11/12] update test case --- tests/e2e/modules/calendar_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/modules/calendar_spec.js b/tests/e2e/modules/calendar_spec.js index 8755eb2c..b567b376 100644 --- a/tests/e2e/modules/calendar_spec.js +++ b/tests/e2e/modules/calendar_spec.js @@ -32,7 +32,7 @@ describe("Calendar module", function () { }); it("should show the default calendar symbol in each event", () => { - testElementLength(".calendar .event .fa-calendar", 0, "not"); + testElementLength(".calendar .event .fa-calendar-alt", 0, "not"); }); }); From 8537f40f1d3b501eb7c44d1e0bd3b89216654198 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Sun, 9 Jan 2022 11:25:03 +0100 Subject: [PATCH 12/12] Update calendar.js --- modules/default/calendar/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js index 016547dc..c38f7a6e 100755 --- a/modules/default/calendar/calendar.js +++ b/modules/default/calendar/calendar.js @@ -13,7 +13,7 @@ Module.register("calendar", { maximumNumberOfDays: 365, limitDays: 0, // Limit the number of days shown, 0 = no limit displaySymbol: true, - defaultSymbol: "calendar", // Fontawesome Symbol see https://fontawesome.com/cheatsheet?from=io + defaultSymbol: "calendar-alt", // Fontawesome Symbol see https://fontawesome.com/cheatsheet?from=io showLocation: false, displayRepeatingCountTitle: false, defaultRepeatingCountTitle: "",