From 6de0205d0730960974961ee10e191a0892d82e96 Mon Sep 17 00:00:00 2001 From: Saxo_Broko Date: Tue, 6 Dec 2022 00:22:44 +1100 Subject: [PATCH 1/9] Linked weather providers and added an attributi... attribution for Open-Meteo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dd0e794..b9023ae9 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ - Coin Market Cap, Mastodon - Information & Utility Widgets - System Stats (Disk, CPU, Memory) - - Weather via WeatherAPI.com or OpenWeatherMap + - Weather via [WeatherAPI.com](https://www.weatherapi.com/), [OpenWeatherMap](https://openweathermap.org/), or [Open-Meteo](https://open-meteo.com/) - Search Bar - Customizable - 21 theme colors with light and dark mode support From 656b818488ab4bf2d61e03d557e51c5265f54616 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 5 Dec 2022 08:52:45 -0800 Subject: [PATCH 2/9] Fix conditions map for openmeteo --- src/components/widgets/openmeteo/icon.jsx | 2 +- src/utils/weather/openmeteo-condition-map.js | 212 +++++++++++++++++++ 2 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 src/utils/weather/openmeteo-condition-map.js diff --git a/src/components/widgets/openmeteo/icon.jsx b/src/components/widgets/openmeteo/icon.jsx index a2b01ba1..12d93fcb 100644 --- a/src/components/widgets/openmeteo/icon.jsx +++ b/src/components/widgets/openmeteo/icon.jsx @@ -1,4 +1,4 @@ -import mapIcon from "utils/weather/owm-condition-map"; +import mapIcon from "utils/weather/openmeteo-condition-map"; export default function Icon({ condition, timeOfDay }) { const IconComponent = mapIcon(condition, timeOfDay); diff --git a/src/utils/weather/openmeteo-condition-map.js b/src/utils/weather/openmeteo-condition-map.js new file mode 100644 index 00000000..06ed3d46 --- /dev/null +++ b/src/utils/weather/openmeteo-condition-map.js @@ -0,0 +1,212 @@ +import * as Icons from "react-icons/wi"; + +// see https://open-meteo.com/en/docs + +const conditions = [ + { + code: 1, + icon: { + day: Icons.WiDayCloudy, + night: Icons.WiNightAltCloudy, + }, + }, + { + code: 2, + icon: { + day: Icons.WiDayCloudy, + night: Icons.WiNightAltCloudy, + }, + }, + { + code: 3, + icon: { + day: Icons.WiDayCloudy, + night: Icons.WiNightAltCloudy, + }, + }, + { + code: 45, + icon: { + day: Icons.WiDayFog, + night: Icons.WiNightFog, + }, + }, + { + code: 48, + icon: { + day: Icons.WiDayFog, + night: Icons.WiNightFog, + }, + }, + { + code: 51, + icon: { + day: Icons.WiDaySprinkle, + night: Icons.WiNightAltSprinkle, + }, + }, + { + code: 53, + icon: { + day: Icons.WiDaySprinkle, + night: Icons.WiNightAltSprinkle, + }, + }, + { + code: 55, + icon: { + day: Icons.WiDaySprinkle, + night: Icons.WiNightAltSprinkle, + }, + }, + { + code: 56, + icon: { + day: Icons.WiDaySleet, + night: Icons.WiNightAltSleet, + }, + }, + { + code: 57, + icon: { + day: Icons.WiDaySleet, + night: Icons.WiNightAltSleet, + }, + }, + { + code: 61, + icon: { + day: Icons.WiDayShowers, + night: Icons.WiNightAltShowers, + }, + }, + { + code: 63, + icon: { + day: Icons.WiDayShowers, + night: Icons.WiNightAltShowers, + }, + }, + { + code: 65, + icon: { + day: Icons.WiDayShowers, + night: Icons.WiNightAltShowers, + }, + }, + { + code: 66, + icon: { + day: Icons.WiDaySleet, + night: Icons.WiNightAltSleet, + }, + }, + { + code: 67, + icon: { + day: Icons.WiDaySleet, + night: Icons.WiNightAltSleet, + }, + }, + { + code: 71, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 73, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 75, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 77, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 80, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 81, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 82, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 85, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 86, + icon: { + day: Icons.WiDaySnow, + night: Icons.WiNightAltSnow, + }, + }, + { + code: 95, + icon: { + day: Icons.WiDayThunderstorm, + night: Icons.WiNightAltThunderstorm, + }, + }, + { + code: 96, + icon: { + day: Icons.WiDayThunderstorm, + night: Icons.WiNightAltThunderstorm, + }, + }, + { + code: 99, + icon: { + day: Icons.WiDayThunderstorm, + night: Icons.WiNightAltThunderstorm, + }, + }, +]; + +export default function mapIcon(weatherStatusCode, timeOfDay) { + const mapping = conditions.find((condition) => condition.code === weatherStatusCode); + console.log(weatherStatusCode, timeOfDay, mapping); + + if (mapping) { + if (timeOfDay === "day") { + return mapping.icon.day; + } + + if (timeOfDay === "night") { + return mapping.icon.night; + } + } + + return Icons.WiDaySunny; +} From 535a7d2f2d3f92235f1ddf5c5cebd9671a01b272 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 5 Dec 2022 09:41:19 -0800 Subject: [PATCH 3/9] Add optional tz --- src/pages/api/widgets/openmeteo.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/api/widgets/openmeteo.js b/src/pages/api/widgets/openmeteo.js index e79931cb..37233645 100644 --- a/src/pages/api/widgets/openmeteo.js +++ b/src/pages/api/widgets/openmeteo.js @@ -1,8 +1,9 @@ import cachedFetch from "utils/proxy/cached-fetch"; export default async function handler(req, res) { - const { latitude, longitude, units, cache } = req.query; + const { latitude, longitude, units, cache, timezone } = req.query; const degrees = units === "imperial" ? "fahrenheit" : "celsius"; - const apiUrl = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&daily=sunrise,sunset¤t_weather=true&temperature_unit=${degrees}&timezone=auto`; + const timezeone = timezone ?? 'auto' + const apiUrl = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&daily=sunrise,sunset¤t_weather=true&temperature_unit=${degrees}&timezone=${timezeone}`; return res.send(await cachedFetch(apiUrl, cache)); } \ No newline at end of file From a7676c4daa700e5bbcb9b6ba25940f5d1e8baa84 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 5 Dec 2022 09:41:54 -0800 Subject: [PATCH 4/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9023ae9..586b4456 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ - Coin Market Cap, Mastodon - Information & Utility Widgets - System Stats (Disk, CPU, Memory) - - Weather via [WeatherAPI.com](https://www.weatherapi.com/), [OpenWeatherMap](https://openweathermap.org/), or [Open-Meteo](https://open-meteo.com/) + - Weather via [OpenWeatherMap](https://openweathermap.org/) or [Open-Meteo](https://open-meteo.com/) - Search Bar - Customizable - 21 theme colors with light and dark mode support From f89093a0672f989b8428f7ded34df4dd5129c29f Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 5 Dec 2022 09:57:32 -0800 Subject: [PATCH 5/9] Update openmeteo-condition-map.js --- src/utils/weather/openmeteo-condition-map.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/weather/openmeteo-condition-map.js b/src/utils/weather/openmeteo-condition-map.js index 06ed3d46..9ae67365 100644 --- a/src/utils/weather/openmeteo-condition-map.js +++ b/src/utils/weather/openmeteo-condition-map.js @@ -196,7 +196,6 @@ const conditions = [ export default function mapIcon(weatherStatusCode, timeOfDay) { const mapping = conditions.find((condition) => condition.code === weatherStatusCode); - console.log(weatherStatusCode, timeOfDay, mapping); if (mapping) { if (timeOfDay === "day") { From 5d8b937e9cfa25ee35f2714416f7c21531c3fddf Mon Sep 17 00:00:00 2001 From: Milo Ivir Date: Mon, 5 Dec 2022 19:16:32 +0000 Subject: [PATCH 6/9] Translated using Weblate (Croatian) Currently translated at 97.7% (256 of 262 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/hr/ --- public/locales/hr/common.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/locales/hr/common.json b/public/locales/hr/common.json index f7964938..58539904 100644 --- a/public/locales/hr/common.json +++ b/public/locales/hr/common.json @@ -24,7 +24,7 @@ "available": "Dostupno", "pending": "Predstoji", "approved": "Odobreno", - "processing": "Processing" + "processing": "Obrada" }, "pihole": { "queries": "Upiti", @@ -345,20 +345,20 @@ "total": "Ukupno" }, "deluge": { - "download": "Download", - "upload": "Upload", + "download": "Preuzimanje", + "upload": "Prijenos", "leech": "Leech", "seed": "Seed" }, "diskstation": { - "download": "Download", - "upload": "Upload", + "download": "Preuzimanje", + "upload": "Prijenos", "leech": "Leech", "seed": "Seed" }, "flood": { - "download": "Download", - "upload": "Upload", + "download": "Preuzimanje", + "upload": "Prijenos", "leech": "Leech", "seed": "Seed" } From 94af8044f11aae0cd128075cd4eabfe04440a4af Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:36:53 -0800 Subject: [PATCH 7/9] fix minor flood without a backend error --- src/widgets/flood/component.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/flood/component.jsx b/src/widgets/flood/component.jsx index 4676d798..80ad2b28 100644 --- a/src/widgets/flood/component.jsx +++ b/src/widgets/flood/component.jsx @@ -11,11 +11,11 @@ export default function Component({ service }) { const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents"); - if (torrentError) { - return ; + if (torrentError || !torrentData?.torrents) { + return ; } - if (!torrentData) { + if (!torrentData || !torrentData.torrents) { return ( From 59cb7baf0b288f24ef23b8affdb7e50b4d33d2d3 Mon Sep 17 00:00:00 2001 From: Diogo Gaspar Date: Wed, 7 Dec 2022 00:04:47 +0000 Subject: [PATCH 8/9] Translated using Weblate (Portuguese) Currently translated at 52.2% (137 of 262 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/pt/ --- public/locales/pt/common.json | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index 93058498..3cde6047 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -3,10 +3,10 @@ "missing_type": "Widget ausente: {{type}}", "api_error": "Erro da API", "status": "Status", - "information": "Information", - "url": "URL", + "information": "Informação", + "url": "Endereço URL", "raw_error": "Raw Error", - "response_data": "Response Data" + "response_data": "Dados da Resposta" }, "search": { "placeholder": "Pesquisar…" @@ -24,8 +24,8 @@ "mem": "Mem", "cpu": "CPU", "offline": "Desligado", - "error": "Error", - "unknown": "Unknown" + "error": "Erro", + "unknown": "Desconhecido" }, "emby": { "playing": "A reproduzir", @@ -150,7 +150,7 @@ "transmission": { "download": "Baixando", "upload": "Enviando", - "leech": "Sanguessugas", + "leech": "Leech", "seed": "Semeadores" }, "jackett": { @@ -201,25 +201,25 @@ "vms": "VMs" }, "unifi": { - "users": "Users", - "uptime": "System Uptime", - "days": "Days", + "users": "Utilizadores", + "uptime": "Tempo de Atividade do Sistema", + "days": "Dias", "wan": "WAN", - "lan_users": "LAN Users", - "wlan_users": "WLAN Users", + "lan_users": "Utilizadores LAN", + "wlan_users": "Utilizadores WLAN", "up": "UP", "down": "DOWN", - "wait": "Please wait", + "wait": "Por favor aguarde", "lan": "LAN", "wlan": "WLAN", - "devices": "Devices", - "lan_devices": "LAN Devices", - "wlan_devices": "WLAN Devices" + "devices": "Dispositivos", + "lan_devices": "Dispositivos LAN", + "wlan_devices": "Dispositivos WLAN" }, "plex": { - "streams": "Active Streams", - "movies": "Movies", - "tv": "TV Shows" + "streams": "Streams Ativas", + "movies": "Filmes", + "tv": "Series de TV" }, "glances": { "cpu": "CPU", @@ -227,8 +227,8 @@ "wait": "Please wait" }, "changedetectionio": { - "totalObserved": "Total Observed", - "diffsDetected": "Diffs Detected" + "totalObserved": "Total Observado", + "diffsDetected": "Diferenças Detetadas" }, "wmo": { "0-day": "Sunny", @@ -343,7 +343,7 @@ "hd": "HD" }, "ping": { - "error": "Error", + "error": "Erro", "ping": "Ping" }, "scrutiny": { @@ -368,8 +368,8 @@ "seed": "Seed" }, "flood": { - "download": "Download", - "upload": "Upload", + "download": "Descarregar", + "upload": "Carregar", "leech": "Leech", "seed": "Seed" } From 537fd0ac216b4a64fac1faef021bbfb20d7709a6 Mon Sep 17 00:00:00 2001 From: clay Date: Thu, 8 Dec 2022 00:05:33 -0500 Subject: [PATCH 9/9] Correct spelling of Authentik --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 586b4456..6409c2d2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ - Service Integration - Sonarr, Radarr, Readarr, Prowlarr, Bazarr, Lidarr, Emby, Jellyfin, Tautulli (Plex) - Ombi, Overseerr, Jellyseerr, Jackett, NZBGet, SABnzbd, ruTorrent, Transmission, qBittorrent - - Portainer, Traefik, Speedtest Tracker, PiHole, AdGuard Home, Nginx Proxy Manager, Gotify, Syncthing Relay Server, Authentic, Proxmox + - Portainer, Traefik, Speedtest Tracker, PiHole, AdGuard Home, Nginx Proxy Manager, Gotify, Syncthing Relay Server, Authentik, Proxmox - Information Providers - Coin Market Cap, Mastodon - Information & Utility Widgets