From af29f5b266323bbbd665468a5c3d13593ce9b0aa Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 2 Jan 2023 08:30:57 -0800 Subject: [PATCH 01/14] Use tabular nums for datetime to prevent size changing --- src/components/widgets/datetime/datetime.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/widgets/datetime/datetime.jsx b/src/components/widgets/datetime/datetime.jsx index 88b25e2d9..7953e7739 100644 --- a/src/components/widgets/datetime/datetime.jsx +++ b/src/components/widgets/datetime/datetime.jsx @@ -28,7 +28,7 @@ export default function DateTime({ options }) { return (
- + {date}
From 35a2cd9b949e0512de8d291c5d4d21e7302b4a5a Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 3 Jan 2023 15:51:21 -0800 Subject: [PATCH 02/14] Support Synology DownloadStation v6 + v7 Co-Authored-By: Benoit SERRA <11260343+Oupsman@users.noreply.github.com> --- src/widgets/downloadstation/proxy.js | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/widgets/downloadstation/proxy.js b/src/widgets/downloadstation/proxy.js index dc76a3cb9..73a6a259e 100644 --- a/src/widgets/downloadstation/proxy.js +++ b/src/widgets/downloadstation/proxy.js @@ -5,10 +5,8 @@ import widgets from "widgets/widgets"; import getServiceWidget from "utils/config/service-helpers"; const logger = createLogger("downloadstationProxyHandler"); -const authApi = "{url}/webapi/auth.cgi?api=SYNO.API.Auth&version=2&method=login&account={username}&passwd={password}&session=DownloadStation&format=cookie" -async function login(widget) { - const loginUrl = formatApiCall(authApi, widget); +async function login(loginUrl) { const [status, contentType, data] = await httpProxy(loginUrl); if (status !== 200) { return [status, contentType, data]; @@ -56,8 +54,28 @@ export default async function downloadstationProxyHandler(req, res) { const json = JSON.parse(data.toString()); if (json?.success !== true) { - logger.debug("Logging in to DownloadStation"); - [status, contentType, data] = await login(widget); + logger.debug("Attempting login to DownloadStation"); + + const apiInfoUrl = formatApiCall("{url}/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query", widget); + let path = "entry.cgi"; + let maxVersion = 7; + [status, contentType, data] = await httpProxy(apiInfoUrl); + if (status === 200) { + try { + const apiAuthInfo = JSON.parse(data.toString()).data['SYNO.API.Auth']; + if (apiAuthInfo) { + path = apiAuthInfo.path; + maxVersion = apiAuthInfo.maxVersion; + logger.debug(`Deteceted Downloadstation auth API path: ${path} and maxVersion: ${maxVersion}`); + } + } catch { + logger.debug(`Error ${status} obtaining DownloadStation API info`); + } + } + + const authApi = `{url}/webapi/${path}?api=SYNO.API.Auth&version=${maxVersion}&method=login&account={username}&passwd={password}&session=DownloadStation&format=cookie` + const loginUrl = formatApiCall(authApi, widget); + [status, contentType, data] = await login(loginUrl); if (status !== 200) { return res.status(status).end(data) } From 6705197a3525d625b5605ec883fd738d9fc09270 Mon Sep 17 00:00:00 2001 From: Harold <73724671+HaroldVB@users.noreply.github.com> Date: Wed, 4 Jan 2023 20:10:18 +0100 Subject: [PATCH 03/14] Giving Read Only rights to homepage Giving Read Only rights to homepage container. Adding :RO to the docker.sock volume. When the container gets compromised the intruder will have root access basically. The container doesn't need the write privileges. This measure will stop inexperienced people from exposing their docker.socket to the public internet. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec2e1e682..e19252aee 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ services: - 3000:3000 volumes: - /path/to/config:/app/config # Make sure your local config directory exists - - /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations + - /var/run/docker.sock:/var/run/docker.sock:ro # (optional) For docker integrations ``` or docker run: From 84b7f103c38e362a78485807f439f7d3bb32cd09 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 4 Jan 2023 13:53:06 -0800 Subject: [PATCH 04/14] Allow setting locale for datetime widget directly --- src/components/widgets/datetime/datetime.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/widgets/datetime/datetime.jsx b/src/components/widgets/datetime/datetime.jsx index 7953e7739..869834736 100644 --- a/src/components/widgets/datetime/datetime.jsx +++ b/src/components/widgets/datetime/datetime.jsx @@ -13,17 +13,18 @@ const textSizes = { }; export default function DateTime({ options }) { - const { text_size: textSize, format } = options; + const { text_size: textSize, locale, format } = options; const { i18n } = useTranslation(); const [date, setDate] = useState(""); + const dateLocale = locale ?? i18n.language; useEffect(() => { - const dateFormat = new Intl.DateTimeFormat(i18n.language, { ...format }); + const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format }); const interval = setInterval(() => { setDate(dateFormat.format(new Date())); }, 1000); return () => clearInterval(interval); - }, [date, setDate, i18n.language, format]); + }, [date, setDate, dateLocale, format]); return (
From 4f24c0f909186fa563055b3aaa3745bda0678922 Mon Sep 17 00:00:00 2001 From: "SASAGAWA, Kiyoshi" Date: Thu, 5 Jan 2023 10:25:44 +0100 Subject: [PATCH 05/14] Added translation using Weblate (Japanese) --- public/locales/ja/common.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 public/locales/ja/common.json diff --git a/public/locales/ja/common.json b/public/locales/ja/common.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/public/locales/ja/common.json @@ -0,0 +1 @@ +{} From 1caa9fadedd2e7ea38f1eb8f913984ea1d85a296 Mon Sep 17 00:00:00 2001 From: ze cabra Date: Wed, 4 Jan 2023 10:20:50 +0000 Subject: [PATCH 06/14] Translated using Weblate (Portuguese) Currently translated at 88.8% (256 of 288 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/pt/ --- public/locales/pt/common.json | 196 +++++++++++++++++----------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index 92a388707..f3cd28f51 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -1,6 +1,6 @@ { "widget": { - "missing_type": "Widget ausente: {{type}}", + "missing_type": "Tipo de Widget ausente: {{type}}", "api_error": "Erro da API", "status": "Estado", "information": "Informação", @@ -14,8 +14,8 @@ "resources": { "total": "Total", "free": "Livre", - "used": "Usado", - "load": "Carregar", + "used": "Utilizado", + "load": "Carga", "cpu": "CPU" }, "docker": { @@ -53,7 +53,7 @@ "wanted": "Desejado", "queued": "Fila", "movies": "Filmes", - "missing": "Missing" + "missing": "Faltando" }, "readarr": { "wanted": "Desejados", @@ -111,14 +111,14 @@ "weather": { "current": "Localização atual", "allow": "Clicar para permitir", - "updating": "A atualizar", + "updating": "Atualizando", "wait": "Por favor aguarde" }, "overseerr": { "pending": "Pendente", "approved": "Aprovado", "available": "Disponível", - "processing": "Processing" + "processing": "Processando" }, "sabnzbd": { "rate": "Taxa", @@ -192,9 +192,9 @@ "transferRate": "Taxa" }, "authentik": { - "loginsLast24H": "Logins (24h)", - "failedLoginsLast24H": "Failed Logins (24h)", - "users": "Users" + "loginsLast24H": "Inícios de sessão (24h)", + "failedLoginsLast24H": "Inícios de sessão falhados (24h)", + "users": "Utilizadores" }, "proxmox": { "mem": "MEM", @@ -204,13 +204,13 @@ }, "unifi": { "users": "Utilizadores", - "uptime": "Tempo de Atividade do Sistema", + "uptime": "Sistema Ativo", "days": "Dias", "wan": "WAN", "lan_users": "Utilizadores LAN", "wlan_users": "Utilizadores WLAN", - "up": "Ligados", - "down": "Desligados", + "up": "Ligado", + "down": "Desligado", "wait": "Por favor, aguarde", "lan": "LAN", "wlan": "WLAN", @@ -241,7 +241,7 @@ "2-night": "Parcialmente nublado", "3-day": "Nublado", "3-night": "Nublado", - "99-night": "Thunderstorm With Hail", + "99-night": "Trovoada com granizo", "45-day": "Nevoeiro", "45-night": "Nevoeiro", "48-day": "Nevoeiro", @@ -257,160 +257,160 @@ "57-day": "Freezing Drizzle", "57-night": "Freezing Drizzle", "66-day": "Freezing Rain", - "61-day": "Light Rain", - "61-night": "Light Rain", - "63-day": "Rain", - "63-night": "Rain", - "65-day": "Heavy Rain", + "61-day": "Chuva fraca", + "61-night": "Chuva fraca", + "63-day": "Chuva", + "63-night": "Chuva", + "65-day": "Chuva forte", "66-night": "Freezing Rain", - "65-night": "Heavy Rain", + "65-night": "Chuva forte", "67-day": "Freezing Rain", "67-night": "Freezing Rain", - "71-day": "Light Snow", - "71-night": "Light Snow", - "73-day": "Snow", - "73-night": "Snow", - "75-day": "Heavy Snow", - "75-night": "Heavy Snow", + "71-day": "Neve fraca", + "71-night": "Neve fraca", + "73-day": "Neve", + "73-night": "Neve", + "75-day": "Neve forte", + "75-night": "Neve forte", "77-day": "Snow Grains", "77-night": "Snow Grains", - "80-day": "Light Showers", - "80-night": "Light Showers", - "81-day": "Showers", - "81-night": "Showers", - "82-day": "Heavy Showers", - "82-night": "Heavy Showers", + "80-day": "Neve fraca", + "80-night": "Chuviscos ligeiros", + "81-day": "Chuviscos", + "81-night": "Chuviscos", + "82-day": "Chuviscos fortes", + "82-night": "Chuviscos fortes", "85-day": "Snow Showers", "85-night": "Snow Showers", "86-day": "Snow Showers", "86-night": "Snow Showers", - "95-day": "Thunderstorm", - "95-night": "Thunderstorm", - "96-day": "Thunderstorm With Hail", - "96-night": "Thunderstorm With Hail", - "99-day": "Thunderstorm With Hail" + "95-day": "Trovoada", + "95-night": "Trovoada", + "96-day": "Trovoada com granizo", + "96-night": "Trovoada com granizo", + "99-day": "Trovoada com granizo" }, "quicklaunch": { "bookmark": "Marcador", "service": "Serviço" }, "homebridge": { - "available_update": "System", - "updates": "Updates", - "update_available": "Update Available", - "up_to_date": "Up to Date", + "available_update": "Sistema", + "updates": "Atualizações", + "update_available": "Atualização disponível", + "up_to_date": "Atualizado", "child_bridges": "Child Bridges", "child_bridges_status": "{{ok}}/{{total}}" }, "autobrr": { - "approvedPushes": "Approved", - "rejectedPushes": "Rejected", - "filters": "Filters", - "indexers": "Indexers" + "approvedPushes": "Aprovado", + "rejectedPushes": "Rejeitado", + "filters": "Filtros", + "indexers": "Indexadores" }, "watchtower": { - "containers_scanned": "Scanned", - "containers_updated": "Updated", - "containers_failed": "Failed" + "containers_scanned": "Verificado", + "containers_updated": "Atualizado", + "containers_failed": "Falhou" }, "tubearchivist": { - "downloads": "Queue", - "videos": "Videos", - "channels": "Channels", - "playlists": "Playlists" + "downloads": "Fila", + "videos": "Vídeos", + "channels": "Canais", + "playlists": "Listas" }, "truenas": { - "load": "System Load", - "uptime": "Uptime", - "alerts": "Alerts", + "load": "Carga do sistema", + "uptime": "Ligado", + "alerts": "Alertas", "time": "{{value, number(style: unit; unitDisplay: long;)}}" }, "navidrome": { - "nothing_streaming": "No Active Streams", - "please_wait": "Please Wait" + "nothing_streaming": "Sem streams ativos", + "please_wait": "Por favor aguarde" }, "pyload": { - "queue": "Queue", + "queue": "Fila", "total": "Total", - "speed": "Speed", - "active": "Active" + "speed": "Velocidade", + "active": "Ativo" }, "gluetun": { - "region": "Region", - "country": "Country", - "public_ip": "Public IP" + "region": "Região", + "country": "País", + "public_ip": "IP público" }, "hdhomerun": { - "channels": "Channels", + "channels": "Canais", "hd": "HD" }, "ping": { "error": "Erro", - "ping": "Ping" + "ping": "Tempo de resposta" }, "scrutiny": { - "passed": "Passed", - "failed": "Failed", - "unknown": "Unknown" + "passed": "Aprovado", + "failed": "Falhou", + "unknown": "Desconhecido" }, "paperlessngx": { - "inbox": "Inbox", + "inbox": "Caixa de entrada", "total": "Total" }, "deluge": { - "download": "Download", - "upload": "Upload", + "download": "Descarregar", + "upload": "Enviar", "leech": "Leech", - "seed": "Seed" + "seed": "Semente" }, "flood": { "download": "Descarregar", "upload": "Carregar", "leech": "Leech", - "seed": "Seed" + "seed": "Semente" }, "tdarr": { - "queue": "Queue", - "processed": "Processed", - "errored": "Errored", - "saved": "Saved" + "queue": "Fila", + "processed": "Processado", + "errored": "Erro", + "saved": "Guardado" }, "miniflux": { - "read": "Read", - "unread": "Unread" + "read": "Lido", + "unread": "Não lido" }, "nextdns": { - "wait": "Please Wait", - "no_devices": "No Device Data Received" + "wait": "Aguarde", + "no_devices": "Nenhum dado do dispositivo recebido" }, "omada": { - "connectedAp": "Connected APs", - "activeUser": "Active devices", - "alerts": "Alerts", - "connectedGateway": "Connected gateways", - "connectedSwitches": "Connected switches" + "connectedAp": "APs Ligados", + "activeUser": "Dispositivos activos", + "alerts": "Alertas", + "connectedGateway": "Gateways ligados", + "connectedSwitches": "Switches ligados" }, "downloadstation": { - "download": "Download", - "upload": "Upload", + "download": "Descarregar", + "upload": "Enviar", "leech": "Leech", - "seed": "Seed" + "seed": "Semente" }, "mikrotik": { - "cpuLoad": "CPU Load", - "memoryUsed": "Memory Used", - "uptime": "Uptime", + "cpuLoad": "Carga do CPU", + "memoryUsed": "Memória Utilizada", + "uptime": "Ativo", "numberOfLeases": "Leases" }, "xteve": { - "streams_all": "All Streams", - "streams_active": "Active Streams", - "streams_xepg": "XEPG Channels" + "streams_all": "Todos os Streams", + "streams_active": "Streams ativos", + "streams_xepg": "Canais XEPG" }, "opnsense": { - "cpu": "CPU Load", - "memory": "Active Memory", - "wanUpload": "WAN Upload", - "wanDownload": "WAN Download" + "cpu": "Carga do CPU", + "memory": "Memória Ativa", + "wanUpload": "Envio WAN", + "wanDownload": "WAN Descarga" } } From 885dca17504a21d75b7ae34e62208831ea090cd3 Mon Sep 17 00:00:00 2001 From: Milo Ivir Date: Wed, 4 Jan 2023 16:08:09 +0000 Subject: [PATCH 07/14] Translated using Weblate (Croatian) Currently translated at 97.9% (282 of 288 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/hr/ --- public/locales/hr/common.json | 56 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/public/locales/hr/common.json b/public/locales/hr/common.json index b555aa0b0..68a0b21a6 100644 --- a/public/locales/hr/common.json +++ b/public/locales/hr/common.json @@ -347,61 +347,61 @@ "deluge": { "download": "Preuzimanje", "upload": "Prijenos", - "leech": "Leech", - "seed": "Seed" + "leech": "Korištenje tuđeg sadržaja", + "seed": "Prenošenje preuzetog sadržaja" }, "flood": { "download": "Preuzimanje", "upload": "Prijenos", - "leech": "Leech", - "seed": "Seed" + "leech": "Korištenje tuđeg sadržaja", + "seed": "Prenošenje preuzetog sadržaja" }, "tdarr": { - "queue": "Queue", - "processed": "Processed", - "errored": "Errored", - "saved": "Saved" + "queue": "Red čekanja", + "processed": "Obrađeno", + "errored": "S greškom", + "saved": "Spremljeno" }, "miniflux": { - "read": "Read", - "unread": "Unread" + "read": "Pročitano", + "unread": "Nepročitano" }, "nextdns": { - "wait": "Please Wait", - "no_devices": "No Device Data Received" + "wait": "Pričekaj", + "no_devices": "Podaci o uređaju nisu primljeni" }, "common": { "bibyterate": "{{value, rate(bits: false; binary: true)}}", "bibitrate": "{{value, rate(bits: true; binary: true)}}" }, "omada": { - "connectedAp": "Connected APs", - "activeUser": "Active devices", - "alerts": "Alerts", - "connectedGateway": "Connected gateways", - "connectedSwitches": "Connected switches" + "connectedAp": "Povezani AP-ovi", + "activeUser": "Aktivni uređaji", + "alerts": "Upozorenja", + "connectedGateway": "Povezani pristupi", + "connectedSwitches": "Povezani prekidači" }, "downloadstation": { - "download": "Download", - "upload": "Upload", - "leech": "Leech", - "seed": "Seed" + "download": "Preuzimanje", + "upload": "Prijenos", + "leech": "Korištenje tuđeg sadržaja", + "seed": "Prenošenje preuzetog sadržaja" }, "mikrotik": { "cpuLoad": "CPU Load", - "memoryUsed": "Memory Used", + "memoryUsed": "Korištena memorija", "uptime": "Uptime", "numberOfLeases": "Leases" }, "xteve": { - "streams_all": "All Streams", - "streams_active": "Active Streams", - "streams_xepg": "XEPG Channels" + "streams_all": "Svi prijenosi", + "streams_active": "Aktivni prijenosi", + "streams_xepg": "XEPG kanali" }, "opnsense": { "cpu": "CPU Load", - "memory": "Active Memory", - "wanUpload": "WAN Upload", - "wanDownload": "WAN Download" + "memory": "Aktivna memorija", + "wanUpload": "WAN prijenos", + "wanDownload": "WAN preuzimanje" } } From 11fad11b6d2573a2d7208d5627b675d9e5d27421 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 5 Jan 2023 09:25:54 +0000 Subject: [PATCH 08/14] Translated using Weblate (Japanese) Currently translated at 100.0% (0 of 0 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/ja/ --- public/locales/ja/common.json | 408 +++++++++++++++++++++++++++++++++- 1 file changed, 407 insertions(+), 1 deletion(-) diff --git a/public/locales/ja/common.json b/public/locales/ja/common.json index 0967ef424..f69790248 100644 --- a/public/locales/ja/common.json +++ b/public/locales/ja/common.json @@ -1 +1,407 @@ -{} +{ + "navidrome": { + "nothing_streaming": "No Active Streams", + "please_wait": "Please Wait" + }, + "npm": { + "total": "Total", + "enabled": "Enabled", + "disabled": "Disabled" + }, + "strelaysrv": { + "numActiveSessions": "Sessions", + "numConnections": "Connections", + "dataRelayed": "Relayed", + "transferRate": "Rate" + }, + "glances": { + "mem": "MEM", + "cpu": "CPU", + "wait": "Please wait" + }, + "autobrr": { + "filters": "Filters", + "indexers": "Indexers", + "approvedPushes": "Approved", + "rejectedPushes": "Rejected" + }, + "gluetun": { + "region": "Region", + "country": "Country", + "public_ip": "Public IP" + }, + "common": { + "bibyterate": "{{value, rate(bits: false; binary: true)}}", + "bibitrate": "{{value, rate(bits: true; binary: true)}}" + }, + "widget": { + "api_error": "API Error", + "information": "Information", + "missing_type": "Missing Widget Type: {{type}}", + "status": "Status", + "url": "URL", + "raw_error": "Raw Error", + "response_data": "Response Data" + }, + "weather": { + "current": "Current Location", + "allow": "Click to allow", + "updating": "Updating", + "wait": "Please wait" + }, + "search": { + "placeholder": "Search…" + }, + "resources": { + "cpu": "CPU", + "total": "Total", + "free": "Free", + "used": "Used", + "load": "Load" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan": "LAN", + "wlan": "WLAN", + "devices": "Devices", + "lan_devices": "LAN Devices", + "wlan_devices": "WLAN Devices", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" + }, + "docker": { + "rx": "RX", + "tx": "TX", + "mem": "MEM", + "cpu": "CPU", + "offline": "Offline", + "error": "Error", + "unknown": "Unknown" + }, + "ping": { + "error": "Error", + "ping": "Ping" + }, + "emby": { + "playing": "Playing", + "transcoding": "Transcoding", + "bitrate": "Bitrate", + "no_active": "No Active Streams" + }, + "flood": { + "download": "Download", + "upload": "Upload", + "leech": "Leech", + "seed": "Seed" + }, + "changedetectionio": { + "totalObserved": "Total Observed", + "diffsDetected": "Diffs Detected" + }, + "tautulli": { + "playing": "Playing", + "transcoding": "Transcoding", + "bitrate": "Bitrate", + "no_active": "No Active Streams" + }, + "omada": { + "connectedAp": "Connected APs", + "activeUser": "Active devices", + "alerts": "Alerts", + "connectedGateway": "Connected gateways", + "connectedSwitches": "Connected switches" + }, + "nzbget": { + "rate": "Rate", + "remaining": "Remaining", + "downloaded": "Downloaded" + }, + "plex": { + "streams": "Active Streams", + "movies": "Movies", + "tv": "TV Shows" + }, + "sabnzbd": { + "rate": "Rate", + "queue": "Queue", + "timeleft": "Time Left" + }, + "rutorrent": { + "active": "Active", + "upload": "Upload", + "download": "Download" + }, + "transmission": { + "download": "Download", + "upload": "Upload", + "leech": "Leech", + "seed": "Seed" + }, + "qbittorrent": { + "download": "Download", + "upload": "Upload", + "leech": "Leech", + "seed": "Seed" + }, + "deluge": { + "download": "Download", + "upload": "Upload", + "leech": "Leech", + "seed": "Seed" + }, + "downloadstation": { + "download": "Download", + "upload": "Upload", + "leech": "Leech", + "seed": "Seed" + }, + "sonarr": { + "wanted": "Wanted", + "queued": "Queued", + "series": "Series" + }, + "radarr": { + "wanted": "Wanted", + "missing": "Missing", + "queued": "Queued", + "movies": "Movies" + }, + "lidarr": { + "wanted": "Wanted", + "queued": "Queued", + "albums": "Albums" + }, + "readarr": { + "wanted": "Wanted", + "queued": "Queued", + "books": "Books" + }, + "bazarr": { + "missingEpisodes": "Missing Episodes", + "missingMovies": "Missing Movies" + }, + "ombi": { + "pending": "Pending", + "approved": "Approved", + "available": "Available" + }, + "jellyseerr": { + "pending": "Pending", + "approved": "Approved", + "available": "Available" + }, + "overseerr": { + "pending": "Pending", + "processing": "Processing", + "approved": "Approved", + "available": "Available" + }, + "pihole": { + "queries": "Queries", + "blocked": "Blocked", + "gravity": "Gravity" + }, + "adguard": { + "queries": "Queries", + "blocked": "Blocked", + "filtered": "Filtered", + "latency": "Latency" + }, + "speedtest": { + "upload": "Upload", + "download": "Download", + "ping": "Ping" + }, + "portainer": { + "running": "Running", + "stopped": "Stopped", + "total": "Total" + }, + "tdarr": { + "queue": "Queue", + "processed": "Processed", + "errored": "Errored", + "saved": "Saved" + }, + "traefik": { + "routers": "Routers", + "services": "Services", + "middleware": "Middleware" + }, + "coinmarketcap": { + "configure": "Configure one or more crypto currencies to track", + "1hour": "1 Hour", + "1day": "1 Day", + "7days": "7 Days", + "30days": "30 Days" + }, + "gotify": { + "apps": "Applications", + "clients": "Clients", + "messages": "Messages" + }, + "prowlarr": { + "enableIndexers": "Indexers", + "numberOfGrabs": "Grabs", + "numberOfQueries": "Queries", + "numberOfFailGrabs": "Fail Grabs", + "numberOfFailQueries": "Fail Queries" + }, + "jackett": { + "configured": "Configured", + "errored": "Errored" + }, + "mastodon": { + "user_count": "Users", + "status_count": "Posts", + "domain_count": "Domains" + }, + "miniflux": { + "read": "Read", + "unread": "Unread" + }, + "authentik": { + "users": "Users", + "loginsLast24H": "Logins (24h)", + "failedLoginsLast24H": "Failed Logins (24h)" + }, + "proxmox": { + "mem": "MEM", + "cpu": "CPU", + "lxc": "LXC", + "vms": "VMs" + }, + "quicklaunch": { + "bookmark": "Bookmark", + "service": "Service" + }, + "wmo": { + "0-day": "Sunny", + "1-day": "Mainly Sunny", + "0-night": "Clear", + "1-night": "Mainly Clear", + "2-day": "Partly Cloudy", + "2-night": "Partly Cloudy", + "3-day": "Cloudy", + "3-night": "Cloudy", + "45-day": "Foggy", + "45-night": "Foggy", + "48-day": "Foggy", + "48-night": "Foggy", + "51-day": "Light Drizzle", + "51-night": "Light Drizzle", + "53-day": "Drizzle", + "53-night": "Drizzle", + "55-day": "Heavy Drizzle", + "55-night": "Heavy Drizzle", + "56-day": "Light Freezing Drizzle", + "56-night": "Light Freezing Drizzle", + "57-day": "Freezing Drizzle", + "57-night": "Freezing Drizzle", + "61-day": "Light Rain", + "61-night": "Light Rain", + "63-day": "Rain", + "63-night": "Rain", + "67-night": "Freezing Rain", + "71-day": "Light Snow", + "65-day": "Heavy Rain", + "65-night": "Heavy Rain", + "66-day": "Freezing Rain", + "66-night": "Freezing Rain", + "67-day": "Freezing Rain", + "71-night": "Light Snow", + "73-day": "Snow", + "73-night": "Snow", + "75-day": "Heavy Snow", + "75-night": "Heavy Snow", + "77-day": "Snow Grains", + "77-night": "Snow Grains", + "80-day": "Light Showers", + "80-night": "Light Showers", + "81-day": "Showers", + "81-night": "Showers", + "82-day": "Heavy Showers", + "82-night": "Heavy Showers", + "85-day": "Snow Showers", + "85-night": "Snow Showers", + "86-day": "Snow Showers", + "86-night": "Snow Showers", + "95-day": "Thunderstorm", + "95-night": "Thunderstorm", + "96-day": "Thunderstorm With Hail", + "96-night": "Thunderstorm With Hail", + "99-day": "Thunderstorm With Hail", + "99-night": "Thunderstorm With Hail" + }, + "homebridge": { + "available_update": "System", + "updates": "Updates", + "update_available": "Update Available", + "up_to_date": "Up to Date", + "child_bridges": "Child Bridges", + "child_bridges_status": "{{ok}}/{{total}}" + }, + "watchtower": { + "containers_scanned": "Scanned", + "containers_updated": "Updated", + "containers_failed": "Failed" + }, + "tubearchivist": { + "downloads": "Queue", + "videos": "Videos", + "channels": "Channels", + "playlists": "Playlists" + }, + "truenas": { + "load": "System Load", + "uptime": "Uptime", + "alerts": "Alerts", + "time": "{{value, number(style: unit; unitDisplay: long;)}}" + }, + "pyload": { + "speed": "Speed", + "active": "Active", + "queue": "Queue", + "total": "Total" + }, + "hdhomerun": { + "channels": "Channels", + "hd": "HD" + }, + "scrutiny": { + "passed": "Passed", + "failed": "Failed", + "unknown": "Unknown" + }, + "paperlessngx": { + "inbox": "Inbox", + "total": "Total" + }, + "nextdns": { + "wait": "Please Wait", + "no_devices": "No Device Data Received" + }, + "mikrotik": { + "cpuLoad": "CPU Load", + "memoryUsed": "Memory Used", + "uptime": "Uptime", + "numberOfLeases": "Leases" + }, + "xteve": { + "streams_all": "All Streams", + "streams_active": "Active Streams", + "streams_xepg": "XEPG Channels" + }, + "opnsense": { + "cpu": "CPU Load", + "memory": "Active Memory", + "wanUpload": "WAN Upload", + "wanDownload": "WAN Download" + } +} From 2b4fb03dcf046f3e48b45e1caa6e3ba22192d65e Mon Sep 17 00:00:00 2001 From: "SASAGAWA, Kiyoshi" Date: Thu, 5 Jan 2023 09:40:12 +0000 Subject: [PATCH 09/14] Translated using Weblate (Japanese) Currently translated at 5.2% (15 of 288 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/ja/ --- public/locales/ja/common.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/public/locales/ja/common.json b/public/locales/ja/common.json index f69790248..f6217d938 100644 --- a/public/locales/ja/common.json +++ b/public/locales/ja/common.json @@ -31,17 +31,17 @@ "public_ip": "Public IP" }, "common": { - "bibyterate": "{{value, rate(bits: false; binary: true)}}", - "bibitrate": "{{value, rate(bits: true; binary: true)}}" + "bibyterate": "", + "bibitrate": "" }, "widget": { - "api_error": "API Error", - "information": "Information", - "missing_type": "Missing Widget Type: {{type}}", - "status": "Status", + "api_error": "APIエラー", + "information": "情報", + "missing_type": "見つからないウィジェットタイプ: {{type}}", + "status": "ステータス", "url": "URL", - "raw_error": "Raw Error", - "response_data": "Response Data" + "raw_error": "生のエラー", + "response_data": "レスポンスデータ" }, "weather": { "current": "Current Location", From f93106970a96476906655700f781df9280622ee2 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Sat, 7 Jan 2023 00:13:53 +0000 Subject: [PATCH 10/14] Translated using Weblate (Japanese) Currently translated at 5.2% (15 of 288 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/ja/ --- public/locales/ja/common.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/locales/ja/common.json b/public/locales/ja/common.json index f6217d938..11913e363 100644 --- a/public/locales/ja/common.json +++ b/public/locales/ja/common.json @@ -31,8 +31,8 @@ "public_ip": "Public IP" }, "common": { - "bibyterate": "", - "bibitrate": "" + "bibyterate": "{{value, rate(bits: false; binary: true)}}", + "bibitrate": "{{value, rate(bits: true; binary: true)}}" }, "widget": { "api_error": "APIエラー", From 34a7b25c9ccc20579e12460197517423d7d85531 Mon Sep 17 00:00:00 2001 From: John Hollowell Date: Sat, 7 Jan 2023 02:00:44 +0000 Subject: [PATCH 11/14] Add truenas key to credentialed proxy handler Revert "Change TrueNAS to use API key" This reverts commit 1926c26b77d8e048d92da6e20ff24a3056237daf. Co-Authored-By: John Hollowell --- src/utils/proxy/handlers/credentialed.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/proxy/handlers/credentialed.js b/src/utils/proxy/handlers/credentialed.js index 5d34264df..10ca2b9c3 100644 --- a/src/utils/proxy/handlers/credentialed.js +++ b/src/utils/proxy/handlers/credentialed.js @@ -30,6 +30,8 @@ export default async function credentialedProxyHandler(req, res, map) { headers["X-gotify-Key"] = `${widget.key}`; } else if (widget.type === "authentik") { headers.Authorization = `Bearer ${widget.key}`; + } else if (widget.type === "truenas") { + headers.Authorization = `Bearer ${widget.key}`; } else if (widget.type === "proxmox") { headers.Authorization = `PVEAPIToken=${widget.username}=${widget.password}`; } else if (widget.type === "autobrr") { From 730f1c5ec10bacb28b47fa6b137ff1557e76b46e Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:00:25 -0800 Subject: [PATCH 12/14] Support api key + username / pass for truenas widget --- src/widgets/truenas/widget.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/widgets/truenas/widget.js b/src/widgets/truenas/widget.js index 4c479e9f3..3139019bc 100644 --- a/src/widgets/truenas/widget.js +++ b/src/widgets/truenas/widget.js @@ -1,9 +1,31 @@ import { jsonArrayFilter } from "utils/proxy/api-helpers"; +import credentialedProxyHandler from "utils/proxy/handlers/credentialed"; import genericProxyHandler from "utils/proxy/handlers/generic"; +import getServiceWidget from "utils/config/service-helpers"; const widget = { api: "{url}/api/v2.0/{endpoint}", - proxyHandler: genericProxyHandler, + proxyHandler: async (req, res, map) => { // choose proxy handler based on widget settings + const { group, service } = req.query; + + if (group && service) { + const widgetOpts = await getServiceWidget(group, service); + let handler; + if (widgetOpts.username && widgetOpts.password) { + handler = genericProxyHandler; + } else if (widgetOpts.key) { + handler = credentialedProxyHandler; + } + + if (handler) { + return handler(req, res, map); + } + + return res.status(500).json({ error: "Username / password or API key required" }); + } + + return res.status(500).json({ error: "Error parsing widget request" }); + }, mappings: { alerts: { From 642f21e56b0e2c31ebc6d53db6f88aae5e0c3157 Mon Sep 17 00:00:00 2001 From: Chun Chi Hsieh Date: Sat, 7 Jan 2023 14:31:19 +0000 Subject: [PATCH 13/14] Translated using Weblate (Chinese (Traditional)) Currently translated at 42.7% (123 of 288 strings) Translation: Homepage/Homepage Translate-URL: https://hosted.weblate.org/projects/homepage/homepage/zh_Hant/ --- public/locales/zh-Hant/common.json | 222 ++++++++++++++--------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/public/locales/zh-Hant/common.json b/public/locales/zh-Hant/common.json index fd00cccda..7aec083ac 100644 --- a/public/locales/zh-Hant/common.json +++ b/public/locales/zh-Hant/common.json @@ -1,116 +1,116 @@ { "widget": { - "missing_type": "Missing Widget Type: {{type}}", - "api_error": "API Error", - "status": "Status", - "information": "Information", + "missing_type": "遺失的小工具類型: {{type}}", + "api_error": "API錯誤", + "status": "狀態", + "information": "資訊", "url": "URL", "raw_error": "Raw Error", "response_data": "Response Data" }, "weather": { - "current": "Current Location", - "allow": "Click to allow", - "updating": "Updating", - "wait": "Please wait" + "current": "目前位置", + "allow": "點擊以允許", + "updating": "更新中", + "wait": "請稍後" }, "docker": { - "rx": "RX", - "offline": "Offline", - "tx": "TX", - "mem": "MEM", - "cpu": "CPU", - "error": "Error", - "unknown": "Unknown" + "rx": "接收", + "offline": "離線", + "tx": "發送", + "mem": "記憶體", + "cpu": "處理器", + "error": "錯誤", + "unknown": "未知的" }, "emby": { - "playing": "Playing", - "transcoding": "Transcoding", - "bitrate": "Bitrate", - "no_active": "No Active Streams" + "playing": "正在播放", + "transcoding": "轉碼", + "bitrate": "位元率", + "no_active": "暫無撥放" }, "tautulli": { - "playing": "Playing", - "transcoding": "Transcoding", - "bitrate": "Bitrate", - "no_active": "No Active Streams" + "playing": "正在播放", + "transcoding": "轉碼", + "bitrate": "位元率", + "no_active": "暫無撥放" }, "jellyseerr": { - "pending": "Pending", - "approved": "Approved", - "available": "Available" + "pending": "待定", + "approved": "已接受", + "available": "可用的" }, "search": { - "placeholder": "Search…" + "placeholder": "搜尋…" }, "resources": { - "total": "Total", - "free": "Free", - "used": "Used", - "load": "Load", + "total": "全部", + "free": "剩餘", + "used": "已使用", + "load": "負載", "cpu": "CPU" }, "nzbget": { - "rate": "Rate", - "remaining": "Remaining", - "downloaded": "Downloaded" + "rate": "速率", + "remaining": "剩餘", + "downloaded": "已下載" }, "sabnzbd": { - "rate": "Rate", - "queue": "Queue", - "timeleft": "Time Left" + "rate": "速率", + "queue": "佇列", + "timeleft": "剩餘時間" }, "rutorrent": { "active": "Active", - "upload": "Upload", - "download": "Download" + "upload": "上傳", + "download": "下載" }, "radarr": { - "movies": "Movies", - "wanted": "Wanted", - "queued": "Queued", - "missing": "Missing" + "movies": "電影", + "wanted": "欲觀看", + "queued": "已加入佇列", + "missing": "遺失" }, "sonarr": { - "wanted": "Wanted", - "queued": "Queued", - "series": "Series" + "wanted": "欲觀看", + "queued": "已加入佇列", + "series": "系列" }, "readarr": { - "wanted": "Wanted", - "queued": "Queued", - "books": "Books" + "wanted": "欲觀看", + "queued": "已加入佇列", + "books": "書籍" }, "ombi": { - "pending": "Pending", - "approved": "Approved", - "available": "Available" + "pending": "待定", + "approved": "已接受", + "available": "可用的" }, "overseerr": { - "pending": "Pending", - "approved": "Approved", - "available": "Available", - "processing": "Processing" + "pending": "待定", + "approved": "已接受", + "available": "可用的", + "processing": "處理中" }, "pihole": { - "queries": "Queries", - "blocked": "Blocked", + "queries": "查詢", + "blocked": "已阻擋", "gravity": "Gravity" }, "speedtest": { - "upload": "Upload", - "download": "Download", + "upload": "上行", + "download": "下行", "ping": "Ping" }, "portainer": { - "running": "Running", - "stopped": "Stopped", - "total": "Total" + "running": "運行中", + "stopped": "已停止", + "total": "總數" }, "traefik": { - "routers": "Routers", - "services": "Services", - "middleware": "Middleware" + "routers": "路由器", + "services": "服務", + "middleware": "中介軟體" }, "gotify": { "clients": "Clients", @@ -118,8 +118,8 @@ "messages": "Messages" }, "npm": { - "enabled": "Enabled", - "disabled": "Disabled", + "enabled": "已啟用", + "disabled": "已停用", "total": "Total" }, "coinmarketcap": { @@ -137,8 +137,8 @@ "numberOfFailQueries": "Fail Queries" }, "transmission": { - "download": "Download", - "upload": "Upload", + "download": "下載", + "upload": "上傳", "leech": "Leech", "seed": "Seed" }, @@ -147,23 +147,23 @@ "errored": "Errored" }, "bazarr": { - "missingEpisodes": "Missing Episodes", - "missingMovies": "Missing Movies" + "missingEpisodes": "缺失的劇集", + "missingMovies": "缺失的電影" }, "lidarr": { - "wanted": "Wanted", - "queued": "Queued", - "albums": "Albums" + "wanted": "欲觀看", + "queued": "已加入佇列", + "albums": "專輯" }, "adguard": { - "queries": "Queries", - "blocked": "Blocked", - "filtered": "Filtered", - "latency": "Latency" + "queries": "查詢", + "blocked": "已阻擋", + "filtered": "已過濾", + "latency": "延遲" }, "qbittorrent": { - "download": "Download", - "upload": "Upload", + "download": "下載", + "upload": "上傳", "leech": "Leech", "seed": "Seed" }, @@ -190,25 +190,25 @@ "vms": "VMs" }, "unifi": { - "users": "Users", - "uptime": "System Uptime", - "days": "Days", + "users": "使用者", + "uptime": "系統運行時間", + "days": "天", "wan": "WAN", - "lan_users": "LAN Users", - "wlan_users": "WLAN Users", + "lan_users": "LAN使用者", + "wlan_users": "WLAN使用者", "up": "UP", "down": "DOWN", - "wait": "Please wait", + "wait": "請稍後", "lan": "LAN", "wlan": "WLAN", - "devices": "Devices", - "lan_devices": "LAN Devices", - "wlan_devices": "WLAN Devices" + "devices": "設備", + "lan_devices": "LAN設備", + "wlan_devices": "WLAN設備" }, "plex": { - "streams": "Active Streams", - "movies": "Movies", - "tv": "TV Shows" + "streams": "正在串流", + "movies": "電影", + "tv": "影集" }, "glances": { "cpu": "CPU", @@ -313,8 +313,8 @@ "time": "{{value, number(style: unit; unitDisplay: long;)}}" }, "navidrome": { - "nothing_streaming": "No Active Streams", - "please_wait": "Please Wait" + "nothing_streaming": "暫無撥放", + "please_wait": "請稍後" }, "pyload": { "speed": "Speed", @@ -332,7 +332,7 @@ "hd": "HD" }, "ping": { - "error": "Error", + "error": "錯誤", "ping": "Ping" }, "scrutiny": { @@ -345,22 +345,22 @@ "total": "Total" }, "deluge": { - "download": "Download", - "upload": "Upload", + "download": "下載", + "upload": "上傳", "leech": "Leech", "seed": "Seed" }, "flood": { - "download": "Download", - "upload": "Upload", + "download": "下載", + "upload": "上傳", "leech": "Leech", "seed": "Seed" }, "tdarr": { - "queue": "Queue", - "processed": "Processed", - "errored": "Errored", - "saved": "Saved" + "queue": "佇列", + "processed": "已處理", + "errored": "錯誤", + "saved": "已儲存" }, "miniflux": { "read": "Read", @@ -375,15 +375,15 @@ "bibitrate": "{{value, rate(bits: true; binary: true)}}" }, "omada": { - "connectedAp": "Connected APs", - "activeUser": "Active devices", - "alerts": "Alerts", - "connectedGateway": "Connected gateways", - "connectedSwitches": "Connected switches" + "connectedAp": "已連接的存取點", + "activeUser": "在線裝置", + "alerts": "警示", + "connectedGateway": "已連接的閘道", + "connectedSwitches": "已連接的交換器" }, "downloadstation": { - "download": "Download", - "upload": "Upload", + "download": "下載", + "upload": "上傳", "leech": "Leech", "seed": "Seed" }, From fc2e17fa5952f98338cade8c80ae38a129eb56c8 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 9 Jan 2023 01:33:58 -0800 Subject: [PATCH 14/14] fix useWidgetAPI refreshInterval --- src/utils/proxy/use-widget-api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/proxy/use-widget-api.js b/src/utils/proxy/use-widget-api.js index 05eb220ec..f9235d787 100644 --- a/src/utils/proxy/use-widget-api.js +++ b/src/utils/proxy/use-widget-api.js @@ -4,8 +4,8 @@ import { formatProxyUrl } from "./api-helpers"; export default function useWidgetAPI(widget, ...options) { const config = {}; - if (options?.refreshInterval) { - config.refreshInterval = options.refreshInterval; + if (options && options[1]?.refreshInterval) { + config.refreshInterval = options[1].refreshInterval; } const { data, error } = useSWR(formatProxyUrl(widget, ...options), config); // make the data error the top-level error