mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
406358aae9 | ||
|
|
a5d59e7e45 | ||
|
|
92a4ad0c5e | ||
|
|
d963bcd0c4 | ||
|
|
2e4125c81c | ||
|
|
5293ff3580 | ||
|
|
7a1349df83 | ||
|
|
de8de8f731 | ||
|
|
6d36382436 | ||
|
|
e31833b649 | ||
|
|
2dce18563d | ||
|
|
aa55c27ab0 | ||
|
|
16e321af54 | ||
|
|
c4edb29ff3 | ||
|
|
1d5cc05941 | ||
|
|
9faae7cb67 | ||
|
|
ea06fbe666 | ||
|
|
cc0b4be50c | ||
|
|
ea55cde043 | ||
|
|
840c88db89 | ||
|
|
8e8c9755a3 | ||
|
|
ba3b48e8ce | ||
|
|
d3806f7d5b | ||
|
|
0c9c1c599f | ||
|
|
af02440c40 | ||
|
|
cd53440eff | ||
|
|
3660140539 | ||
|
|
7bf1bf5369 | ||
|
|
898e30d6de | ||
|
|
a792d213e9 | ||
|
|
ebee953ebc | ||
|
|
200ab220e8 | ||
|
|
2499d25ce6 | ||
|
|
42356166c0 | ||
|
|
80a31c8427 | ||
|
|
867c6f9e97 | ||
|
|
ee9194fce1 | ||
|
|
f6322077a4 | ||
|
|
15a0e6cc54 | ||
|
|
5ee5adbb1e | ||
|
|
1d4b3eee9b | ||
|
|
fe971d23f8 | ||
|
|
34bf49845f | ||
|
|
34468e5bb0 | ||
|
|
d0dd52c5c2 | ||
|
|
98cca4ca8b | ||
|
|
b88463a785 | ||
|
|
6409188de8 | ||
|
|
510973c761 | ||
|
|
4480c26910 | ||
|
|
e778595296 | ||
|
|
f84ff7cedc | ||
|
|
04f98ae7a9 | ||
|
|
8ef3d7c20e | ||
|
|
428fd6cbba | ||
|
|
ee79335eff | ||
|
|
83d7100dd1 | ||
|
|
ccd9049806 | ||
|
|
769f36fa8e | ||
|
|
ffe89b02e9 | ||
|
|
1c158f743c | ||
|
|
4531985032 | ||
|
|
f8aa1ba391 | ||
|
|
9d790894d5 | ||
|
|
eeac1200e7 | ||
|
|
a304d87b8a | ||
|
|
9831df1427 | ||
|
|
5e6312fe93 |
44
README.md
44
README.md
@@ -5,25 +5,27 @@
|
||||
|
||||
## Features
|
||||
|
||||
* Fast! The entire site is statically generated at build time, so you can expect instant load times.
|
||||
* Images built for AMD64 (x86_64), ARM64, ARMv7 and ARMv6 ([schklom](https://github.com/benphelps/homepage/pull/3) and [modem7](https://github.com/benphelps/homepage/pull/62))
|
||||
* Fast! The entire site is statically generated at build time, so you can expect instant load times
|
||||
* Images built for AMD64 (x86_64), ARM64, ARMv7 and ARMv6
|
||||
- Supports all Raspberry Pi's, most SBCs & Apple Silicon
|
||||
* Full i18n support with automatic language detection.
|
||||
- Human translations for English, Norwegian Bokmål ([comradekingu](https://github.com/benphelps/homepage/commits?author=comradekingu)), Spanish ([AmadeusGraves](https://github.com/benphelps/homepage/commits?author=AmadeusGraves)), French (J. Lavoie), Dutch ([deffcolony](https://github.com/benphelps/homepage/commits?author=deffcolony)), Chinese ([nicedc](https://github.com/nicedc)) and Russian ([desolaris](https://github.com/benphelps/homepage/commits?author=desolaris)).
|
||||
- Machine translations for Portuguese and German.
|
||||
- Want to help translate? [Join the Weblate project](https://hosted.weblate.org/engage/homepage/).
|
||||
* Full i18n support with automatic language detection
|
||||
- Translations for Chinese, Dutch, French, German, Norwegian Bokmål, Portuguese, Russian and Spanish
|
||||
- Want to help translate? [Join the Weblate project](https://hosted.weblate.org/engage/homepage/)
|
||||
* Service & Web Bookmarks
|
||||
* Docker Integration
|
||||
- Container status (Running / Stopped) & statistics (CPU, Memory, Network)
|
||||
- Automatic service discovery (via labels)
|
||||
* Service Integration
|
||||
- Currently supports Sonarr, Radarr, Ombi, Emby, Jellyfin, Tautulli (Plex), Overseerr, Jellyseerr ([ilusi0n](https://github.com/benphelps/homepage/pull/34)), NZBGet, ruTorrent
|
||||
- Portainer, Traefik, Speedtest Tracker, PiHole, Nginx Proxy Manager ([aidenpwnz](https://github.com/benphelps/homepage/pull/45))
|
||||
- Sonarr, Radarr, Readarr, Emby, Jellyfin, Tautulli (Plex)
|
||||
- Ombi, Overseerr, Jellyseerr, NZBGet, SABnzbd, ruTorrent
|
||||
- Portainer, Traefik, Speedtest Tracker, PiHole, Nginx Proxy Manager, Gotify
|
||||
* Information Providers
|
||||
- Coin Market Cap
|
||||
* Information & Utility Widgets
|
||||
- System Stats (Disk, CPU, Memory)
|
||||
- Weather via WeatherAPI.com or OpenWeatherMap ([AlexFullmoon](https://github.com/benphelps/homepage/pull/25))
|
||||
- Weather via WeatherAPI.com or OpenWeatherMap
|
||||
- Automatic location detection (with HTTPS), or manual location selection
|
||||
- Search Bar ([aidenpwnz](https://github.com/benphelps/homepage/pull/45))
|
||||
- Search Bar
|
||||
* Customizable
|
||||
- 21 theme colors with light and dark mode support
|
||||
- Background image support
|
||||
@@ -108,3 +110,25 @@ pnpm dev
|
||||
Open [http://localhost:3000](http://localhost:3000) to start.
|
||||
|
||||
This is a [Next.js](https://nextjs.org/) application, see their doucmentation for more information:
|
||||
|
||||
## Contributors
|
||||
|
||||
Huge thanks to the all the contributors who have helped make this project what it is today! In alphabetical order:
|
||||
|
||||
* [aidenpwnz](https://github.com/benphelps/homepage/commits?author=aidenpwnz) - Nginx Proxy Manager, Search Bar Widget
|
||||
* [AlexFullmoon](https://github.com/benphelps/homepage/commits?author=AlexFullmoon) - OpenWeatherMap Widget
|
||||
* [AmadeusGraves](https://github.com/benphelps/homepage/commits?author=AmadeusGraves) - Spanish Translation
|
||||
* [boerniee](https://github.com/benphelps/homepage/commits?author=boerniee) - German Translation
|
||||
* [comradekingu](https://github.com/benphelps/homepage/commits?author=comradekingu) - Norwegian Bokmål Translation
|
||||
* [deffcolony](https://github.com/benphelps/homepage/commits?author=deffcolony) - Dutch Translation
|
||||
* [desolaris](https://github.com/benphelps/homepage/commits?author=desolaris) - Russian Translation
|
||||
* [ilusi0n](https://github.com/benphelps/homepage/commits?author=ilusi0n) - Jellyseerr Integration
|
||||
* [ItsJustMeChris](https://github.com/benphelps/homepage/commits?author=ItsJustMeChris) - Coin Market Cap Widget
|
||||
* [jackblk](https://github.com/benphelps/homepage/commits?author=jackblk) - Vietnamese Translation
|
||||
* [JazzFisch](https://github.com/benphelps/homepage/commits?author=JazzFisch) - Readarr, SABnzbd Integrations
|
||||
* [modem7](https://github.com/benphelps/homepage/commits?author=modem7) - Impvoed Docker Image
|
||||
* [nicedc](https://github.com/benphelps/homepage/commits?author=nicedc) - Chinese Translation
|
||||
* [Nonoss117](https://github.com/benphelps/homepage/commits?author=Nonoss117) - French Translation
|
||||
* [quod](https://github.com/benphelps/homepage/commits?author=quod) - Fixed Typos
|
||||
* [schklom](https://github.com/benphelps/homepage/commits?author=schklom) - ARM64, ARMv7 and ARMv6
|
||||
* [xicopitz](https://github.com/benphelps/homepage/commits?author=xicopitz) - Gotify Integration
|
||||
|
||||
BIN
images/icons/coinmarketcap.png
Normal file
BIN
images/icons/coinmarketcap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -3,9 +3,9 @@ const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
output: "standalone",
|
||||
swcMinify: false,
|
||||
experimental: { images: { allowFutureImage: true, unoptimized: true } },
|
||||
images: {
|
||||
domains: ["cdn.jsdelivr.net"],
|
||||
unoptimized: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
21
package.json
21
package.json
@@ -9,9 +9,10 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^1.6.6",
|
||||
"@headlessui/react": "^1.7.0",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"classnames": "^2.3.1",
|
||||
"currency-symbol-map": "^5.1.0",
|
||||
"dockerode": "^3.3.4",
|
||||
"i18next": "^21.9.1",
|
||||
"i18next-browser-languagedetector": "^6.1.5",
|
||||
@@ -19,32 +20,32 @@
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-rpc-2.0": "^1.4.1",
|
||||
"memory-cache": "^0.2.0",
|
||||
"next": "12.2.5",
|
||||
"next": "^12.3.0",
|
||||
"node-os-utils": "^1.3.7",
|
||||
"pretty-bytes": "^6.0.0",
|
||||
"raw-body": "^2.5.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-i18next": "^11.18.5",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-i18next": "^11.18.6",
|
||||
"react-icons": "^4.4.0",
|
||||
"rutorrent-promise": "^2.0.0",
|
||||
"shvl": "^3.0.0",
|
||||
"swr": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.8",
|
||||
"eslint": "8.22.0",
|
||||
"autoprefixer": "^10.4.9",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-next": "12.2.5",
|
||||
"eslint-config-next": "^12.3.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react": "^7.31.8",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"postcss": "^8.4.16",
|
||||
"prettier": "^2.7.1",
|
||||
"tailwindcss": "^3.1.8",
|
||||
"typescript": "^4.8.2"
|
||||
"typescript": "^4.8.3"
|
||||
}
|
||||
}
|
||||
|
||||
467
pnpm-lock.yaml
generated
467
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -31,11 +31,6 @@
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Verblieben",
|
||||
"downloaded": "Heruntergeladen"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Aktiv",
|
||||
"upload": "Hochladen",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "In Warteschlange",
|
||||
"movies": "Filme"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Ausstehend",
|
||||
"approved": "Genehmigt",
|
||||
@@ -96,5 +96,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Active",
|
||||
"upload": "Upload",
|
||||
@@ -68,6 +73,11 @@
|
||||
"queued": "Queued",
|
||||
"movies": "Movies"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
@@ -107,5 +117,13 @@
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"total": "Total"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,18 +23,13 @@
|
||||
"playing": "En ejecución",
|
||||
"transcoding": "Transcodificando",
|
||||
"bitrate": "Tasa de Bits",
|
||||
"no_active": "No Active Streams"
|
||||
"no_active": "No hay streams activos"
|
||||
},
|
||||
"tautulli": {
|
||||
"playing": "En ejecución",
|
||||
"transcoding": "Transcodificación",
|
||||
"bitrate": "Tasa de bits",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Velocidad",
|
||||
"remaining": "Restante",
|
||||
"downloaded": "Descargado"
|
||||
"no_active": "No hay streams activos"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Activo",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "Puesto en cola",
|
||||
"movies": "Películas"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Pendiente",
|
||||
"approved": "Aprobado",
|
||||
@@ -93,8 +93,26 @@
|
||||
"wait": "Espere, por favor"
|
||||
},
|
||||
"overseerr": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
"pending": "Pendiente",
|
||||
"approved": "Aprobado",
|
||||
"available": "Disponible"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,33 +8,28 @@
|
||||
"placeholder": "Recherche…"
|
||||
},
|
||||
"resources": {
|
||||
"total": "Totale",
|
||||
"total": "Total",
|
||||
"free": "Libre",
|
||||
"used": "Utilisée"
|
||||
},
|
||||
"docker": {
|
||||
"rx": "Rx",
|
||||
"tx": "TX",
|
||||
"mem": "Mem",
|
||||
"cpu": "CPU",
|
||||
"tx": "Tx",
|
||||
"mem": "Mém",
|
||||
"cpu": "Cpu",
|
||||
"offline": "Hors ligne"
|
||||
},
|
||||
"emby": {
|
||||
"playing": "En jouant",
|
||||
"transcoding": "Transcoding",
|
||||
"bitrate": "Débiter",
|
||||
"no_active": "No Active Streams"
|
||||
"playing": "En lecture",
|
||||
"transcoding": "Transcodage",
|
||||
"bitrate": "Débit",
|
||||
"no_active": "Aucun flux actif"
|
||||
},
|
||||
"tautulli": {
|
||||
"playing": "En jouant",
|
||||
"transcoding": "Transcoding",
|
||||
"bitrate": "Débiter",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Évaluer",
|
||||
"remaining": "Restante",
|
||||
"downloaded": "Téléchargé"
|
||||
"playing": "En lecture",
|
||||
"transcoding": "Transcodage",
|
||||
"bitrate": "Débit",
|
||||
"no_active": "Aucun flux actif"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Active",
|
||||
@@ -44,13 +39,18 @@
|
||||
"sonarr": {
|
||||
"wanted": "Recherchée",
|
||||
"queued": "En queue",
|
||||
"series": "Série"
|
||||
"series": "Séries"
|
||||
},
|
||||
"radarr": {
|
||||
"wanted": "Recherchée",
|
||||
"queued": "En queue",
|
||||
"movies": "Films"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "En attente",
|
||||
"approved": "Approuvée",
|
||||
@@ -74,7 +74,7 @@
|
||||
"portainer": {
|
||||
"running": "Fonctionnement",
|
||||
"stopped": "Arrêté",
|
||||
"total": "Totale"
|
||||
"total": "Total"
|
||||
},
|
||||
"traefik": {
|
||||
"routers": "Routeurs",
|
||||
@@ -83,8 +83,8 @@
|
||||
},
|
||||
"npm": {
|
||||
"enabled": "Activé",
|
||||
"disabled": "Handicapée",
|
||||
"total": "Totale"
|
||||
"disabled": "Désactivé",
|
||||
"total": "Total"
|
||||
},
|
||||
"common": {
|
||||
"bbytes": "{{value, bytes(binary: true)}}",
|
||||
@@ -104,8 +104,26 @@
|
||||
"wait": "Veuillez patienter"
|
||||
},
|
||||
"overseerr": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
"pending": "En attente",
|
||||
"approved": "Approuvée",
|
||||
"available": "Disponible"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded",
|
||||
"rate": "Rate"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
"rx": "RX"
|
||||
},
|
||||
"emby": {
|
||||
"playing": "Playing",
|
||||
"playing": "In riproduzione",
|
||||
"transcoding": "Transcoding",
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
"no_active": "Nessuno Stream Attivo"
|
||||
},
|
||||
"tautulli": {
|
||||
"playing": "Playing",
|
||||
"playing": "In riproduzione",
|
||||
"transcoding": "Transcoding",
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
"no_active": "Nessuno Stream Attivo"
|
||||
},
|
||||
"speedtest": {
|
||||
"upload": "Upload",
|
||||
@@ -24,77 +24,95 @@
|
||||
"ping": "Ping"
|
||||
},
|
||||
"portainer": {
|
||||
"running": "Running",
|
||||
"stopped": "Stopped",
|
||||
"total": "Total"
|
||||
"running": "In esecuzione",
|
||||
"stopped": "Fermati",
|
||||
"total": "Totali"
|
||||
},
|
||||
"traefik": {
|
||||
"routers": "Routers",
|
||||
"services": "Services",
|
||||
"services": "Servizi",
|
||||
"middleware": "Middleware"
|
||||
},
|
||||
"widget": {
|
||||
"missing_type": "Missing Widget Type: {{type}}",
|
||||
"api_error": "API Error",
|
||||
"status": "Status"
|
||||
"api_error": "Errore API",
|
||||
"status": "Stato"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Search…"
|
||||
"placeholder": "Cerca…"
|
||||
},
|
||||
"resources": {
|
||||
"total": "Total",
|
||||
"free": "Free",
|
||||
"used": "Used"
|
||||
"total": "Totale",
|
||||
"free": "Libero",
|
||||
"used": "In utilizzo"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Attivo",
|
||||
"upload": "Upload",
|
||||
"download": "Download"
|
||||
},
|
||||
"sonarr": {
|
||||
"series": "Serie",
|
||||
"wanted": "Rchiesti",
|
||||
"queued": "In coda"
|
||||
},
|
||||
"radarr": {
|
||||
"wanted": "Richiesti",
|
||||
"queued": "In coda",
|
||||
"movies": "Film"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "In attesa",
|
||||
"approved": "Approvati",
|
||||
"available": "Disponibili"
|
||||
},
|
||||
"jellyseerr": {
|
||||
"pending": "In attesa",
|
||||
"approved": "Approvati",
|
||||
"available": "Disponibili"
|
||||
},
|
||||
"pihole": {
|
||||
"queries": "Richieste",
|
||||
"blocked": "Bloccati",
|
||||
"gravity": "Severità"
|
||||
},
|
||||
"npm": {
|
||||
"enabled": "Attivi",
|
||||
"disabled": "Disabilitati",
|
||||
"total": "Totali"
|
||||
},
|
||||
"weather": {
|
||||
"current": "Posizione Attuale",
|
||||
"allow": "Clicca per consentire",
|
||||
"updating": "Aggiornamento in corso",
|
||||
"wait": "Attendi per favore"
|
||||
},
|
||||
"overseerr": {
|
||||
"pending": "In attesa",
|
||||
"approved": "Approvati",
|
||||
"available": "Disponibili"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Active",
|
||||
"upload": "Upload",
|
||||
"download": "Download"
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"sonarr": {
|
||||
"series": "Series",
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued"
|
||||
},
|
||||
"radarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"movies": "Movies"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"jellyseerr": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"pihole": {
|
||||
"queries": "Queries",
|
||||
"blocked": "Blocked",
|
||||
"gravity": "Gravity"
|
||||
},
|
||||
"npm": {
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"total": "Total"
|
||||
},
|
||||
"weather": {
|
||||
"current": "Current Location",
|
||||
"allow": "Click to allow",
|
||||
"updating": "Updating",
|
||||
"wait": "Please wait"
|
||||
},
|
||||
"overseerr": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Takt",
|
||||
"remaining": "Gjenstående",
|
||||
"downloaded": "Nedlastet"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Aktiv",
|
||||
"upload": "Opplasting",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "I kø",
|
||||
"movies": "Filmer"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Venter",
|
||||
"approved": "Godkjent",
|
||||
@@ -96,5 +96,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"downloaded": "Downloaded",
|
||||
"remaining": "Remaining"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
"cpu": "CPU",
|
||||
"offline": "Offline"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Overgebleven",
|
||||
"downloaded": "Gedownload"
|
||||
},
|
||||
"speedtest": {
|
||||
"upload": "Upload",
|
||||
"download": "Download",
|
||||
@@ -67,6 +62,11 @@
|
||||
"wanted": "Gezocht",
|
||||
"queued": "In de wachtrij"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "In afwachting",
|
||||
"approved": "Goedgekeurd",
|
||||
@@ -96,5 +96,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"bitrate": "Taxa de bits",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Avaliar",
|
||||
"remaining": "Em falta",
|
||||
"downloaded": "Baixada"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Ativa",
|
||||
"upload": "Envio",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "Enfileiradas",
|
||||
"movies": "Filmes"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Pendente",
|
||||
"approved": "Aprovada",
|
||||
@@ -107,5 +107,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Aplicações",
|
||||
"clients": "Clientes",
|
||||
"messages": "Mensagens"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"bitrate": "Битрейт",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Оценка",
|
||||
"remaining": "Осталось",
|
||||
"downloaded": "Загружено"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Активный",
|
||||
"upload": "Загрузить",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "В очереди",
|
||||
"movies": "Фильмы"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Ожидание",
|
||||
"approved": "Одобрено",
|
||||
@@ -96,5 +96,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"bitrate": "Bitrate",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Còn lại",
|
||||
"downloaded": "Đã tải"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "Hoạt động",
|
||||
"upload": "Tải lên",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "Queued",
|
||||
"movies": "Movies"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
@@ -96,5 +96,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@
|
||||
"bitrate": "比特率",
|
||||
"no_active": "No Active Streams"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "速度",
|
||||
"remaining": "其余的",
|
||||
"downloaded": "下载"
|
||||
},
|
||||
"rutorrent": {
|
||||
"active": "积极的",
|
||||
"upload": "上传",
|
||||
@@ -51,6 +46,11 @@
|
||||
"queued": "排队",
|
||||
"movies": "电影"
|
||||
},
|
||||
"readarr": {
|
||||
"wanted": "Wanted",
|
||||
"queued": "Queued",
|
||||
"books": "Books"
|
||||
},
|
||||
"ombi": {
|
||||
"pending": "待办的",
|
||||
"approved": "得到正式认可的",
|
||||
@@ -96,5 +96,23 @@
|
||||
"pending": "Pending",
|
||||
"approved": "Approved",
|
||||
"available": "Available"
|
||||
},
|
||||
"sabnzbd": {
|
||||
"rate": "Rate",
|
||||
"queue": "Queue",
|
||||
"timeleft": "Time Left"
|
||||
},
|
||||
"nzbget": {
|
||||
"rate": "Rate",
|
||||
"remaining": "Remaining",
|
||||
"downloaded": "Downloaded"
|
||||
},
|
||||
"coinmarketcap": {
|
||||
"configure": "Configure one or more crypto currencies to track"
|
||||
},
|
||||
"gotify": {
|
||||
"apps": "Applications",
|
||||
"clients": "Clients",
|
||||
"messages": "Messages"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,43 +22,58 @@ function resolveIcon(icon) {
|
||||
}
|
||||
|
||||
export default function Item({ service }) {
|
||||
const handleOnClick = () => {
|
||||
if (service.href && service.href !== "#") {
|
||||
window.open(service.href, "_blank").focus();
|
||||
}
|
||||
};
|
||||
|
||||
const hasLink = service.href && service.href !== "#";
|
||||
|
||||
return (
|
||||
<li key={service.name}>
|
||||
<Disclosure>
|
||||
<div
|
||||
className={`${
|
||||
service.href && service.href !== "#" ? "cursor-pointer " : "cursor-default "
|
||||
hasLink ? "cursor-pointer " : " "
|
||||
}transition-all h-15 mb-3 p-1 rounded-md font-medium text-theme-700 hover:text-theme-700/70 dark:text-theme-200 dark:hover:text-theme-300 shadow-md shadow-black/10 dark:shadow-black/20 bg-white/50 hover:bg-theme-300/20 dark:bg-white/10 dark:hover:bg-white/20 backdrop-blur-md`}
|
||||
>
|
||||
<div className="flex">
|
||||
{service.icon && (
|
||||
<div className="flex select-none">
|
||||
{service.icon &&
|
||||
(hasLink ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleOnClick}
|
||||
className="flex-shrink-0 flex items-center justify-center w-12 "
|
||||
>
|
||||
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||
</button>
|
||||
) : (
|
||||
<div className="flex-shrink-0 flex items-center justify-center w-12 ">
|
||||
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||
</div>
|
||||
))}
|
||||
|
||||
{hasLink ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (service.href && service.href !== "#") {
|
||||
window.open(service.href, "_blank").focus();
|
||||
}
|
||||
}}
|
||||
className="flex-shrink-0 flex items-center justify-center w-12 "
|
||||
onClick={handleOnClick}
|
||||
className="flex-1 flex items-center justify-between rounded-r-md "
|
||||
>
|
||||
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||
<div className="flex-1 px-2 py-2 text-sm text-left">
|
||||
{service.name}
|
||||
<p className="text-theme-500 dark:text-theme-400 text-xs font-extralight">{service.description}</p>
|
||||
</div>
|
||||
</button>
|
||||
) : (
|
||||
<div className="flex-1 flex items-center justify-between rounded-r-md ">
|
||||
<div className="flex-1 px-2 py-2 text-sm text-left">
|
||||
{service.name}
|
||||
<p className="text-theme-500 dark:text-theme-400 text-xs font-extralight">{service.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (service.href && service.href !== "#") {
|
||||
window.open(service.href, "_blank").focus();
|
||||
}
|
||||
}}
|
||||
className="flex-1 flex items-center justify-between rounded-r-md "
|
||||
>
|
||||
<div className="flex-1 px-2 py-2 text-sm text-left">
|
||||
{service.name}
|
||||
<p className="text-theme-500 dark:text-theme-400 text-xs font-extralight">{service.description}</p>
|
||||
</div>
|
||||
</button>
|
||||
{service.container && (
|
||||
<Disclosure.Button
|
||||
as="div"
|
||||
|
||||
@@ -2,10 +2,12 @@ import { useTranslation } from "react-i18next";
|
||||
|
||||
import Sonarr from "./widgets/service/sonarr";
|
||||
import Radarr from "./widgets/service/radarr";
|
||||
import Readarr from "./widgets/service/readarr";
|
||||
import Ombi from "./widgets/service/ombi";
|
||||
import Portainer from "./widgets/service/portainer";
|
||||
import Emby from "./widgets/service/emby";
|
||||
import Nzbget from "./widgets/service/nzbget";
|
||||
import SABnzbd from "./widgets/service/sabnzbd";
|
||||
import Docker from "./widgets/service/docker";
|
||||
import Pihole from "./widgets/service/pihole";
|
||||
import Rutorrent from "./widgets/service/rutorrent";
|
||||
@@ -16,11 +18,14 @@ import Jellyseerr from "./widgets/service/jellyseerr";
|
||||
import Overseerr from "./widgets/service/overseerr";
|
||||
import Npm from "./widgets/service/npm";
|
||||
import Tautulli from "./widgets/service/tautulli";
|
||||
import CoinMarketCap from "./widgets/service/coinmarketcap";
|
||||
import Gotify from "./widgets/service/gotify";
|
||||
|
||||
const widgetMappings = {
|
||||
docker: Docker,
|
||||
sonarr: Sonarr,
|
||||
radarr: Radarr,
|
||||
readarr: Readarr,
|
||||
ombi: Ombi,
|
||||
portainer: Portainer,
|
||||
emby: Emby,
|
||||
@@ -32,8 +37,11 @@ const widgetMappings = {
|
||||
traefik: Traefik,
|
||||
jellyseerr: Jellyseerr,
|
||||
overseerr: Overseerr,
|
||||
coinmarketcap: CoinMarketCap,
|
||||
npm: Npm,
|
||||
tautulli: Tautulli,
|
||||
gotify: Gotify,
|
||||
sabnzbd: SABnzbd
|
||||
};
|
||||
|
||||
export default function Widget({ service }) {
|
||||
|
||||
71
src/components/services/widgets/service/coinmarketcap.jsx
Normal file
71
src/components/services/widgets/service/coinmarketcap.jsx
Normal file
@@ -0,0 +1,71 @@
|
||||
import useSWR from "swr";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import getSymbolFromCurrency from "currency-symbol-map";
|
||||
|
||||
import Widget from "../widget";
|
||||
import Block from "../block";
|
||||
|
||||
import { formatApiUrl } from "utils/api-helpers";
|
||||
|
||||
export default function CoinMarketCap({ service }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const config = service.widget;
|
||||
const currencyCode = config.currency ?? "USD";
|
||||
const { symbols } = config;
|
||||
|
||||
const { data: statsData, error: statsError } = useSWR(
|
||||
formatApiUrl(config, `v1/cryptocurrency/quotes/latest?symbol=${symbols.join(",")}&convert=${currencyCode}`)
|
||||
);
|
||||
|
||||
if (!symbols || symbols.length === 0) {
|
||||
return (
|
||||
<Widget>
|
||||
<Block value={t("coinmarketcap.configure")} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
|
||||
if (statsError) {
|
||||
return <Widget error={t("widget.api_error")} />;
|
||||
}
|
||||
|
||||
if (!statsData) {
|
||||
return (
|
||||
<Widget>
|
||||
<Block value={t("coinmarketcap.configure")} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
|
||||
const { data } = statsData;
|
||||
const currencySymbol = getSymbolFromCurrency(currencyCode);
|
||||
|
||||
return (
|
||||
<Widget>
|
||||
<div className="flex flex-col w-full">
|
||||
{symbols.map((key) => (
|
||||
<div
|
||||
key={data[key].symbol}
|
||||
className="bg-theme-200/50 dark:bg-theme-900/20 rounded m-1 flex-1 flex flex-row items-center justify-between p-1 text-xs"
|
||||
>
|
||||
<div className="font-thin pl-2">{data[key].name}</div>
|
||||
<div className="flex flex-row text-right">
|
||||
<div className="font-bold mr-2">
|
||||
{currencySymbol}
|
||||
{data[key].quote[currencyCode].price.toFixed(2)}
|
||||
</div>
|
||||
<div
|
||||
className={`font-bold w-10 mr-2 ${
|
||||
data[key].quote[currencyCode].percent_change_1h > 0 ? "text-emerald-300" : "text-rose-300"
|
||||
}`}
|
||||
>
|
||||
{data[key].quote[currencyCode].percent_change_1h.toFixed(2)}%
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
@@ -27,6 +27,7 @@ function ticksToString(ticks) {
|
||||
}
|
||||
|
||||
function SingleSessionEntry({ playCommand, session }) {
|
||||
console.log(session);
|
||||
const {
|
||||
NowPlayingItem: { Name, SeriesName, RunTimeTicks },
|
||||
PlayState: { PositionTicks, IsPaused, IsMuted },
|
||||
@@ -175,7 +176,7 @@ export default function Emby({ service }) {
|
||||
|
||||
if (playing.length === 0) {
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
<div className="text-theme-700 dark:text-theme-200 text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1">
|
||||
<span className="absolute left-2 text-xs mt-[2px]">{t("emby.no_active")}</span>
|
||||
</div>
|
||||
@@ -189,7 +190,7 @@ export default function Emby({ service }) {
|
||||
if (playing.length === 1) {
|
||||
const session = playing[0];
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
<SingleSessionEntry
|
||||
playCommand={(currentSession, command) => handlePlayCommand(currentSession, command)}
|
||||
session={session}
|
||||
@@ -199,7 +200,7 @@ export default function Emby({ service }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
{playing.map((session) => (
|
||||
<SessionEntry
|
||||
key={session.Id}
|
||||
|
||||
29
src/components/services/widgets/service/gotify.jsx
Normal file
29
src/components/services/widgets/service/gotify.jsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import useSWR from "swr";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import Widget from "../widget";
|
||||
import Block from "../block";
|
||||
|
||||
import { formatApiUrl } from "utils/api-helpers";
|
||||
|
||||
export default function Gotify({ service }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const config = service.widget;
|
||||
|
||||
const { data: appsData, error: appsError } = useSWR(formatApiUrl(config, `application`));
|
||||
const { data: messagesData, error: messagesError } = useSWR(formatApiUrl(config, `message`));
|
||||
const { data: clientsData, error: clientsError } = useSWR(formatApiUrl(config, `client`));
|
||||
|
||||
if (appsError || messagesError || clientsError) {
|
||||
return <Widget error={t("widget.api_error")} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Widget>
|
||||
<Block label={t("gotify.apps")} value={appsData?.length} />
|
||||
<Block label={t("gotify.clients")} value={clientsData?.length} />
|
||||
<Block label={t("gotify.messages")} value={messagesData?.messages?.length} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
41
src/components/services/widgets/service/readarr.jsx
Normal file
41
src/components/services/widgets/service/readarr.jsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import useSWR from "swr";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import Widget from "../widget";
|
||||
import Block from "../block";
|
||||
|
||||
import { formatApiUrl } from "utils/api-helpers";
|
||||
|
||||
export default function Readarr({ service }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const config = service.widget;
|
||||
|
||||
const { data: booksData, error: booksError } = useSWR(formatApiUrl(config, "book"));
|
||||
const { data: wantedData, error: wantedError } = useSWR(formatApiUrl(config, "wanted/missing"));
|
||||
const { data: queueData, error: queueError } = useSWR(formatApiUrl(config, "queue/status"));
|
||||
|
||||
if (booksError || wantedError || queueError) {
|
||||
return <Widget error={t("widget.api_error")} />;
|
||||
}
|
||||
|
||||
if (!booksData || !wantedData || !queueData) {
|
||||
return (
|
||||
<Widget>
|
||||
<Block label={t("readarr.wanted")} />
|
||||
<Block label={t("readarr.queued")} />
|
||||
<Block label={t("readarr.books")} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
|
||||
const have = booksData.filter((book) => book.statistics.bookFileCount > 0);
|
||||
|
||||
return (
|
||||
<Widget>
|
||||
<Block label={t("readarr.wanted")} value={wantedData.totalRecords} />
|
||||
<Block label={t("readarr.queued")} value={queueData.totalCount} />
|
||||
<Block label={t("readarr.books")} value={have.length} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
37
src/components/services/widgets/service/sabnzbd.jsx
Normal file
37
src/components/services/widgets/service/sabnzbd.jsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import useSWR from "swr";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import Widget from "../widget";
|
||||
import Block from "../block";
|
||||
|
||||
import { formatApiUrl } from "utils/api-helpers";
|
||||
|
||||
export default function SABnzbd({ service }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const config = service.widget;
|
||||
|
||||
const { data: queueData, error: queueError } = useSWR(formatApiUrl(config, "queue"));
|
||||
|
||||
if (queueError) {
|
||||
return <Widget error={t("widget.api_error")} />;
|
||||
}
|
||||
|
||||
if (!queueData) {
|
||||
return (
|
||||
<Widget>
|
||||
<Block label={t("sabnzbd.rate")} />
|
||||
<Block label={t("sabnzbd.queue")} />
|
||||
<Block label={t("sabnzbd.timeleft")} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Widget>
|
||||
<Block label={t("sabnzbd.rate")} value={`${queueData.queue.speed}bps`} />
|
||||
<Block label={t("sabnzbd.queue")} value={queueData.queue.noofslots} />
|
||||
<Block label={t("sabnzbd.timeleft")} value={queueData.queue.timeleft} />
|
||||
</Widget>
|
||||
);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ export default function Tautulli({ service }) {
|
||||
|
||||
if (!activityData) {
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
<div className="text-theme-700 dark:text-theme-200 text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1">
|
||||
<span className="absolute left-2 text-xs mt-[2px]">-</span>
|
||||
</div>
|
||||
@@ -127,7 +127,7 @@ export default function Tautulli({ service }) {
|
||||
|
||||
if (playing.length === 0) {
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
<div className="text-theme-700 dark:text-theme-200 text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1">
|
||||
<span className="absolute left-2 text-xs mt-[2px]">{t("tautulli.no_active")}</span>
|
||||
</div>
|
||||
@@ -141,14 +141,14 @@ export default function Tautulli({ service }) {
|
||||
if (playing.length === 1) {
|
||||
const session = playing[0];
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
<SingleSessionEntry session={session} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col pb-1">
|
||||
<div className="flex flex-col pb-1 mx-1">
|
||||
{playing.map((session) => (
|
||||
<SessionEntry key={session.Id} session={session} />
|
||||
))}
|
||||
|
||||
@@ -16,7 +16,7 @@ function Widget({ options }) {
|
||||
|
||||
if (error || data?.cod === 401 || data?.error) {
|
||||
return (
|
||||
<div className="flex flex-col justify-center">
|
||||
<div className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
<BiError className="w-8 h-8 text-theme-800 dark:text-theme-200" />
|
||||
@@ -32,7 +32,7 @@ function Widget({ options }) {
|
||||
|
||||
if (!data) {
|
||||
return (
|
||||
<div className="flex flex-col justify-center">
|
||||
<div className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
<WiCloudDown className="w-8 h-8 text-theme-800 dark:text-theme-200" />
|
||||
@@ -49,7 +49,7 @@ function Widget({ options }) {
|
||||
const unit = options.units === "metric" ? "celsius" : "fahrenheit";
|
||||
|
||||
return (
|
||||
<div className="flex flex-col justify-center">
|
||||
<div className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
<Icon
|
||||
@@ -100,7 +100,7 @@ export default function OpenWeatherMap({ options }) {
|
||||
|
||||
if (!location) {
|
||||
return (
|
||||
<button type="button" onClick={() => requestLocation()} className="flex flex-col justify-center">
|
||||
<button type="button" onClick={() => requestLocation()} className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
{requesting ? (
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function Search({ options }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<form className="flex-col relative h-8 my-4 min-w-full md:min-w-fit grow mr-4" onSubmit={handleSubmit}>
|
||||
<form className="flex-col relative h-8 my-4 min-w-full md:min-w-fit grow first:ml-0 ml-4" onSubmit={handleSubmit}>
|
||||
<div className="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none w-full text-theme-800 dark:text-white" />
|
||||
<input
|
||||
type="text"
|
||||
|
||||
@@ -16,7 +16,7 @@ function Widget({ options }) {
|
||||
|
||||
if (error || data?.error) {
|
||||
return (
|
||||
<div className="flex flex-col justify-center">
|
||||
<div className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
<BiError className="w-8 h-8 text-theme-800 dark:text-theme-200" />
|
||||
@@ -32,7 +32,7 @@ function Widget({ options }) {
|
||||
|
||||
if (!data) {
|
||||
return (
|
||||
<div className="flex flex-col justify-center">
|
||||
<div className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
<WiCloudDown className="w-8 h-8 text-theme-800 dark:text-theme-200" />
|
||||
@@ -49,7 +49,7 @@ function Widget({ options }) {
|
||||
const unit = options.units === "metric" ? "celsius" : "fahrenheit";
|
||||
|
||||
return (
|
||||
<div className="flex flex-col justify-center">
|
||||
<div className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
<Icon condition={data.current.condition.code} timeOfDay={data.current.is_day ? "day" : "night"} />
|
||||
@@ -101,7 +101,7 @@ export default function WeatherApi({ options }) {
|
||||
|
||||
if (!location) {
|
||||
return (
|
||||
<button type="button" onClick={() => requestLocation()} className="flex flex-col justify-center">
|
||||
<button type="button" onClick={() => requestLocation()} className="flex flex-col justify-center first:ml-0 ml-4">
|
||||
<div className="flex flex-row items-center justify-end">
|
||||
<div className="flex flex-col items-center">
|
||||
{requesting ? (
|
||||
|
||||
@@ -11,14 +11,18 @@ const serviceProxyHandlers = {
|
||||
pihole: genericProxyHandler,
|
||||
radarr: genericProxyHandler,
|
||||
sonarr: genericProxyHandler,
|
||||
readarr: genericProxyHandler,
|
||||
speedtest: genericProxyHandler,
|
||||
tautulli: genericProxyHandler,
|
||||
traefik: genericProxyHandler,
|
||||
// uses X-API-Key header auth
|
||||
sabnzbd: genericProxyHandler,
|
||||
// uses X-API-Key (or similar) header auth
|
||||
gotify: credentialedProxyHandler,
|
||||
portainer: credentialedProxyHandler,
|
||||
jellyseerr: credentialedProxyHandler,
|
||||
overseerr: credentialedProxyHandler,
|
||||
ombi: credentialedProxyHandler,
|
||||
coinmarketcap: credentialedProxyHandler,
|
||||
// super specific handlers
|
||||
rutorrent: rutorrentProxyHandler,
|
||||
nzbget: nzbgetProxyHandler,
|
||||
|
||||
@@ -13,6 +13,10 @@ const formats = {
|
||||
overseerr: `{url}/api/v1/{endpoint}`,
|
||||
ombi: `{url}/api/v1/{endpoint}`,
|
||||
npm: `{url}/api/{endpoint}`,
|
||||
readarr: `{url}/api/v1/{endpoint}?apikey={key}`,
|
||||
sabnzbd: `{url}/api/?apikey={key}&output=json&mode={endpoint}`,
|
||||
coinmarketcap: `https://pro-api.coinmarketcap.com/{endpoint}`,
|
||||
gotify: `{url}/{endpoint}`,
|
||||
};
|
||||
|
||||
export function formatApiCall(api, args) {
|
||||
|
||||
@@ -10,14 +10,24 @@ export default async function credentialedProxyHandler(req, res) {
|
||||
|
||||
if (widget) {
|
||||
const url = new URL(formatApiCall(widget.type, { endpoint, ...widget }));
|
||||
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
|
||||
if (widget.type === "coinmarketcap") {
|
||||
headers["X-CMC_PRO_API_KEY"] = `${widget.key}`;
|
||||
} else if (widget.type === "gotify") {
|
||||
headers["X-gotify-Key"] = `${widget.key}`;
|
||||
} else {
|
||||
headers["X-API-Key"] = `${widget.key}`;
|
||||
}
|
||||
|
||||
const [status, contentType, data] = await httpProxy(url, {
|
||||
method: req.method,
|
||||
withCredentials: true,
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"X-API-Key": `${widget.key}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
headers,
|
||||
});
|
||||
|
||||
if (status === 204 || status === 304) {
|
||||
|
||||
@@ -110,13 +110,27 @@ export function cleanServiceGroups(groups) {
|
||||
const cleanedService = { ...service };
|
||||
|
||||
if (cleanedService.widget) {
|
||||
const { type } = cleanedService.widget;
|
||||
// whitelisted set of keys to pass to the frontend
|
||||
const {
|
||||
type, // all widgets
|
||||
server, // docker widget
|
||||
container,
|
||||
currency, // coinmarketcap widget
|
||||
symbols,
|
||||
} = cleanedService.widget;
|
||||
|
||||
cleanedService.widget = {
|
||||
type,
|
||||
currency,
|
||||
symbols,
|
||||
service_name: service.name,
|
||||
service_group: serviceGroup.name,
|
||||
};
|
||||
|
||||
if (type === "docker") {
|
||||
cleanedService.widget.server = server;
|
||||
cleanedService.widget.container = container;
|
||||
}
|
||||
}
|
||||
|
||||
return cleanedService;
|
||||
|
||||
Reference in New Issue
Block a user