Compare commits
181 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de4ce73a9a | ||
|
|
f52c6f3b41 | ||
|
|
2271cc0044 | ||
|
|
931ffe4c84 | ||
|
|
45f39120da | ||
|
|
000e15640a | ||
|
|
d4ad11a63f | ||
|
|
c533966050 | ||
|
|
9b7d6b196f | ||
|
|
512a6cd4b9 | ||
|
|
6b0659af1f | ||
|
|
12279e9bda | ||
|
|
dadd501843 | ||
|
|
756f6310af | ||
|
|
7a19bedc25 | ||
|
|
a10a30a22c | ||
|
|
57e4ca355b | ||
|
|
fed3102492 | ||
|
|
64e0e256ce | ||
|
|
287581025e | ||
|
|
3184b9ea0d | ||
|
|
233eb7e785 | ||
|
|
a801f8f65f | ||
|
|
4afe654bcc | ||
|
|
926be245a9 | ||
|
|
f1615e6660 | ||
|
|
ac6ecf21a0 | ||
|
|
8629f0a26d | ||
|
|
7a6ef23adb | ||
|
|
dfa19c96b9 | ||
|
|
334c023b4f | ||
|
|
1f373e0b3e | ||
|
|
47fc4040d5 | ||
|
|
f5e47ab61a | ||
|
|
83cdb2ed2b | ||
|
|
d67eca8882 | ||
|
|
a0044dd3ad | ||
|
|
149ed8c266 | ||
|
|
65755a08aa | ||
|
|
1ea8e38372 | ||
|
|
69adb3fde2 | ||
|
|
28be9b5988 | ||
|
|
0590896453 | ||
|
|
8f59c4a236 | ||
|
|
550af91030 | ||
|
|
bb5721c473 | ||
|
|
68c93c65e6 | ||
|
|
d36efa5796 | ||
|
|
0a58f259ff | ||
|
|
649f0038bc | ||
|
|
9697e302d7 | ||
|
|
415d59eeb3 | ||
|
|
3cb06eb526 | ||
|
|
2087c775fc | ||
|
|
4dd4363e91 | ||
|
|
314050b568 | ||
|
|
1765a97f31 | ||
|
|
30ac8cb41c | ||
|
|
959b778cd7 | ||
|
|
ca87a5527d | ||
|
|
711c3d1b67 | ||
|
|
5210a68cc6 | ||
|
|
616e56e3f5 | ||
|
|
8e0075ff90 | ||
|
|
c980c70798 | ||
|
|
fa2763d8cd | ||
|
|
d18e472623 | ||
|
|
5f0c1ec70a | ||
|
|
4386999c38 | ||
|
|
9b07f3eb90 | ||
|
|
b280e18651 | ||
|
|
086bfa310f | ||
|
|
990ae8464e | ||
|
|
e4c82b5e8d | ||
|
|
4d790feaae | ||
|
|
b72dca0e2e | ||
|
|
e1a3a82f75 | ||
|
|
ec8700f3e9 | ||
|
|
d999bb3f09 | ||
|
|
a83d5132d9 | ||
|
|
1840e9a57a | ||
|
|
d876ba30d4 | ||
|
|
47bc073fb4 | ||
|
|
808e79e2ac | ||
|
|
371eacb354 | ||
|
|
f04f5921e1 | ||
|
|
035dd25ece | ||
|
|
03fa2f86d7 | ||
|
|
f999f4a467 | ||
|
|
5cfadaea7f | ||
|
|
562235f828 | ||
|
|
d6f6ea9dba | ||
|
|
8bc240b934 | ||
|
|
3ae4113043 | ||
|
|
1f52435bc1 | ||
|
|
4d0dfcca61 | ||
|
|
ea9076652a | ||
|
|
af1a464d87 | ||
|
|
50fe6041f0 | ||
|
|
555a4b6b05 | ||
|
|
7709be8118 | ||
|
|
130ac76e0c | ||
|
|
ae315f1789 | ||
|
|
4782e72d88 | ||
|
|
d69cafee01 | ||
|
|
e066ed58ca | ||
|
|
05a65cbf9d | ||
|
|
ea6a668a84 | ||
|
|
08615fe9f6 | ||
|
|
f8ef5ddf5a | ||
|
|
595d81dd2f | ||
|
|
00c654953d | ||
|
|
bf2f3a7d17 | ||
|
|
612f0fde2d | ||
|
|
a701e031a7 | ||
|
|
d51854e663 | ||
|
|
cb9a18fd40 | ||
|
|
ed28d69d76 | ||
|
|
5667cedafc | ||
|
|
42fe535df7 | ||
|
|
0e1e2bde22 | ||
|
|
1a5e2f3cda | ||
|
|
32cb113014 | ||
|
|
559af0cd56 | ||
|
|
0e5477eecf | ||
|
|
ab631fa26e | ||
|
|
5776544c20 | ||
|
|
666e2a42cf | ||
|
|
2fc1dda122 | ||
|
|
0115b594d6 | ||
|
|
c5828978b2 | ||
|
|
3ff756e057 | ||
|
|
1c405ff4ec | ||
|
|
5d1041d564 | ||
|
|
9e8942398c | ||
|
|
a5b7c8439d | ||
|
|
9131a8f118 | ||
|
|
8687fe6b26 | ||
|
|
1d38fd8dea | ||
|
|
4186bbb3c3 | ||
|
|
897c71f36e | ||
|
|
f9ce9b7716 | ||
|
|
ec230ba249 | ||
|
|
6bfa49689e | ||
|
|
177acf86d7 | ||
|
|
c89ed904cc | ||
|
|
6add7c3d82 | ||
|
|
c562035776 | ||
|
|
4757e25fdc | ||
|
|
077bc356b8 | ||
|
|
1dff880a93 | ||
|
|
122b987fa3 | ||
|
|
c024c4f01c | ||
|
|
a677fbefbf | ||
|
|
244a76de0b | ||
|
|
20ac15b18c | ||
|
|
75244cc40e | ||
|
|
3e731298a5 | ||
|
|
ed0bf027fc | ||
|
|
7a10131768 | ||
|
|
19522b8712 | ||
|
|
af79061a45 | ||
|
|
d56d9f7a50 | ||
|
|
45a1a9ed5a | ||
|
|
50954cf3d4 | ||
|
|
6beefbf39a | ||
|
|
8f21d1ae31 | ||
|
|
e4825531c4 | ||
|
|
6174f53f37 | ||
|
|
42baa4b188 | ||
|
|
52eaddae37 | ||
|
|
f43ce0db44 | ||
|
|
b46cb0a1f7 | ||
|
|
e4e5ad7eba | ||
|
|
0e6ea57023 | ||
|
|
280bb5fc81 | ||
|
|
077d21eb7e | ||
|
|
f281d86e8a | ||
|
|
f7000a280e | ||
|
|
586ded6b3f | ||
|
|
539e0f005a |
@@ -2,6 +2,12 @@
|
|||||||
"extends": ["airbnb", "next/core-web-vitals", "prettier"],
|
"extends": ["airbnb", "next/core-web-vitals", "prettier"],
|
||||||
"plugins": ["prettier"],
|
"plugins": ["prettier"],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"import/no-cycle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"maxDepth": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
"import/order": [
|
"import/order": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|||||||
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
github: benphelps
|
||||||
|
ko_fi: benphelps
|
||||||
|
custom: ["https://paypal.me/phelpsben"]
|
||||||
4
.github/workflows/docker-publish.yml
vendored
@@ -94,6 +94,10 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
|
||||||
|
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||||
|
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
|
||||||
# https://github.com/docker/setup-qemu-action#about
|
# https://github.com/docker/setup-qemu-action#about
|
||||||
# platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
# platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
|
|||||||
4
.gitignore
vendored
@@ -19,6 +19,10 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*.pem
|
*.pem
|
||||||
|
|
||||||
|
# log files
|
||||||
|
error.log
|
||||||
|
homepage.log
|
||||||
|
|
||||||
# debug
|
# debug
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm i
|
|||||||
FROM node:current-alpine AS builder
|
FROM node:current-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
ARG BUILDTIME
|
||||||
|
ARG VERSION
|
||||||
|
ARG REVISION
|
||||||
|
|
||||||
COPY --link --from=deps /app/node_modules ./node_modules/
|
COPY --link --from=deps /app/node_modules ./node_modules/
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
@@ -29,7 +33,7 @@ RUN <<EOF
|
|||||||
set -xe
|
set -xe
|
||||||
yarn next telemetry disable
|
yarn next telemetry disable
|
||||||
mkdir config && echo '-' > config/settings.yaml
|
mkdir config && echo '-' > config/settings.yaml
|
||||||
npm run build
|
NEXT_PUBLIC_BUILDTIME=$BUILDTIME NEXT_PUBLIC_VERSION=$VERSION NEXT_PUBLIC_REVISION=$REVISION npm run build
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
# Production image, copy all the files and run next
|
||||||
|
|||||||
34
README.md
@@ -1,7 +1,28 @@
|
|||||||

|
<p align="center">
|
||||||
|
<br>
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="images/homepage-dark.png">
|
||||||
|
<img src="images/homepage-light.png" width="65%">
|
||||||
|
</picture>
|
||||||
|
<br><br>
|
||||||
|
<img src="images/1.png" />
|
||||||
|
<br>
|
||||||
|
<img src="images/2.png" width="19%" />
|
||||||
|
<img src="images/3.png" width="19%" />
|
||||||
|
<img src="images/4.png" width="19%" />
|
||||||
|
<img src="images/5.png" width="19%" />
|
||||||
|
<img src="images/6.png" width="19%" />
|
||||||
|
</p>
|
||||||
|
|
||||||
[](https://github.com/benphelps/homepage/actions/workflows/docker-publish.yml)
|
<p align="center">
|
||||||
[](https://hosted.weblate.org/engage/homepage/)
|
<a href="https://discord.gg/k4ruYNrudu"><img src="https://img.shields.io/badge/Discord - Chat-blue?logo=discord&logoColor=white" /></a>
|
||||||
|
<a href="https://paypal.me/phelpsben" title="Donate"><img src="https://img.shields.io/badge/PayPal - Donate-blue?logo=paypal&logoColor=white" alt="Linkedin - phelpsben"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/benphelps/homepage/actions/workflows/docker-publish.yml"><img src="https://github.com/benphelps/homepage/actions/workflows/docker-publish.yml/badge.svg" alt="Docker"></a>
|
||||||
|
<a href="https://hosted.weblate.org/engage/homepage/"><img src="https://hosted.weblate.org/widgets/homepage/-/homepage/svg-badge.svg" alt="Weblate"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@@ -18,9 +39,9 @@
|
|||||||
- Service Integration
|
- Service Integration
|
||||||
- Sonarr, Radarr, Readarr, Prowlarr, Bazarr, Lidarr, Emby, Jellyfin, Tautulli (Plex)
|
- Sonarr, Radarr, Readarr, Prowlarr, Bazarr, Lidarr, Emby, Jellyfin, Tautulli (Plex)
|
||||||
- Ombi, Overseerr, Jellyseerr, Jackett, NZBGet, SABnzbd, ruTorrent, Transmission, qBittorrent
|
- Ombi, Overseerr, Jellyseerr, Jackett, NZBGet, SABnzbd, ruTorrent, Transmission, qBittorrent
|
||||||
- Portainer, Traefik, Speedtest Tracker, PiHole, AdGuard Home, Nginx Proxy Manager, Gotify
|
- Portainer, Traefik, Speedtest Tracker, PiHole, AdGuard Home, Nginx Proxy Manager, Gotify, Syncthing Relay Server
|
||||||
- Information Providers
|
- Information Providers
|
||||||
- Coin Market Cap
|
- Coin Market Cap, Mastodon
|
||||||
- Information & Utility Widgets
|
- Information & Utility Widgets
|
||||||
- System Stats (Disk, CPU, Memory)
|
- System Stats (Disk, CPU, Memory)
|
||||||
- Weather via WeatherAPI.com or OpenWeatherMap
|
- Weather via WeatherAPI.com or OpenWeatherMap
|
||||||
@@ -123,9 +144,10 @@ Huge thanks to the all the contributors who have helped make this project what i
|
|||||||
- [andrii-kryvoviaz](https://github.com/benphelps/homepage/commits?author=andrii-kryvoviaz) - Background opacity option
|
- [andrii-kryvoviaz](https://github.com/benphelps/homepage/commits?author=andrii-kryvoviaz) - Background opacity option
|
||||||
- [boerniee](https://github.com/benphelps/homepage/commits?author=boerniee) - German 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
|
- [comradekingu](https://github.com/benphelps/homepage/commits?author=comradekingu) - Norwegian Bokmål Translation
|
||||||
- [Daniel Varga] - German & Hungarian Translation
|
- Daniel Varga - German & Hungarian Translation
|
||||||
- [deffcolony](https://github.com/benphelps/homepage/commits?author=deffcolony) - Dutch Translation
|
- [deffcolony](https://github.com/benphelps/homepage/commits?author=deffcolony) - Dutch Translation
|
||||||
- [desolaris](https://github.com/benphelps/homepage/commits?author=desolaris) - Russian Translation
|
- [desolaris](https://github.com/benphelps/homepage/commits?author=desolaris) - Russian Translation
|
||||||
|
- [DevPGSV](https://github.com/benphelps/homepage/commits?author=DevPGSV) - Syncthing Relay Server & Mastodon widgets
|
||||||
- [ilusi0n](https://github.com/benphelps/homepage/commits?author=ilusi0n) - Jellyseerr Integration
|
- [ilusi0n](https://github.com/benphelps/homepage/commits?author=ilusi0n) - Jellyseerr Integration
|
||||||
- [ItsJustMeChris](https://github.com/benphelps/homepage/commits?author=ItsJustMeChris) - Coin Market Cap Widget
|
- [ItsJustMeChris](https://github.com/benphelps/homepage/commits?author=ItsJustMeChris) - Coin Market Cap Widget
|
||||||
- [jackblk](https://github.com/benphelps/homepage/commits?author=jackblk) - Vietnamese Translation
|
- [jackblk](https://github.com/benphelps/homepage/commits?author=jackblk) - Vietnamese Translation
|
||||||
|
|||||||
BIN
images/1.png
Normal file
|
After Width: | Height: | Size: 345 KiB |
BIN
images/2.png
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
images/3.png
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
images/4.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
images/5.png
Normal file
|
After Width: | Height: | Size: 423 KiB |
BIN
images/6.png
Normal file
|
After Width: | Height: | Size: 533 KiB |
BIN
images/homepage-dark.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
images/homepage-light.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 777 KiB |
124
next-i18next.config.js
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
// prettyBytes taken from https://github.com/sindresorhus/pretty-bytes
|
||||||
|
|
||||||
|
/* eslint-disable no-param-reassign */
|
||||||
|
const BYTE_UNITS = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
||||||
|
|
||||||
|
const BIBYTE_UNITS = ["B", "kiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
||||||
|
|
||||||
|
const BIT_UNITS = ["b", "kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"];
|
||||||
|
|
||||||
|
const BIBIT_UNITS = ["b", "kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"];
|
||||||
|
|
||||||
|
/*
|
||||||
|
Formats the given number using `Number#toLocaleString`.
|
||||||
|
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
|
||||||
|
- If locale is true, the system default locale is used for translation.
|
||||||
|
- If no value for locale is specified, the number is returned unmodified.
|
||||||
|
*/
|
||||||
|
const toLocaleString = (number, locale, options) => {
|
||||||
|
let result = number;
|
||||||
|
if (typeof locale === "string" || Array.isArray(locale)) {
|
||||||
|
result = number.toLocaleString(locale, options);
|
||||||
|
} else if (locale === true || options !== undefined) {
|
||||||
|
result = number.toLocaleString(undefined, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
function prettyBytes(number, options) {
|
||||||
|
if (!Number.isFinite(number)) {
|
||||||
|
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
options = {
|
||||||
|
bits: false,
|
||||||
|
binary: false,
|
||||||
|
...options,
|
||||||
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-nested-ternary
|
||||||
|
const UNITS = options.bits ? (options.binary ? BIBIT_UNITS : BIT_UNITS) : options.binary ? BIBYTE_UNITS : BYTE_UNITS;
|
||||||
|
|
||||||
|
if (options.signed && number === 0) {
|
||||||
|
return ` 0 ${UNITS[0]}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isNegative = number < 0;
|
||||||
|
// eslint-disable-next-line no-nested-ternary
|
||||||
|
const prefix = isNegative ? "-" : options.signed ? "+" : "";
|
||||||
|
|
||||||
|
if (isNegative) {
|
||||||
|
number = -number;
|
||||||
|
}
|
||||||
|
|
||||||
|
let localeOptions;
|
||||||
|
|
||||||
|
if (options.minimumFractionDigits !== undefined) {
|
||||||
|
localeOptions = { minimumFractionDigits: options.minimumFractionDigits };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.maximumFractionDigits !== undefined) {
|
||||||
|
localeOptions = { maximumFractionDigits: options.maximumFractionDigits, ...localeOptions };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (number < 1) {
|
||||||
|
const numberString = toLocaleString(number, options.locale, localeOptions);
|
||||||
|
return `${prefix + numberString} ${UNITS[0]}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const exponent = Math.min(
|
||||||
|
Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3),
|
||||||
|
UNITS.length - 1
|
||||||
|
);
|
||||||
|
number /= (options.binary ? 1024 : 1000) ** exponent;
|
||||||
|
|
||||||
|
if (!localeOptions) {
|
||||||
|
number = number.toPrecision(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
||||||
|
|
||||||
|
const unit = UNITS[exponent];
|
||||||
|
|
||||||
|
return `${prefix + numberString} ${unit}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
i18n: {
|
||||||
|
defaultLocale: "en",
|
||||||
|
locales: ["en"],
|
||||||
|
},
|
||||||
|
serializeConfig: false,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
init: (i18next) => {
|
||||||
|
i18next.services.formatter.add("bytes", (value, lng, options) =>
|
||||||
|
prettyBytes(parseFloat(value), { locale: lng, ...options })
|
||||||
|
);
|
||||||
|
|
||||||
|
i18next.services.formatter.add("rate", (value, lng, options) => {
|
||||||
|
if (value === 0) return "0 Bps";
|
||||||
|
|
||||||
|
const bits = options.bits ? value : value / 8;
|
||||||
|
const k = 1024;
|
||||||
|
const dm = options.decimals ? options.decimals : 0;
|
||||||
|
const sizes = ["Bps", "Kbps", "Mbps", "Gbps", "Tbps", "Pbps", "Ebps", "Zbps", "Ybps"];
|
||||||
|
|
||||||
|
const i = Math.floor(Math.log(bits) / Math.log(k));
|
||||||
|
|
||||||
|
const formatted = new Intl.NumberFormat(lng, { maximumFractionDigits: dm, minimumFractionDigits: dm }).format(
|
||||||
|
parseFloat(bits / k ** i)
|
||||||
|
);
|
||||||
|
|
||||||
|
return `${formatted} ${sizes[i]}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
i18next.services.formatter.add("percent", (value, lng, options) =>
|
||||||
|
new Intl.NumberFormat(lng, { style: "percent", ...options }).format(parseFloat(value) / 100.0)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
type: "3rdParty",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
const { i18n } = require("./next-i18next.config");
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
@@ -7,6 +9,7 @@ const nextConfig = {
|
|||||||
domains: ["cdn.jsdelivr.net"],
|
domains: ["cdn.jsdelivr.net"],
|
||||||
unoptimized: true,
|
unoptimized: true,
|
||||||
},
|
},
|
||||||
|
i18n,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = nextConfig;
|
module.exports = nextConfig;
|
||||||
|
|||||||
24
package.json
@@ -10,18 +10,17 @@
|
|||||||
"telemetry": "next telemetry disable"
|
"telemetry": "next telemetry disable"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@headlessui/react": "^1.7.0",
|
"@headlessui/react": "^1.7.2",
|
||||||
"@tailwindcss/forms": "^0.5.3",
|
"classnames": "^2.3.2",
|
||||||
"classnames": "^2.3.1",
|
"compare-versions": "^5.0.1",
|
||||||
"dockerode": "^3.3.4",
|
"dockerode": "^3.3.4",
|
||||||
"follow-redirects": "^1.15.2",
|
"follow-redirects": "^1.15.2",
|
||||||
"i18next": "^21.9.1",
|
"i18next": "^21.9.2",
|
||||||
"i18next-browser-languagedetector": "^6.1.5",
|
|
||||||
"i18next-http-backend": "^1.4.1",
|
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"json-rpc-2.0": "^1.4.1",
|
"json-rpc-2.0": "^1.4.1",
|
||||||
"memory-cache": "^0.2.0",
|
"memory-cache": "^0.2.0",
|
||||||
"next": "^12.3.0",
|
"next": "^12.3.1",
|
||||||
|
"next-i18next": "^12.0.1",
|
||||||
"node-os-utils": "^1.3.7",
|
"node-os-utils": "^1.3.7",
|
||||||
"pretty-bytes": "^6.0.0",
|
"pretty-bytes": "^6.0.0",
|
||||||
"raw-body": "^2.5.1",
|
"raw-body": "^2.5.1",
|
||||||
@@ -32,13 +31,15 @@
|
|||||||
"rutorrent-promise": "^2.0.0",
|
"rutorrent-promise": "^2.0.0",
|
||||||
"shvl": "^3.0.0",
|
"shvl": "^3.0.0",
|
||||||
"swr": "^1.3.0",
|
"swr": "^1.3.0",
|
||||||
"tough-cookie": "^4.1.2"
|
"tough-cookie": "^4.1.2",
|
||||||
|
"winston": "^3.8.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^10.4.9",
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"eslint": "^8.23.1",
|
"autoprefixer": "^10.4.12",
|
||||||
|
"eslint": "^8.24.0",
|
||||||
"eslint-config-airbnb": "^19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-config-next": "^12.3.0",
|
"eslint-config-next": "^12.3.1",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"postcss": "^8.4.16",
|
"postcss": "^8.4.16",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
|
"tailwind-scrollbar": "^2.0.1",
|
||||||
"tailwindcss": "^3.1.8",
|
"tailwindcss": "^3.1.8",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.8.3"
|
||||||
}
|
}
|
||||||
|
|||||||
729
pnpm-lock.yaml
generated
@@ -155,7 +155,23 @@
|
|||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Descàrrega",
|
"download": "Descàrrega",
|
||||||
"upload": "Càrrega",
|
"upload": "Càrrega",
|
||||||
"leech": "Leech",
|
"leech": "Companys",
|
||||||
"seed": "Seed"
|
"seed": "Llavors"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Usuaris",
|
||||||
|
"status_count": "Publicacions",
|
||||||
|
"domain_count": "Dominis"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connexions",
|
||||||
|
"dataRelayed": "Transmès",
|
||||||
|
"transferRate": "Velocitat"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,9 @@
|
|||||||
"movies": "Filme"
|
"movies": "Filme"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Gesucht",
|
||||||
"queued": "Queued",
|
"queued": "In Warteschlange",
|
||||||
"books": "Books"
|
"books": "Bücher"
|
||||||
},
|
},
|
||||||
"ombi": {
|
"ombi": {
|
||||||
"pending": "Ausstehend",
|
"pending": "Ausstehend",
|
||||||
@@ -79,8 +79,8 @@
|
|||||||
},
|
},
|
||||||
"traefik": {
|
"traefik": {
|
||||||
"routers": "Router",
|
"routers": "Router",
|
||||||
"services": "Services",
|
"services": "Dienste",
|
||||||
"middleware": "Middleware"
|
"middleware": "Zwischenanwendung"
|
||||||
},
|
},
|
||||||
"npm": {
|
"npm": {
|
||||||
"enabled": "Aktiviert",
|
"enabled": "Aktiviert",
|
||||||
@@ -94,68 +94,84 @@
|
|||||||
"wait": "Bitte warten"
|
"wait": "Bitte warten"
|
||||||
},
|
},
|
||||||
"overseerr": {
|
"overseerr": {
|
||||||
"pending": "Pending",
|
"pending": "Ausstehend",
|
||||||
"approved": "Approved",
|
"approved": "Genehmigt",
|
||||||
"available": "Available"
|
"available": "Verfügbar"
|
||||||
},
|
},
|
||||||
"sabnzbd": {
|
"sabnzbd": {
|
||||||
"rate": "Rate",
|
"rate": "Geschwindigkeit",
|
||||||
"queue": "Queue",
|
"queue": "Warteschlange",
|
||||||
"timeleft": "Time Left"
|
"timeleft": "Verbleibende Zeit"
|
||||||
},
|
},
|
||||||
"nzbget": {
|
"nzbget": {
|
||||||
"rate": "Rate",
|
"rate": "Geschwindigkeit",
|
||||||
"remaining": "Remaining",
|
"remaining": "Verbleibend",
|
||||||
"downloaded": "Downloaded"
|
"downloaded": "Heruntergeladen"
|
||||||
},
|
},
|
||||||
"coinmarketcap": {
|
"coinmarketcap": {
|
||||||
"configure": "Configure one or more crypto currencies to track",
|
"configure": "Konfiguriere eine oder mehrere Kryptowährungen zur Verfolgung",
|
||||||
"1hour": "1 Hour",
|
"1hour": "1 Stunde",
|
||||||
"1day": "1 Day",
|
"1day": "1 Tag",
|
||||||
"7days": "7 Days",
|
"7days": "7 Tage",
|
||||||
"30days": "30 Days"
|
"30days": "30 Tage"
|
||||||
},
|
},
|
||||||
"gotify": {
|
"gotify": {
|
||||||
"apps": "Applications",
|
"apps": "Programme",
|
||||||
"clients": "Clients",
|
"clients": "Benutzer",
|
||||||
"messages": "Messages"
|
"messages": "Nachrichten"
|
||||||
},
|
},
|
||||||
"prowlarr": {
|
"prowlarr": {
|
||||||
"enableIndexers": "Indexers",
|
"enableIndexers": "Indexer",
|
||||||
"numberOfGrabs": "Grabs",
|
"numberOfGrabs": "Abrufungen",
|
||||||
"numberOfQueries": "Queries",
|
"numberOfQueries": "Anfragen",
|
||||||
"numberOfFailGrabs": "Fail Grabs",
|
"numberOfFailGrabs": "Fehlgeschlagene Abrufungen",
|
||||||
"numberOfFailQueries": "Fail Queries"
|
"numberOfFailQueries": "Fehlgeschlagene Anfragen"
|
||||||
},
|
},
|
||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "Download",
|
"download": "Herunterladen",
|
||||||
"upload": "Upload",
|
"upload": "Hochladen",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
},
|
},
|
||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "Configured",
|
"configured": "Konfiguriert",
|
||||||
"errored": "Errored"
|
"errored": "Fehlerhaft"
|
||||||
},
|
},
|
||||||
"bazarr": {
|
"bazarr": {
|
||||||
"missingEpisodes": "Missing Episodes",
|
"missingEpisodes": "Fehlende Episoden",
|
||||||
"missingMovies": "Missing Movies"
|
"missingMovies": "Fehlende Filme"
|
||||||
},
|
},
|
||||||
"lidarr": {
|
"lidarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Gesucht",
|
||||||
"queued": "Queued",
|
"queued": "In Warteschlange",
|
||||||
"albums": "Albums"
|
"albums": "Alben"
|
||||||
},
|
},
|
||||||
"adguard": {
|
"adguard": {
|
||||||
"queries": "Queries",
|
"queries": "Anfragen",
|
||||||
"blocked": "Blocked",
|
"blocked": "Blockiert",
|
||||||
"filtered": "Filtered",
|
"filtered": "Gefiltert",
|
||||||
"latency": "Latency"
|
"latency": "Latenz"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Download",
|
"download": "Herunterladen",
|
||||||
"upload": "Upload",
|
"upload": "Hochladen",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Nutzer",
|
||||||
|
"status_count": "Beiträge",
|
||||||
|
"domain_count": "Domänen"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sitzungen",
|
||||||
|
"numConnections": "Verbindungen",
|
||||||
|
"dataRelayed": "Weitergeleitet",
|
||||||
|
"transferRate": "Bewerten"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Benutzer",
|
||||||
|
"loginsLast24H": "Anmeldungen (24h)",
|
||||||
|
"failedLoginsLast24H": "fehlerhafte Anmeldungen (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,5 +168,21 @@
|
|||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "Configured",
|
"configured": "Configured",
|
||||||
"errored": "Errored"
|
"errored": "Errored"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
"load": "Carga"
|
"load": "Carga"
|
||||||
},
|
},
|
||||||
"docker": {
|
"docker": {
|
||||||
"rx": "Recibido",
|
"rx": "RX",
|
||||||
"tx": "Transmitido",
|
"tx": "TX",
|
||||||
"mem": "Memoria",
|
"mem": "MEM",
|
||||||
"cpu": "Procesador",
|
"cpu": "CPU",
|
||||||
"offline": "Desconectado"
|
"offline": "Desconectado"
|
||||||
},
|
},
|
||||||
"emby": {
|
"emby": {
|
||||||
@@ -35,20 +35,20 @@
|
|||||||
"rutorrent": {
|
"rutorrent": {
|
||||||
"active": "Activo",
|
"active": "Activo",
|
||||||
"upload": "Subida",
|
"upload": "Subida",
|
||||||
"download": "Descarga"
|
"download": "Bajada"
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"sonarr": {
|
||||||
"wanted": "Más deseado",
|
"wanted": "Buscando",
|
||||||
"queued": "En cola",
|
"queued": "En cola",
|
||||||
"series": "Series"
|
"series": "Series"
|
||||||
},
|
},
|
||||||
"radarr": {
|
"radarr": {
|
||||||
"wanted": "Más deseado",
|
"wanted": "Buscando",
|
||||||
"queued": "En cola",
|
"queued": "En cola",
|
||||||
"movies": "Películas"
|
"movies": "Películas"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Más deseado",
|
"wanted": "Buscando",
|
||||||
"queued": "En cola",
|
"queued": "En cola",
|
||||||
"books": "Libros"
|
"books": "Libros"
|
||||||
},
|
},
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
},
|
},
|
||||||
"speedtest": {
|
"speedtest": {
|
||||||
"upload": "Subida",
|
"upload": "Subida",
|
||||||
"download": "Descarga",
|
"download": "Bajada",
|
||||||
"ping": "Ping"
|
"ping": "Ping"
|
||||||
},
|
},
|
||||||
"portainer": {
|
"portainer": {
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"weather": {
|
"weather": {
|
||||||
"current": "Localización Actual",
|
"current": "Ubicación actual",
|
||||||
"allow": "Clic para permitir",
|
"allow": "Clic para permitir",
|
||||||
"updating": "Actualizando",
|
"updating": "Actualizando",
|
||||||
"wait": "Espere, por favor"
|
"wait": "Espere, por favor"
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
"numberOfFailQueries": "Consultas fallidas"
|
"numberOfFailQueries": "Consultas fallidas"
|
||||||
},
|
},
|
||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "Descarga",
|
"download": "Bajada",
|
||||||
"upload": "Subida",
|
"upload": "Subida",
|
||||||
"leech": "Compañeros",
|
"leech": "Compañeros",
|
||||||
"seed": "Semillas"
|
"seed": "Semillas"
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
},
|
},
|
||||||
"lidarr": {
|
"lidarr": {
|
||||||
"queued": "En cola",
|
"queued": "En cola",
|
||||||
"wanted": "Más deseado",
|
"wanted": "Buscando",
|
||||||
"albums": "Álbumes"
|
"albums": "Álbumes"
|
||||||
},
|
},
|
||||||
"adguard": {
|
"adguard": {
|
||||||
@@ -153,9 +153,25 @@
|
|||||||
"latency": "Latencia"
|
"latency": "Latencia"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Descarga",
|
"download": "Bajada",
|
||||||
"upload": "Subida",
|
"upload": "Subida",
|
||||||
"leech": "Compañeros",
|
"leech": "Compañeros",
|
||||||
"seed": "Semillas"
|
"seed": "Semillas"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Usuarios",
|
||||||
|
"status_count": "Publicaciones",
|
||||||
|
"domain_count": "Dominios"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sesiones",
|
||||||
|
"numConnections": "Conexiones",
|
||||||
|
"dataRelayed": "Retransmitido",
|
||||||
|
"transferRate": "Velocidad"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Usuarios",
|
||||||
|
"loginsLast24H": "Accesos (24h)",
|
||||||
|
"failedLoginsLast24H": "Accesos Fallidos (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,18 +38,18 @@
|
|||||||
"download": "Réception"
|
"download": "Réception"
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"sonarr": {
|
||||||
"wanted": "Demandé",
|
"wanted": "Demande",
|
||||||
"queued": "En queue",
|
"queued": "En attente",
|
||||||
"series": "Séries"
|
"series": "Séries"
|
||||||
},
|
},
|
||||||
"radarr": {
|
"radarr": {
|
||||||
"wanted": "Demandé",
|
"wanted": "Demande",
|
||||||
"queued": "En queue",
|
"queued": "En attente",
|
||||||
"movies": "Films"
|
"movies": "Films"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Demandé",
|
"wanted": "Demande",
|
||||||
"queued": "En Queue",
|
"queued": "Attente",
|
||||||
"books": "Livres"
|
"books": "Livres"
|
||||||
},
|
},
|
||||||
"ombi": {
|
"ombi": {
|
||||||
@@ -87,17 +87,6 @@
|
|||||||
"disabled": "Désactivé",
|
"disabled": "Désactivé",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"common": {
|
|
||||||
"bbytes": "{{value, bytes(binary: true)}}",
|
|
||||||
"bytes": "{{value, bytes}}",
|
|
||||||
"bits": "{{value, bytes(bits: true)}}",
|
|
||||||
"bbits": "{{value, bytes(bits: true, binary: true)}}",
|
|
||||||
"number": "{{value, number}}",
|
|
||||||
"byterate": "{{value, bytes}}",
|
|
||||||
"bitrate": "{{value, bytes(bits: true)}}",
|
|
||||||
"percent": "{{value, percent}}",
|
|
||||||
"ms": "{{value, number}}"
|
|
||||||
},
|
|
||||||
"weather": {
|
"weather": {
|
||||||
"current": "Localisation actuelle",
|
"current": "Localisation actuelle",
|
||||||
"allow": "Cliquez pour autoriser",
|
"allow": "Cliquez pour autoriser",
|
||||||
@@ -132,11 +121,11 @@
|
|||||||
"messages": "Msg"
|
"messages": "Msg"
|
||||||
},
|
},
|
||||||
"prowlarr": {
|
"prowlarr": {
|
||||||
"enableIndexers": "Indexeurs",
|
"enableIndexers": "Indexeur",
|
||||||
"numberOfGrabs": "Capture",
|
"numberOfGrabs": "Capture",
|
||||||
"numberOfQueries": "Demandes",
|
"numberOfQueries": "Demande",
|
||||||
"numberOfFailGrabs": "Capture échouée",
|
"numberOfFailGrabs": "Capt. échouée",
|
||||||
"numberOfFailQueries": "Demande échouée"
|
"numberOfFailQueries": "Dem. échouée"
|
||||||
},
|
},
|
||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "Réception",
|
"download": "Réception",
|
||||||
@@ -168,5 +157,21 @@
|
|||||||
"upload": "Envoi",
|
"upload": "Envoi",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Utilisateurs",
|
||||||
|
"status_count": "Messages",
|
||||||
|
"domain_count": "Domaines"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Cnx",
|
||||||
|
"dataRelayed": "Relayé",
|
||||||
|
"transferRate": "Débit"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Utilisateurs",
|
||||||
|
"loginsLast24H": "Cnx. (24h)",
|
||||||
|
"failedLoginsLast24H": "Cnx. échouées (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "מוגדר",
|
"configured": "מוגדר",
|
||||||
"errored": "שגיאה"
|
"errored": "שגיאה"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,161 +1,177 @@
|
|||||||
{
|
{
|
||||||
"weather": {
|
"weather": {
|
||||||
"current": "Current Location",
|
"current": "Tranutačna lokacija",
|
||||||
"allow": "Click to allow",
|
"allow": "Pritisni za dozvoljavanje",
|
||||||
"updating": "Updating",
|
"updating": "Aktualiziranje",
|
||||||
"wait": "Please wait"
|
"wait": "Pričekaj"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Search…"
|
"placeholder": "Traži …"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"total": "Total",
|
"total": "Ukupno",
|
||||||
"free": "Free",
|
"free": "Slobodno",
|
||||||
"used": "Used",
|
"used": "Korišteno",
|
||||||
"load": "Load"
|
"load": "Opterećenje"
|
||||||
},
|
},
|
||||||
"sabnzbd": {
|
"sabnzbd": {
|
||||||
"rate": "Rate",
|
"rate": "Stopa",
|
||||||
"queue": "Queue",
|
"queue": "Red",
|
||||||
"timeleft": "Time Left"
|
"timeleft": "Preostalo vrijeme"
|
||||||
},
|
},
|
||||||
"overseerr": {
|
"overseerr": {
|
||||||
"available": "Available",
|
"available": "Dostupno",
|
||||||
"pending": "Pending",
|
"pending": "Predstoji",
|
||||||
"approved": "Approved"
|
"approved": "Odobreno"
|
||||||
},
|
},
|
||||||
"pihole": {
|
"pihole": {
|
||||||
"queries": "Queries",
|
"queries": "Upiti",
|
||||||
"blocked": "Blocked",
|
"blocked": "Blokirano",
|
||||||
"gravity": "Gravity"
|
"gravity": "Ozbiljnost"
|
||||||
},
|
},
|
||||||
"adguard": {
|
"adguard": {
|
||||||
"latency": "Latency",
|
"latency": "Kašnjenje",
|
||||||
"queries": "Queries",
|
"queries": "Upiti",
|
||||||
"blocked": "Blocked",
|
"blocked": "Blokirano",
|
||||||
"filtered": "Filtered"
|
"filtered": "Filtrirano"
|
||||||
},
|
},
|
||||||
"npm": {
|
"npm": {
|
||||||
"total": "Total",
|
"total": "Ukupno",
|
||||||
"enabled": "Enabled",
|
"enabled": "Aktivirano",
|
||||||
"disabled": "Disabled"
|
"disabled": "Deaktivirano"
|
||||||
},
|
},
|
||||||
"coinmarketcap": {
|
"coinmarketcap": {
|
||||||
"configure": "Configure one or more crypto currencies to track",
|
"configure": "Konfiguriraj jednu ili više kripto valuta za praćenje",
|
||||||
"1hour": "1 Hour",
|
"1hour": "1 sat",
|
||||||
"1day": "1 Day",
|
"1day": "1 dan",
|
||||||
"7days": "7 Days",
|
"7days": "7 dana",
|
||||||
"30days": "30 Days"
|
"30days": "30 dana"
|
||||||
},
|
},
|
||||||
"prowlarr": {
|
"prowlarr": {
|
||||||
"enableIndexers": "Indexers",
|
"enableIndexers": "Indeksatori",
|
||||||
"numberOfGrabs": "Grabs",
|
"numberOfGrabs": "Dohvaćanja",
|
||||||
"numberOfQueries": "Queries",
|
"numberOfQueries": "Upiti",
|
||||||
"numberOfFailGrabs": "Fail Grabs",
|
"numberOfFailGrabs": "Neuspjela dohvaćanja",
|
||||||
"numberOfFailQueries": "Fail Queries"
|
"numberOfFailQueries": "Neuspjeli upiti"
|
||||||
},
|
},
|
||||||
"widget": {
|
"widget": {
|
||||||
"missing_type": "Missing Widget Type: {{type}}",
|
"missing_type": "Nedostajuća vrsta widgeta: {{type}}",
|
||||||
"api_error": "API Error",
|
"api_error": "API greška",
|
||||||
"status": "Status"
|
"status": "Stanje"
|
||||||
},
|
},
|
||||||
"docker": {
|
"docker": {
|
||||||
"rx": "RX",
|
"rx": "RX",
|
||||||
"tx": "TX",
|
"tx": "TX",
|
||||||
"mem": "MEM",
|
"mem": "MEM",
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
"offline": "Offline"
|
"offline": "Odspojen"
|
||||||
},
|
},
|
||||||
"emby": {
|
"emby": {
|
||||||
"playing": "Playing",
|
"playing": "Reprodukcija",
|
||||||
"transcoding": "Transcoding",
|
"transcoding": "Prekodiranje",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Brzina prijenosa",
|
||||||
"no_active": "No Active Streams"
|
"no_active": "Nema aktivnih prijenosa"
|
||||||
},
|
},
|
||||||
"tautulli": {
|
"tautulli": {
|
||||||
"playing": "Playing",
|
"playing": "Reprodukcija",
|
||||||
"transcoding": "Transcoding",
|
"transcoding": "Prekodiranje",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Brzina prijenosa",
|
||||||
"no_active": "No Active Streams"
|
"no_active": "Nema aktivnih prijenosa"
|
||||||
},
|
},
|
||||||
"nzbget": {
|
"nzbget": {
|
||||||
"rate": "Rate",
|
"rate": "Stopa",
|
||||||
"remaining": "Remaining",
|
"remaining": "Preostalo",
|
||||||
"downloaded": "Downloaded"
|
"downloaded": "Preuzeto"
|
||||||
},
|
},
|
||||||
"rutorrent": {
|
"rutorrent": {
|
||||||
"upload": "Upload",
|
"upload": "Prijenos",
|
||||||
"download": "Download",
|
"download": "Preuzimanje",
|
||||||
"active": "Active"
|
"active": "Aktivno"
|
||||||
},
|
},
|
||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "Download",
|
"download": "Preuzimanje",
|
||||||
"upload": "Upload",
|
"upload": "Prijenos",
|
||||||
"leech": "Leech",
|
"leech": "Krvopija",
|
||||||
"seed": "Seed"
|
"seed": "Prijenos preuzetog sadržaja"
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"sonarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Željeno",
|
||||||
"queued": "Queued",
|
"queued": "U redu čekanja",
|
||||||
"series": "Series"
|
"series": "Serije"
|
||||||
},
|
},
|
||||||
"radarr": {
|
"radarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Željeno",
|
||||||
"queued": "Queued",
|
"queued": "U redu čekanja",
|
||||||
"movies": "Movies"
|
"movies": "Filmovi"
|
||||||
},
|
},
|
||||||
"lidarr": {
|
"lidarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Željeno",
|
||||||
"queued": "Queued",
|
"queued": "U redu čekanja",
|
||||||
"albums": "Albums"
|
"albums": "Albumi"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Željeno",
|
||||||
"queued": "Queued",
|
"queued": "U redu čekanja",
|
||||||
"books": "Books"
|
"books": "Knjige"
|
||||||
},
|
},
|
||||||
"bazarr": {
|
"bazarr": {
|
||||||
"missingEpisodes": "Missing Episodes",
|
"missingEpisodes": "Nedostajuće epizode",
|
||||||
"missingMovies": "Missing Movies"
|
"missingMovies": "Nedostajući filmovi"
|
||||||
},
|
},
|
||||||
"ombi": {
|
"ombi": {
|
||||||
"pending": "Pending",
|
"pending": "Predstoji",
|
||||||
"approved": "Approved",
|
"approved": "Odobreno",
|
||||||
"available": "Available"
|
"available": "Dostupno"
|
||||||
},
|
},
|
||||||
"jellyseerr": {
|
"jellyseerr": {
|
||||||
"pending": "Pending",
|
"pending": "Predstoji",
|
||||||
"approved": "Approved",
|
"approved": "Odobreno",
|
||||||
"available": "Available"
|
"available": "Dostupno"
|
||||||
},
|
},
|
||||||
"speedtest": {
|
"speedtest": {
|
||||||
"upload": "Upload",
|
"upload": "Prijenos",
|
||||||
"download": "Download",
|
"download": "Preuzimanje",
|
||||||
"ping": "Ping"
|
"ping": "Ping"
|
||||||
},
|
},
|
||||||
"portainer": {
|
"portainer": {
|
||||||
"running": "Running",
|
"running": "Pokrenuto",
|
||||||
"stopped": "Stopped",
|
"stopped": "Prekinuto",
|
||||||
"total": "Total"
|
"total": "Ukupno"
|
||||||
},
|
},
|
||||||
"traefik": {
|
"traefik": {
|
||||||
"routers": "Routers",
|
"routers": "Ruteri",
|
||||||
"services": "Services",
|
"services": "Usluge",
|
||||||
"middleware": "Middleware"
|
"middleware": "Middleware"
|
||||||
},
|
},
|
||||||
"gotify": {
|
"gotify": {
|
||||||
"clients": "Clients",
|
"clients": "Klijenti",
|
||||||
"messages": "Messages",
|
"messages": "Poruke",
|
||||||
"apps": "Applications"
|
"apps": "Programi"
|
||||||
},
|
},
|
||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "Configured",
|
"configured": "Konfigurirano",
|
||||||
"errored": "Errored"
|
"errored": "S greškom"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Download",
|
"download": "Preuzimanje",
|
||||||
"upload": "Upload",
|
"upload": "Prijenos",
|
||||||
"leech": "Leech",
|
"leech": "Krvopija",
|
||||||
"seed": "Seed"
|
"seed": "Prijenos preuzetog sadržaja"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Korisnici",
|
||||||
|
"status_count": "Objave",
|
||||||
|
"domain_count": "Domene"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sesije",
|
||||||
|
"numConnections": "Veze",
|
||||||
|
"dataRelayed": "Proslijeđeno",
|
||||||
|
"transferRate": "Stopa"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "Beállított",
|
"configured": "Beállított",
|
||||||
"errored": "Hibás"
|
"errored": "Hibás"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
177
public/locales/pt-BR/common.json
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
{
|
||||||
|
"sabnzbd": {
|
||||||
|
"timeleft": "Tempo restante",
|
||||||
|
"rate": "Taxa",
|
||||||
|
"queue": "Fila"
|
||||||
|
},
|
||||||
|
"rutorrent": {
|
||||||
|
"active": "Ativo",
|
||||||
|
"upload": "Envio",
|
||||||
|
"download": "Download"
|
||||||
|
},
|
||||||
|
"portainer": {
|
||||||
|
"total": "Total",
|
||||||
|
"running": "Funcionando",
|
||||||
|
"stopped": "Parado"
|
||||||
|
},
|
||||||
|
"coinmarketcap": {
|
||||||
|
"7days": "7 Dias",
|
||||||
|
"configure": "Configure uma ou mais criptomoedas para rastrear",
|
||||||
|
"1hour": "1 Hora",
|
||||||
|
"1day": "1 Dia",
|
||||||
|
"30days": "30 Dias"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numConnections": "Conexões",
|
||||||
|
"numActiveSessions": "Sessões",
|
||||||
|
"dataRelayed": "Retransmitido",
|
||||||
|
"transferRate": "Taxa"
|
||||||
|
},
|
||||||
|
"widget": {
|
||||||
|
"missing_type": "Tipo de Widget ausente: {{type}}",
|
||||||
|
"api_error": "Erro da API",
|
||||||
|
"status": "Status"
|
||||||
|
},
|
||||||
|
"weather": {
|
||||||
|
"current": "Localização atual",
|
||||||
|
"allow": "Clique para permitir",
|
||||||
|
"updating": "Atualizando",
|
||||||
|
"wait": "Aguarde, por favor"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"placeholder": "Buscar…"
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
"total": "Total",
|
||||||
|
"free": "Livre",
|
||||||
|
"used": "Usado",
|
||||||
|
"load": "Carregamento"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"rx": "Rx",
|
||||||
|
"tx": "Tx",
|
||||||
|
"mem": "Mem",
|
||||||
|
"cpu": "CPU",
|
||||||
|
"offline": "Desligado"
|
||||||
|
},
|
||||||
|
"emby": {
|
||||||
|
"playing": "Reproduzindo",
|
||||||
|
"transcoding": "Transcodificando",
|
||||||
|
"bitrate": "Taxa de bits",
|
||||||
|
"no_active": "Sem transmissões ativas"
|
||||||
|
},
|
||||||
|
"tautulli": {
|
||||||
|
"playing": "Reproduzindo",
|
||||||
|
"transcoding": "Transcodificando",
|
||||||
|
"bitrate": "Taxa de bits",
|
||||||
|
"no_active": "Sem transmissões ativas"
|
||||||
|
},
|
||||||
|
"nzbget": {
|
||||||
|
"rate": "Taxa",
|
||||||
|
"remaining": "Restando",
|
||||||
|
"downloaded": "Baixado"
|
||||||
|
},
|
||||||
|
"transmission": {
|
||||||
|
"download": "Download",
|
||||||
|
"upload": "Upload",
|
||||||
|
"leech": "Leech",
|
||||||
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"qbittorrent": {
|
||||||
|
"download": "Download",
|
||||||
|
"upload": "Upload",
|
||||||
|
"leech": "Leech",
|
||||||
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"sonarr": {
|
||||||
|
"wanted": "Desejado",
|
||||||
|
"queued": "Na fila",
|
||||||
|
"series": "Séries"
|
||||||
|
},
|
||||||
|
"radarr": {
|
||||||
|
"wanted": "Desejado",
|
||||||
|
"queued": "Na fila",
|
||||||
|
"movies": "Filmes"
|
||||||
|
},
|
||||||
|
"lidarr": {
|
||||||
|
"wanted": "Desejado",
|
||||||
|
"queued": "Na fila",
|
||||||
|
"albums": "Álbuns"
|
||||||
|
},
|
||||||
|
"readarr": {
|
||||||
|
"wanted": "Desejado",
|
||||||
|
"queued": "Na fila",
|
||||||
|
"books": "Livros"
|
||||||
|
},
|
||||||
|
"bazarr": {
|
||||||
|
"missingEpisodes": "Episódios Ausentes",
|
||||||
|
"missingMovies": "Filmes Ausentes"
|
||||||
|
},
|
||||||
|
"ombi": {
|
||||||
|
"pending": "Pendente",
|
||||||
|
"approved": "Aprovado",
|
||||||
|
"available": "Disponível"
|
||||||
|
},
|
||||||
|
"jellyseerr": {
|
||||||
|
"pending": "Pendente",
|
||||||
|
"approved": "Aprovado",
|
||||||
|
"available": "Disponível"
|
||||||
|
},
|
||||||
|
"overseerr": {
|
||||||
|
"pending": "Pendente",
|
||||||
|
"approved": "Aprovado",
|
||||||
|
"available": "Disponível"
|
||||||
|
},
|
||||||
|
"pihole": {
|
||||||
|
"queries": "Consultas",
|
||||||
|
"blocked": "Bloquado",
|
||||||
|
"gravity": "Gravity"
|
||||||
|
},
|
||||||
|
"adguard": {
|
||||||
|
"queries": "Consultas",
|
||||||
|
"blocked": "Bloqueado",
|
||||||
|
"filtered": "Filtrado",
|
||||||
|
"latency": "Latência"
|
||||||
|
},
|
||||||
|
"speedtest": {
|
||||||
|
"upload": "Envio",
|
||||||
|
"download": "Receber",
|
||||||
|
"ping": "Ping"
|
||||||
|
},
|
||||||
|
"traefik": {
|
||||||
|
"routers": "Rotas",
|
||||||
|
"services": "Serviços",
|
||||||
|
"middleware": "Middleware"
|
||||||
|
},
|
||||||
|
"npm": {
|
||||||
|
"enabled": "Habilitado",
|
||||||
|
"disabled": "Desabilitado",
|
||||||
|
"total": "Total"
|
||||||
|
},
|
||||||
|
"gotify": {
|
||||||
|
"apps": "Aplicações",
|
||||||
|
"clients": "Clientes",
|
||||||
|
"messages": "Mensagens"
|
||||||
|
},
|
||||||
|
"prowlarr": {
|
||||||
|
"enableIndexers": "Indexadores",
|
||||||
|
"numberOfGrabs": "Grabs",
|
||||||
|
"numberOfQueries": "Queries",
|
||||||
|
"numberOfFailGrabs": "Fail Grabs",
|
||||||
|
"numberOfFailQueries": "Fail Queries"
|
||||||
|
},
|
||||||
|
"jackett": {
|
||||||
|
"configured": "Configurado",
|
||||||
|
"errored": "Erro"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Usuários",
|
||||||
|
"status_count": "Postagens",
|
||||||
|
"domain_count": "Domínios"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"total": "Total",
|
"total": "Total",
|
||||||
"free": "Livre",
|
"free": "Livre",
|
||||||
"used": "Usado",
|
"used": "Usado",
|
||||||
"load": "Load"
|
"load": "Carregar"
|
||||||
},
|
},
|
||||||
"docker": {
|
"docker": {
|
||||||
"rx": "Rx",
|
"rx": "Rx",
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"emby": {
|
"emby": {
|
||||||
"playing": "A reproduzir",
|
"playing": "A reproduzir",
|
||||||
"transcoding": "Transcodificação",
|
"transcoding": "Transcodificação",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Taxa de bits",
|
||||||
"no_active": "Sem streams ativas"
|
"no_active": "Sem streams ativas"
|
||||||
},
|
},
|
||||||
"tautulli": {
|
"tautulli": {
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
},
|
},
|
||||||
"rutorrent": {
|
"rutorrent": {
|
||||||
"active": "Ativo",
|
"active": "Ativo",
|
||||||
"upload": "Envio",
|
"upload": "Enviando",
|
||||||
"download": "ReceçãoDownload"
|
"download": "Baixando"
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"sonarr": {
|
||||||
"wanted": "Desejada",
|
"wanted": "Desejada",
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
"movies": "Filmes"
|
"movies": "Filmes"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Desejados",
|
||||||
"queued": "Em fila",
|
"queued": "Em fila",
|
||||||
"books": "Livros"
|
"books": "Livros"
|
||||||
},
|
},
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"pihole": {
|
"pihole": {
|
||||||
"queries": "Consultas",
|
"queries": "Consultas",
|
||||||
"blocked": "Bloqueado",
|
"blocked": "Bloqueado",
|
||||||
"gravity": "Gravity"
|
"gravity": "Gravidade"
|
||||||
},
|
},
|
||||||
"speedtest": {
|
"speedtest": {
|
||||||
"upload": "Envio",
|
"upload": "Envio",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"traefik": {
|
"traefik": {
|
||||||
"routers": "Routers",
|
"routers": "Roteadores",
|
||||||
"services": "Serviços",
|
"services": "Serviços",
|
||||||
"middleware": "Middleware"
|
"middleware": "Middleware"
|
||||||
},
|
},
|
||||||
@@ -110,21 +110,21 @@
|
|||||||
"available": "Disponível"
|
"available": "Disponível"
|
||||||
},
|
},
|
||||||
"sabnzbd": {
|
"sabnzbd": {
|
||||||
"rate": "Rate",
|
"rate": "Taxa",
|
||||||
"queue": "Fila",
|
"queue": "Fila",
|
||||||
"timeleft": "Tempo restante"
|
"timeleft": "Tempo restante"
|
||||||
},
|
},
|
||||||
"nzbget": {
|
"nzbget": {
|
||||||
"rate": "Rate",
|
"rate": "Taxa",
|
||||||
"remaining": "Restante",
|
"remaining": "Restante",
|
||||||
"downloaded": "Downloaded"
|
"downloaded": "Baixado"
|
||||||
},
|
},
|
||||||
"coinmarketcap": {
|
"coinmarketcap": {
|
||||||
"configure": "Configurar uma ou mais moedas",
|
"configure": "Configurar uma ou mais moedas",
|
||||||
"1hour": "1 Hour",
|
"1hour": "1 Hora",
|
||||||
"1day": "1 Day",
|
"1day": "1 Dia",
|
||||||
"7days": "7 Days",
|
"7days": "7 Dias",
|
||||||
"30days": "30 Days"
|
"30days": "30 Dias"
|
||||||
},
|
},
|
||||||
"gotify": {
|
"gotify": {
|
||||||
"apps": "Aplicações",
|
"apps": "Aplicações",
|
||||||
@@ -132,41 +132,57 @@
|
|||||||
"messages": "Mensagens"
|
"messages": "Mensagens"
|
||||||
},
|
},
|
||||||
"prowlarr": {
|
"prowlarr": {
|
||||||
"enableIndexers": "Indexers",
|
"enableIndexers": "Indexadores",
|
||||||
"numberOfGrabs": "Grabs",
|
"numberOfGrabs": "Agarrados",
|
||||||
"numberOfQueries": "Queries",
|
"numberOfQueries": "Consultas",
|
||||||
"numberOfFailGrabs": "Falhados",
|
"numberOfFailGrabs": "Falhados",
|
||||||
"numberOfFailQueries": "Pesquisas falhadas"
|
"numberOfFailQueries": "Pesquisas falhadas"
|
||||||
},
|
},
|
||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "Download",
|
"download": "Baixando",
|
||||||
"upload": "Envio",
|
"upload": "Enviando",
|
||||||
"leech": "Leech",
|
"leech": "Sanguessugas",
|
||||||
"seed": "Seed"
|
"seed": "Semeadores"
|
||||||
},
|
},
|
||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "Configured",
|
"configured": "Configurado",
|
||||||
"errored": "Errored"
|
"errored": "Errado"
|
||||||
},
|
},
|
||||||
"bazarr": {
|
"bazarr": {
|
||||||
"missingEpisodes": "Missing Episodes",
|
"missingEpisodes": "Episódios Faltantes",
|
||||||
"missingMovies": "Missing Movies"
|
"missingMovies": "Filmes Faltantes"
|
||||||
},
|
},
|
||||||
"lidarr": {
|
"lidarr": {
|
||||||
"queued": "Queued",
|
"queued": "Enfileirado",
|
||||||
"wanted": "Wanted",
|
"wanted": "Desejado",
|
||||||
"albums": "Albums"
|
"albums": "Álbuns"
|
||||||
},
|
},
|
||||||
"adguard": {
|
"adguard": {
|
||||||
"queries": "Queries",
|
"queries": "Consultas",
|
||||||
"blocked": "Blocked",
|
"blocked": "Bloqueado",
|
||||||
"filtered": "Filtered",
|
"filtered": "Filtrado",
|
||||||
"latency": "Latency"
|
"latency": "Latência"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Download",
|
"download": "Baixando",
|
||||||
"upload": "Upload",
|
"upload": "Enviando",
|
||||||
"leech": "Leech",
|
"leech": "Sanguessugas",
|
||||||
"seed": "Seed"
|
"seed": "Semeadores"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Usuários",
|
||||||
|
"status_count": "Postagens",
|
||||||
|
"domain_count": "Domínios"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessões",
|
||||||
|
"numConnections": "Conexões",
|
||||||
|
"dataRelayed": "Retransmitido",
|
||||||
|
"transferRate": "Taxa"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)",
|
||||||
|
"users": "Users"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
177
public/locales/ro/common.json
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
{
|
||||||
|
"resources": {
|
||||||
|
"used": "Utilizați",
|
||||||
|
"load": "Sarcină",
|
||||||
|
"total": "Total",
|
||||||
|
"free": "Disponibili"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"rx": "RX",
|
||||||
|
"tx": "TX",
|
||||||
|
"mem": "MEM",
|
||||||
|
"cpu": "CPU",
|
||||||
|
"offline": "Offline"
|
||||||
|
},
|
||||||
|
"jellyseerr": {
|
||||||
|
"approved": "Aprobate",
|
||||||
|
"available": "Disponibile",
|
||||||
|
"pending": "În așteptare"
|
||||||
|
},
|
||||||
|
"overseerr": {
|
||||||
|
"pending": "În așteptare",
|
||||||
|
"approved": "Aprobate",
|
||||||
|
"available": "Disponibile"
|
||||||
|
},
|
||||||
|
"pihole": {
|
||||||
|
"queries": "Cereri",
|
||||||
|
"blocked": "Blocate",
|
||||||
|
"gravity": "Gravity"
|
||||||
|
},
|
||||||
|
"adguard": {
|
||||||
|
"blocked": "Blocate",
|
||||||
|
"filtered": "Filtrate",
|
||||||
|
"queries": "Cereri",
|
||||||
|
"latency": "Latentă"
|
||||||
|
},
|
||||||
|
"traefik": {
|
||||||
|
"services": "Servicii",
|
||||||
|
"middleware": "Middleware",
|
||||||
|
"routers": "Routere"
|
||||||
|
},
|
||||||
|
"npm": {
|
||||||
|
"enabled": "Activat",
|
||||||
|
"disabled": "Dezactivat",
|
||||||
|
"total": "Total"
|
||||||
|
},
|
||||||
|
"coinmarketcap": {
|
||||||
|
"configure": "Configurați una sau mai multe criptomonede pe care să le urmăriți",
|
||||||
|
"1hour": "1 Oră",
|
||||||
|
"1day": "1 Zi",
|
||||||
|
"7days": "7 Zile",
|
||||||
|
"30days": "30 Zile"
|
||||||
|
},
|
||||||
|
"weather": {
|
||||||
|
"allow": "Click pentru a permite",
|
||||||
|
"updating": "Se actualizează",
|
||||||
|
"current": "Locația Curentă",
|
||||||
|
"wait": "Va rugăm așteptați"
|
||||||
|
},
|
||||||
|
"widget": {
|
||||||
|
"missing_type": "Lipsește Tipul de Widget: {{type}}",
|
||||||
|
"api_error": "Eroare API",
|
||||||
|
"status": "Status"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"placeholder": "Caută…"
|
||||||
|
},
|
||||||
|
"tautulli": {
|
||||||
|
"no_active": "Niciun stream activ",
|
||||||
|
"playing": "Activ",
|
||||||
|
"transcoding": "Transcodare",
|
||||||
|
"bitrate": "Bitrate"
|
||||||
|
},
|
||||||
|
"nzbget": {
|
||||||
|
"rate": "Rată",
|
||||||
|
"remaining": "Rămas",
|
||||||
|
"downloaded": "Descărcat"
|
||||||
|
},
|
||||||
|
"emby": {
|
||||||
|
"playing": "Activ",
|
||||||
|
"transcoding": "Transcodare",
|
||||||
|
"bitrate": "Bitrate",
|
||||||
|
"no_active": "Niciun stream activ"
|
||||||
|
},
|
||||||
|
"sabnzbd": {
|
||||||
|
"rate": "Rată",
|
||||||
|
"queue": "Coadă",
|
||||||
|
"timeleft": "Timp rămas"
|
||||||
|
},
|
||||||
|
"transmission": {
|
||||||
|
"leech": "Leech",
|
||||||
|
"seed": "Seed",
|
||||||
|
"download": "Descarcă",
|
||||||
|
"upload": "Încarcă"
|
||||||
|
},
|
||||||
|
"rutorrent": {
|
||||||
|
"active": "Activ",
|
||||||
|
"upload": "Încarcă",
|
||||||
|
"download": "Descarcă"
|
||||||
|
},
|
||||||
|
"qbittorrent": {
|
||||||
|
"download": "Descarcă",
|
||||||
|
"upload": "Încarcă",
|
||||||
|
"leech": "Leech",
|
||||||
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"sonarr": {
|
||||||
|
"wanted": "Dorite",
|
||||||
|
"queued": "În coadă",
|
||||||
|
"series": "Seriale"
|
||||||
|
},
|
||||||
|
"radarr": {
|
||||||
|
"queued": "În coadă",
|
||||||
|
"wanted": "Dorite",
|
||||||
|
"movies": "Filme"
|
||||||
|
},
|
||||||
|
"lidarr": {
|
||||||
|
"wanted": "Dorite",
|
||||||
|
"queued": "În coadă",
|
||||||
|
"albums": "Albume"
|
||||||
|
},
|
||||||
|
"readarr": {
|
||||||
|
"wanted": "Dorite",
|
||||||
|
"queued": "În coadă",
|
||||||
|
"books": "Cărți"
|
||||||
|
},
|
||||||
|
"bazarr": {
|
||||||
|
"missingEpisodes": "Episoade lipsă",
|
||||||
|
"missingMovies": "Filme lipsă"
|
||||||
|
},
|
||||||
|
"ombi": {
|
||||||
|
"pending": "În așteptare",
|
||||||
|
"approved": "Aprobate",
|
||||||
|
"available": "Disponibile"
|
||||||
|
},
|
||||||
|
"speedtest": {
|
||||||
|
"upload": "Încarcă",
|
||||||
|
"download": "Descarcă",
|
||||||
|
"ping": "Ping"
|
||||||
|
},
|
||||||
|
"portainer": {
|
||||||
|
"running": "Activ",
|
||||||
|
"stopped": "Oprit",
|
||||||
|
"total": "Total"
|
||||||
|
},
|
||||||
|
"gotify": {
|
||||||
|
"apps": "Aplicații",
|
||||||
|
"clients": "Clienți",
|
||||||
|
"messages": "Mesaje"
|
||||||
|
},
|
||||||
|
"prowlarr": {
|
||||||
|
"numberOfFailGrabs": "Descărcări eșuate",
|
||||||
|
"numberOfFailQueries": "Cereri eșuate",
|
||||||
|
"enableIndexers": "Indexatori",
|
||||||
|
"numberOfGrabs": "Descărcate",
|
||||||
|
"numberOfQueries": "Cereri"
|
||||||
|
},
|
||||||
|
"jackett": {
|
||||||
|
"configured": "Configurat",
|
||||||
|
"errored": "Cu erori"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sesiuni",
|
||||||
|
"numConnections": "Conexiuni",
|
||||||
|
"dataRelayed": "Retransmise",
|
||||||
|
"transferRate": "Rată"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Utilizatori",
|
||||||
|
"status_count": "Postări",
|
||||||
|
"domain_count": "Domenii"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Utilizatori",
|
||||||
|
"loginsLast24H": "Autentificări (24h)",
|
||||||
|
"failedLoginsLast24H": "Conectări eșuate (24h)"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -157,5 +157,21 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate",
|
||||||
|
"numActiveSessions": "Sessions"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,24 +138,40 @@
|
|||||||
"prowlarr": {
|
"prowlarr": {
|
||||||
"enableIndexers": "Indexerare",
|
"enableIndexers": "Indexerare",
|
||||||
"numberOfGrabs": "Hämtningar",
|
"numberOfGrabs": "Hämtningar",
|
||||||
"numberOfQueries": "Queries",
|
"numberOfQueries": "Hämtningar",
|
||||||
"numberOfFailGrabs": "Misslyckade hämtningar",
|
"numberOfFailGrabs": "Misslyckade hämtningar",
|
||||||
"numberOfFailQueries": "Fail Queries"
|
"numberOfFailQueries": "Misslyckade hämtningar"
|
||||||
},
|
},
|
||||||
"jackett": {
|
"jackett": {
|
||||||
"configured": "Konfigurerade",
|
"configured": "Konfigurerade",
|
||||||
"errored": "Felaktiga"
|
"errored": "Felaktiga"
|
||||||
},
|
},
|
||||||
"adguard": {
|
"adguard": {
|
||||||
"queries": "Queries",
|
"queries": "Förfrågningar",
|
||||||
"blocked": "Blocked",
|
"blocked": "Blockerad",
|
||||||
"filtered": "Filtered",
|
"filtered": "Filtrerad",
|
||||||
"latency": "Latency"
|
"latency": "Svarstid"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Download",
|
"download": "Nedladdning",
|
||||||
"upload": "Upload",
|
"upload": "Uppladdning",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Användare",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessioner",
|
||||||
|
"numConnections": "Anslutningar",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
177
public/locales/yue/common.json
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
{
|
||||||
|
"emby": {
|
||||||
|
"transcoding": "轉碼緊",
|
||||||
|
"bitrate": "比特率",
|
||||||
|
"playing": "播放緊",
|
||||||
|
"no_active": "無任何活動"
|
||||||
|
},
|
||||||
|
"tautulli": {
|
||||||
|
"playing": "播放緊",
|
||||||
|
"no_active": "無任何活動",
|
||||||
|
"transcoding": "轉碼緊",
|
||||||
|
"bitrate": "比特率"
|
||||||
|
},
|
||||||
|
"transmission": {
|
||||||
|
"download": "下載速度",
|
||||||
|
"upload": "上傳速度",
|
||||||
|
"leech": "下載緊",
|
||||||
|
"seed": "做種緊"
|
||||||
|
},
|
||||||
|
"widget": {
|
||||||
|
"missing_type": "缺少小部件類型:{{type}}",
|
||||||
|
"api_error": "API 錯誤",
|
||||||
|
"status": "狀況"
|
||||||
|
},
|
||||||
|
"weather": {
|
||||||
|
"current": "依家位置",
|
||||||
|
"allow": "點擊允許",
|
||||||
|
"updating": "更新緊",
|
||||||
|
"wait": "請稍後"
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"placeholder": "搜索緊…"
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
"total": "全部",
|
||||||
|
"free": "剩餘",
|
||||||
|
"used": "用咗",
|
||||||
|
"load": "負荷"
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"rx": "接收",
|
||||||
|
"tx": "發送",
|
||||||
|
"mem": "內存",
|
||||||
|
"cpu": "處理器",
|
||||||
|
"offline": "離線"
|
||||||
|
},
|
||||||
|
"nzbget": {
|
||||||
|
"rate": "速度",
|
||||||
|
"remaining": "剩餘",
|
||||||
|
"downloaded": "下載咗"
|
||||||
|
},
|
||||||
|
"sabnzbd": {
|
||||||
|
"rate": "速度",
|
||||||
|
"queue": "隊列",
|
||||||
|
"timeleft": "用時"
|
||||||
|
},
|
||||||
|
"rutorrent": {
|
||||||
|
"active": "激活",
|
||||||
|
"upload": "上傳",
|
||||||
|
"download": "下載"
|
||||||
|
},
|
||||||
|
"qbittorrent": {
|
||||||
|
"download": "下載速度",
|
||||||
|
"upload": "上傳速度",
|
||||||
|
"leech": "下載緊",
|
||||||
|
"seed": "做種緊"
|
||||||
|
},
|
||||||
|
"sonarr": {
|
||||||
|
"wanted": "想睇",
|
||||||
|
"queued": "排緊隊",
|
||||||
|
"series": "電視劇"
|
||||||
|
},
|
||||||
|
"radarr": {
|
||||||
|
"wanted": "想睇",
|
||||||
|
"queued": "排緊隊",
|
||||||
|
"movies": "電影"
|
||||||
|
},
|
||||||
|
"lidarr": {
|
||||||
|
"wanted": "想睇",
|
||||||
|
"queued": "排緊隊",
|
||||||
|
"albums": "專輯"
|
||||||
|
},
|
||||||
|
"readarr": {
|
||||||
|
"wanted": "想睇",
|
||||||
|
"queued": "排緊隊",
|
||||||
|
"books": "書"
|
||||||
|
},
|
||||||
|
"bazarr": {
|
||||||
|
"missingEpisodes": "缺少嘅劇集",
|
||||||
|
"missingMovies": "缺少電影"
|
||||||
|
},
|
||||||
|
"ombi": {
|
||||||
|
"pending": "待定",
|
||||||
|
"approved": "批准",
|
||||||
|
"available": "可用"
|
||||||
|
},
|
||||||
|
"jellyseerr": {
|
||||||
|
"pending": "提交咗",
|
||||||
|
"approved": "批准咗",
|
||||||
|
"available": "可睇嘅總量"
|
||||||
|
},
|
||||||
|
"overseerr": {
|
||||||
|
"pending": "待定",
|
||||||
|
"approved": "批准",
|
||||||
|
"available": "可用"
|
||||||
|
},
|
||||||
|
"pihole": {
|
||||||
|
"queries": "查詢",
|
||||||
|
"blocked": "封鎖",
|
||||||
|
"gravity": "重力"
|
||||||
|
},
|
||||||
|
"adguard": {
|
||||||
|
"queries": "查詢",
|
||||||
|
"blocked": "封鎖",
|
||||||
|
"filtered": "過濾",
|
||||||
|
"latency": "延遲"
|
||||||
|
},
|
||||||
|
"speedtest": {
|
||||||
|
"upload": "上傳速率",
|
||||||
|
"download": "下載速率",
|
||||||
|
"ping": "Ping值"
|
||||||
|
},
|
||||||
|
"portainer": {
|
||||||
|
"running": "運行緊",
|
||||||
|
"stopped": "暫停",
|
||||||
|
"total": "全部"
|
||||||
|
},
|
||||||
|
"traefik": {
|
||||||
|
"routers": "路由器",
|
||||||
|
"services": "服務項",
|
||||||
|
"middleware": "中間件"
|
||||||
|
},
|
||||||
|
"coinmarketcap": {
|
||||||
|
"1day": "1 日",
|
||||||
|
"configure": "配置一個或多個加密貨幣以進行跟蹤",
|
||||||
|
"1hour": "1 個鐘",
|
||||||
|
"7days": "7 日",
|
||||||
|
"30days": "30日"
|
||||||
|
},
|
||||||
|
"npm": {
|
||||||
|
"enabled": "啟用",
|
||||||
|
"disabled": "停用咗",
|
||||||
|
"total": "全部"
|
||||||
|
},
|
||||||
|
"gotify": {
|
||||||
|
"apps": "應用",
|
||||||
|
"clients": "客戶端",
|
||||||
|
"messages": "消息"
|
||||||
|
},
|
||||||
|
"prowlarr": {
|
||||||
|
"enableIndexers": "索引",
|
||||||
|
"numberOfGrabs": "抓住",
|
||||||
|
"numberOfQueries": "查詢",
|
||||||
|
"numberOfFailGrabs": "失敗抓取",
|
||||||
|
"numberOfFailQueries": "查詢失敗"
|
||||||
|
},
|
||||||
|
"jackett": {
|
||||||
|
"configured": "配置",
|
||||||
|
"errored": "已錯誤"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "會話",
|
||||||
|
"numConnections": "連接",
|
||||||
|
"dataRelayed": "傳遞",
|
||||||
|
"transferRate": "速度"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "用戶",
|
||||||
|
"status_count": "職位",
|
||||||
|
"domain_count": "域"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "用戶",
|
||||||
|
"loginsLast24H": "登錄( 24小时)",
|
||||||
|
"failedLoginsLast24H": "登錄失敗( 24鐘頭)"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "下载",
|
"download": "下载",
|
||||||
"upload": "上传",
|
"upload": "上传",
|
||||||
"leech": "吸血",
|
"leech": "下载中",
|
||||||
"seed": "做种"
|
"seed": "做种"
|
||||||
},
|
},
|
||||||
"jackett": {
|
"jackett": {
|
||||||
@@ -155,7 +155,23 @@
|
|||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "下载",
|
"download": "下载",
|
||||||
"upload": "上传",
|
"upload": "上传",
|
||||||
"leech": "吸血",
|
"leech": "下载中",
|
||||||
"seed": "做种"
|
"seed": "做种"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "用户",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,5 +157,21 @@
|
|||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"leech": "Leech",
|
"leech": "Leech",
|
||||||
"seed": "Seed"
|
"seed": "Seed"
|
||||||
|
},
|
||||||
|
"mastodon": {
|
||||||
|
"user_count": "Users",
|
||||||
|
"status_count": "Posts",
|
||||||
|
"domain_count": "Domains"
|
||||||
|
},
|
||||||
|
"strelaysrv": {
|
||||||
|
"numActiveSessions": "Sessions",
|
||||||
|
"numConnections": "Connections",
|
||||||
|
"dataRelayed": "Relayed",
|
||||||
|
"transferRate": "Rate"
|
||||||
|
},
|
||||||
|
"authentik": {
|
||||||
|
"users": "Users",
|
||||||
|
"loginsLast24H": "Logins (24h)",
|
||||||
|
"failedLoginsLast24H": "Failed Logins (24h)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,8 @@ import List from "components/bookmarks/list";
|
|||||||
|
|
||||||
export default function BookmarksGroup({ group }) {
|
export default function BookmarksGroup({ group }) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div key={group.name} className="basis-full md:basis-1/2 lg:basis-1/3 xl:basis-1/4 flex-1 p-1">
|
||||||
key={group.name}
|
<h2 className="text-theme-800 dark:text-theme-300 text-xl font-medium">{group.name}</h2>
|
||||||
className="basis-full md:basis-1/2 lg:basis-1/3 xl:basis-1/4 flex-1 p-1"
|
|
||||||
>
|
|
||||||
<h2 className="text-theme-800 dark:text-theme-300 text-xl font-medium">
|
|
||||||
{group.name}
|
|
||||||
</h2>
|
|
||||||
<List bookmarks={group.bookmarks} />
|
<List bookmarks={group.bookmarks} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
|
import { useContext } from "react";
|
||||||
|
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
export default function Item({ bookmark }) {
|
export default function Item({ bookmark }) {
|
||||||
const { hostname } = new URL(bookmark.href);
|
const { hostname } = new URL(bookmark.href);
|
||||||
|
const { settings } = useContext(SettingsContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li key={bookmark.name}>
|
<li key={bookmark.name}>
|
||||||
<button
|
<a
|
||||||
type="button"
|
href={bookmark.href}
|
||||||
onClick={() => window.open(bookmark.href, "_blank").focus()}
|
title={bookmark.name}
|
||||||
className="w-full text-left mb-3 cursor-pointer rounded-md font-medium text-theme-700 hover:text-theme-700 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/10 dark:bg-white/10 dark:hover:bg-white/20"
|
target={settings.target ?? "_blank"}
|
||||||
|
className="block w-full text-left cursor-pointer transition-all h-15 mb-3 rounded-md font-medium text-theme-700 dark:text-theme-200 dark:hover:text-theme-300 shadow-md shadow-theme-900/10 dark:shadow-theme-900/20 bg-theme-100/20 hover:bg-theme-300/20 dark:bg-white/5 dark:hover:bg-white/10"
|
||||||
>
|
>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<div className="flex-shrink-0 flex items-center justify-center w-11 bg-theme-500/10 dark:bg-theme-900/50 text-theme-700 hover:text-theme-700 dark:text-theme-200 text-sm font-medium rounded-l-md">
|
<div className="flex-shrink-0 flex items-center justify-center w-11 bg-theme-500/10 dark:bg-theme-900/50 text-theme-700 hover:text-theme-700 dark:text-theme-200 text-sm font-medium rounded-l-md">
|
||||||
@@ -14,10 +20,10 @@ export default function Item({ bookmark }) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex-1 flex items-center justify-between rounded-r-md ">
|
<div className="flex-1 flex items-center justify-between rounded-r-md ">
|
||||||
<div className="flex-1 grow pl-3 py-2 text-xs">{bookmark.name}</div>
|
<div className="flex-1 grow pl-3 py-2 text-xs">{bookmark.name}</div>
|
||||||
<div className="px-2 py-2 truncate text-theme-500 dark:text-theme-400 opacity-50 text-xs">{hostname}</div>
|
<div className="px-2 py-2 truncate text-theme-500 dark:text-theme-300 text-xs">{hostname}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import Image from "next/future/image";
|
import Image from "next/future/image";
|
||||||
import { Disclosure } from "@headlessui/react";
|
import classNames from "classnames";
|
||||||
|
import { useContext, useState } from "react";
|
||||||
|
|
||||||
import Status from "./status";
|
import Status from "./status";
|
||||||
import Widget from "./widget";
|
import Widget from "./widget";
|
||||||
import Docker from "./widgets/service/docker";
|
|
||||||
|
import Docker from "widgets/docker/component";
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
function resolveIcon(icon) {
|
function resolveIcon(icon) {
|
||||||
if (icon.startsWith("http")) {
|
if (icon.startsWith("http")) {
|
||||||
@@ -23,72 +26,91 @@ function resolveIcon(icon) {
|
|||||||
|
|
||||||
export default function Item({ service }) {
|
export default function Item({ service }) {
|
||||||
const hasLink = service.href && service.href !== "#";
|
const hasLink = service.href && service.href !== "#";
|
||||||
|
const { settings } = useContext(SettingsContext);
|
||||||
|
const [statsOpen, setStatsOpen] = useState(false);
|
||||||
|
const [statsClosing, setStatsClosing] = useState(false);
|
||||||
|
|
||||||
|
// set stats to closed after 300ms
|
||||||
|
const closeStats = () => {
|
||||||
|
if (statsOpen) {
|
||||||
|
setStatsClosing(true);
|
||||||
|
setTimeout(() => {
|
||||||
|
setStatsOpen(false);
|
||||||
|
setStatsClosing(false);
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li key={service.name}>
|
<li key={service.name}>
|
||||||
<Disclosure>
|
<div
|
||||||
<div
|
className={`${
|
||||||
className={`${
|
hasLink ? "cursor-pointer " : " "
|
||||||
hasLink ? "cursor-pointer " : " "
|
}transition-all h-15 mb-3 p-1 rounded-md font-medium text-theme-700 dark:text-theme-200 dark:hover:text-theme-300 shadow-md shadow-theme-900/10 dark:shadow-theme-900/20 bg-theme-100/20 hover:bg-theme-300/20 dark:bg-white/5 dark:hover:bg-white/10`}
|
||||||
}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`}
|
>
|
||||||
>
|
<div className="flex select-none">
|
||||||
<div className="flex select-none">
|
{service.icon &&
|
||||||
{service.icon &&
|
(hasLink ? (
|
||||||
(hasLink ? (
|
|
||||||
<a
|
|
||||||
href={service.href}
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
className="flex-shrink-0 flex items-center justify-center w-12 "
|
|
||||||
>
|
|
||||||
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
|
||||||
</a>
|
|
||||||
) : (
|
|
||||||
<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 ? (
|
|
||||||
<a
|
<a
|
||||||
href={service.href}
|
href={service.href}
|
||||||
target="_blank"
|
target={settings.target ?? "_blank"}
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="flex-1 flex items-center justify-between rounded-r-md "
|
className="flex-shrink-0 flex items-center justify-center w-12 "
|
||||||
>
|
>
|
||||||
<div className="flex-1 px-2 py-2 text-sm text-left">
|
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||||
{service.name}
|
|
||||||
<p className="text-theme-500 dark:text-theme-400 text-xs font-extralight">{service.description}</p>
|
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex-1 flex items-center justify-between rounded-r-md ">
|
<div className="flex-shrink-0 flex items-center justify-center w-12 ">
|
||||||
<div className="flex-1 px-2 py-2 text-sm text-left">
|
<Image src={resolveIcon(service.icon)} width={32} height={32} alt="logo" />
|
||||||
{service.name}
|
|
||||||
<p className="text-theme-500 dark:text-theme-400 text-xs font-extralight">{service.description}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
))}
|
||||||
|
|
||||||
{service.container && (
|
{hasLink ? (
|
||||||
<Disclosure.Button
|
<a
|
||||||
as="div"
|
href={service.href}
|
||||||
className="flex-shrink-0 flex items-center justify-center w-12 cursor-pointer"
|
target={settings.target ?? "_blank"}
|
||||||
>
|
rel="noreferrer"
|
||||||
<Status service={service} />
|
className="flex-1 flex items-center justify-between rounded-r-md "
|
||||||
</Disclosure.Button>
|
>
|
||||||
)}
|
<div className="flex-1 px-2 py-2 text-sm text-left">
|
||||||
</div>
|
{service.name}
|
||||||
|
<p className="text-theme-500 dark:text-theme-300 text-xs font-light">{service.description}</p>
|
||||||
<Disclosure.Panel>
|
</div>
|
||||||
<div className="w-full">
|
</a>
|
||||||
<Docker service={{ widget: { container: service.container, server: service.server } }} />
|
) : (
|
||||||
|
<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-300 text-xs font-light">{service.description}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Disclosure.Panel>
|
)}
|
||||||
|
|
||||||
{service.widget && <Widget service={service} />}
|
{service.container && (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => (statsOpen ? closeStats() : setStatsOpen(true))}
|
||||||
|
className="flex-shrink-0 flex items-center justify-center w-12 cursor-pointer"
|
||||||
|
>
|
||||||
|
<Status service={service} />
|
||||||
|
<span className="sr-only">View container stats</span>
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Disclosure>
|
|
||||||
|
{service.container && service.server && (
|
||||||
|
<div
|
||||||
|
className={classNames(
|
||||||
|
statsOpen && !statsClosing ? "max-h-[55px] opacity-100" : " max-h-[0] opacity-0",
|
||||||
|
"w-full overflow-hidden transition-all duration-300 ease-in-out"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{statsOpen && <Docker service={{ widget: { container: service.container, server: service.server } }} />}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{service.widget && <Widget service={service} />}
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,67 +1,11 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import Sonarr from "./widgets/service/sonarr";
|
import components from "widgets/components";
|
||||||
import Radarr from "./widgets/service/radarr";
|
|
||||||
import Lidarr from "./widgets/service/lidarr";
|
|
||||||
import Readarr from "./widgets/service/readarr";
|
|
||||||
import Bazarr from "./widgets/service/bazarr";
|
|
||||||
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 Transmission from "./widgets/service/transmission";
|
|
||||||
import QBittorrent from "./widgets/service/qbittorrent";
|
|
||||||
import Docker from "./widgets/service/docker";
|
|
||||||
import Pihole from "./widgets/service/pihole";
|
|
||||||
import Rutorrent from "./widgets/service/rutorrent";
|
|
||||||
import Jellyfin from "./widgets/service/jellyfin";
|
|
||||||
import Speedtest from "./widgets/service/speedtest";
|
|
||||||
import Traefik from "./widgets/service/traefik";
|
|
||||||
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";
|
|
||||||
import Prowlarr from "./widgets/service/prowlarr";
|
|
||||||
import Jackett from "./widgets/service/jackett";
|
|
||||||
import AdGuard from "./widgets/service/adguard";
|
|
||||||
|
|
||||||
const widgetMappings = {
|
|
||||||
docker: Docker,
|
|
||||||
sonarr: Sonarr,
|
|
||||||
radarr: Radarr,
|
|
||||||
lidarr: Lidarr,
|
|
||||||
readarr: Readarr,
|
|
||||||
bazarr: Bazarr,
|
|
||||||
ombi: Ombi,
|
|
||||||
portainer: Portainer,
|
|
||||||
emby: Emby,
|
|
||||||
jellyfin: Jellyfin,
|
|
||||||
nzbget: Nzbget,
|
|
||||||
sabnzbd: SABnzbd,
|
|
||||||
transmission: Transmission,
|
|
||||||
qbittorrent: QBittorrent,
|
|
||||||
pihole: Pihole,
|
|
||||||
rutorrent: Rutorrent,
|
|
||||||
speedtest: Speedtest,
|
|
||||||
traefik: Traefik,
|
|
||||||
jellyseerr: Jellyseerr,
|
|
||||||
overseerr: Overseerr,
|
|
||||||
coinmarketcap: CoinMarketCap,
|
|
||||||
npm: Npm,
|
|
||||||
tautulli: Tautulli,
|
|
||||||
gotify: Gotify,
|
|
||||||
prowlarr: Prowlarr,
|
|
||||||
jackett: Jackett,
|
|
||||||
adguard: AdGuard,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function Widget({ service }) {
|
export default function Widget({ service }) {
|
||||||
const { t } = useTranslation("common");
|
const { t } = useTranslation("common");
|
||||||
|
|
||||||
const ServiceWidget = widgetMappings[service.widget.type];
|
const ServiceWidget = components[service.widget.type];
|
||||||
|
|
||||||
if (ServiceWidget) {
|
if (ServiceWidget) {
|
||||||
return <ServiceWidget service={service} />;
|
return <ServiceWidget service={service} />;
|
||||||
|
|||||||
18
src/components/services/widget/block.jsx
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { useTranslation } from "next-i18next";
|
||||||
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
export default function Block({ value, label }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={classNames(
|
||||||
|
"bg-theme-200/50 dark:bg-theme-900/20 rounded m-1 flex-1 flex flex-col items-center justify-center p-1",
|
||||||
|
value === undefined ? "animate-pulse" : ""
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<div className="font-thin text-sm">{value === undefined || value === null ? "-" : value}</div>
|
||||||
|
<div className="font-bold text-xs uppercase">{t(label)}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
18
src/components/services/widget/container.jsx
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
export default function Container({ error = false, children, service }) {
|
||||||
|
if (error) {
|
||||||
|
return (
|
||||||
|
<div className="bg-theme-200/50 dark:bg-theme-900/20 rounded m-1 flex-1 flex flex-col items-center justify-center p-1">
|
||||||
|
<div className="font-thin text-sm">{error}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let visibleChildren = children;
|
||||||
|
const fields = service?.widget?.fields;
|
||||||
|
const type = service?.widget?.type;
|
||||||
|
if (fields && type) {
|
||||||
|
visibleChildren = children.filter(child => fields.some(field => `${type}.${field}` === child.props?.label));
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div className="relative flex flex-row w-full">{visibleChildren}</div>;
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
export default function Block({ value, label }) {
|
|
||||||
return (
|
|
||||||
<div className="bg-theme-200/50 dark:bg-theme-900/20 rounded m-1 flex-1 flex flex-col items-center justify-center p-1">
|
|
||||||
<div className="font-thin text-sm">{value === undefined || value === null ? "-" : value}</div>
|
|
||||||
<div className="font-bold text-xs uppercase">{label}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
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 AdGuard({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: adguardData, error: adguardError } = useSWR(formatApiUrl(config, "stats"));
|
|
||||||
|
|
||||||
if (adguardError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!adguardData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("adguard.queries")} />
|
|
||||||
<Block label={t("adguard.blocked")} />
|
|
||||||
<Block label={t("adguard.filtered")} />
|
|
||||||
<Block label={t("adguard.latency")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const filtered =
|
|
||||||
adguardData.num_replaced_safebrowsing + adguardData.num_replaced_safesearch + adguardData.num_replaced_parental;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("adguard.queries")} value={t("common.number", { value: adguardData.num_dns_queries })} />
|
|
||||||
<Block label={t("adguard.blocked")} value={t("common.number", { value: adguardData.num_blocked_filtering })} />
|
|
||||||
<Block label={t("adguard.filtered")} value={t("common.number", { value: filtered })} />
|
|
||||||
<Block
|
|
||||||
label={t("adguard.latency")}
|
|
||||||
value={t("common.ms", { value: adguardData.avg_processing_time * 1000, style: "unit", unit: "millisecond" })}
|
|
||||||
/>
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
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 Bazarr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: episodesData, error: episodesError } = useSWR(formatApiUrl(config, "episodes"));
|
|
||||||
const { data: moviesData, error: moviesError } = useSWR(formatApiUrl(config, "movies"));
|
|
||||||
|
|
||||||
if (episodesError || moviesError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!episodesData || !moviesData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("bazarr.missingEpisodes")} />
|
|
||||||
<Block label={t("bazarr.missingMovies")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("bazarr.missingEpisodes")} value={t("common.number", { value: episodesData.total })} />
|
|
||||||
<Block label={t("bazarr.missingMovies")} value={t("common.number", { value: moviesData.total })} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
import useSWR from "swr";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
|
|
||||||
import Widget from "../widget";
|
|
||||||
import Block from "../block";
|
|
||||||
|
|
||||||
import calculateCPUPercent from "utils/stats-helpers";
|
|
||||||
|
|
||||||
export default function Docker({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: statusData, error: statusError } = useSWR(
|
|
||||||
`/api/docker/status/${config.container}/${config.server || ""}`,
|
|
||||||
{
|
|
||||||
refreshInterval: 5000,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const { data: statsData, error: statsError } = useSWR(
|
|
||||||
`/api/docker/stats/${config.container}/${config.server || ""}`,
|
|
||||||
{
|
|
||||||
refreshInterval: 5000,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
if (statsError || statusError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (statusData && statusData.status !== "running") {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("widget.status")} value={t("docker.offline")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!statsData || !statusData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("docker.cpu")} />
|
|
||||||
<Block label={t("docker.mem")} />
|
|
||||||
<Block label={t("docker.rx")} />
|
|
||||||
<Block label={t("docker.tx")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("docker.cpu")} value={t("common.percent", { value: calculateCPUPercent(statsData.stats) })} />
|
|
||||||
<Block label={t("docker.mem")} value={t("common.bytes", { value: statsData.stats.memory_stats.usage })} />
|
|
||||||
{statsData.stats.networks && (
|
|
||||||
<>
|
|
||||||
<Block label={t("docker.rx")} value={t("common.bytes", { value: statsData.stats.networks.eth0.rx_bytes })} />
|
|
||||||
<Block label={t("docker.tx")} value={t("common.bytes", { value: statsData.stats.networks.eth0.tx_bytes })} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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 Jackett({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: indexersData, error: indexersError } = useSWR(formatApiUrl(config, "indexers"));
|
|
||||||
|
|
||||||
if (indexersError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!indexersData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("jackett.configured")} />
|
|
||||||
<Block label={t("jackett.errored")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const errored = indexersData.filter((indexer) => indexer.last_error);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("jackett.configured")} value={t("common.number", { value: indexersData.length })} />
|
|
||||||
<Block label={t("jackett.errored")} value={t("common.number", { value: errored.length })} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import Emby from "./emby";
|
|
||||||
|
|
||||||
export default function Jellyfin({ service }) {
|
|
||||||
return <Emby service={service} />;
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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 Jellyseerr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: statsData, error: statsError } = useSWR(formatApiUrl(config, `request/count`));
|
|
||||||
|
|
||||||
if (statsError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!statsData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("jellyseerr.pending")} />
|
|
||||||
<Block label={t("jellyseerr.approved")} />
|
|
||||||
<Block label={t("jellyseerr.available")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("jellyseerr.pending")} value={statsData.pending} />
|
|
||||||
<Block label={t("jellyseerr.approved")} value={statsData.approved} />
|
|
||||||
<Block label={t("jellyseerr.available")} value={statsData.available} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
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 Lidarr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: albumsData, error: albumsError } = useSWR(formatApiUrl(config, "album"));
|
|
||||||
const { data: wantedData, error: wantedError } = useSWR(formatApiUrl(config, "wanted/missing"));
|
|
||||||
const { data: queueData, error: queueError } = useSWR(formatApiUrl(config, "queue/status"));
|
|
||||||
|
|
||||||
if (albumsError || wantedError || queueError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!albumsData || !wantedData || !queueData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("lidarr.wanted")} />
|
|
||||||
<Block label={t("lidarr.queued")} />
|
|
||||||
<Block label={t("lidarr.albums")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("lidarr.wanted")} value={t("common.number", { value: wantedData.totalRecords })} />
|
|
||||||
<Block label={t("lidarr.queued")} value={t("common.number", { value: queueData.totalCount })} />
|
|
||||||
<Block label={t("lidarr.albums")} value={t("common.number", { value: albumsData.have })} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
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 Npm({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: infoData, error: infoError } = useSWR(formatApiUrl(config, "nginx/proxy-hosts"));
|
|
||||||
|
|
||||||
if (infoError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!infoData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("npm.enabled")} />
|
|
||||||
<Block label={t("npm.disabled")} />
|
|
||||||
<Block label={t("npm.total")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const enabled = infoData.filter((c) => c.enabled === 1).length;
|
|
||||||
const disabled = infoData.filter((c) => c.enabled === 0).length;
|
|
||||||
const total = infoData.length;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("npm.enabled")} value={enabled} />
|
|
||||||
<Block label={t("npm.disabled")} value={disabled} />
|
|
||||||
<Block label={t("npm.total")} value={total} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
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 Nzbget({ service }) {
|
|
||||||
const { t } = useTranslation("common");
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: statusData, error: statusError } = useSWR(formatApiUrl(config, "status"));
|
|
||||||
|
|
||||||
if (statusError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!statusData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("nzbget.rate")} />
|
|
||||||
<Block label={t("nzbget.remaining")} />
|
|
||||||
<Block label={t("nzbget.downloaded")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("nzbget.rate")} value={t("common.bitrate", { value: statusData.DownloadRate })} />
|
|
||||||
<Block
|
|
||||||
label={t("nzbget.remaining")}
|
|
||||||
value={t("common.bytes", { value: statusData.RemainingSizeMB * 1024 * 1024 })}
|
|
||||||
/>
|
|
||||||
<Block
|
|
||||||
label={t("nzbget.downloaded")}
|
|
||||||
value={t("common.bytes", { value: statusData.DownloadedSizeMB * 1024 * 1024 })}
|
|
||||||
/>
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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 Ombi({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: statsData, error: statsError } = useSWR(formatApiUrl(config, `Request/count`));
|
|
||||||
|
|
||||||
if (statsError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!statsData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("ombi.pending")} />
|
|
||||||
<Block label={t("ombi.approved")} />
|
|
||||||
<Block label={t("ombi.available")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("ombi.pending")} value={statsData.pending} />
|
|
||||||
<Block label={t("ombi.approved")} value={statsData.approved} />
|
|
||||||
<Block label={t("ombi.available")} value={statsData.available} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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 Overseerr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: statsData, error: statsError } = useSWR(formatApiUrl(config, `request/count`));
|
|
||||||
|
|
||||||
if (statsError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!statsData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("overseerr.pending")} />
|
|
||||||
<Block label={t("overseerr.approved")} />
|
|
||||||
<Block label={t("overseerr.available")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("overseerr.pending")} value={statsData.pending} />
|
|
||||||
<Block label={t("overseerr.approved")} value={statsData.approved} />
|
|
||||||
<Block label={t("overseerr.available")} value={statsData.available} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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 Pihole({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: piholeData, error: piholeError } = useSWR(formatApiUrl(config, "api.php"));
|
|
||||||
|
|
||||||
if (piholeError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!piholeData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("pihole.queries")} />
|
|
||||||
<Block label={t("pihole.blocked")} />
|
|
||||||
<Block label={t("pihole.gravity")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("pihole.queries")} value={t("common.number", { value: piholeData.dns_queries_today })} />
|
|
||||||
<Block label={t("pihole.blocked")} value={t("common.number", { value: piholeData.ads_blocked_today })} />
|
|
||||||
<Block label={t("pihole.gravity")} value={t("common.number", { value: piholeData.domains_being_blocked })} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
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 Portainer({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: containersData, error: containersError } = useSWR(formatApiUrl(config, `docker/containers/json?all=1`));
|
|
||||||
|
|
||||||
if (containersError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!containersData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("portainer.running")} />
|
|
||||||
<Block label={t("portainer.stopped")} />
|
|
||||||
<Block label={t("portainer.total")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (containersData.error) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
const running = containersData.filter((c) => c.State === "running").length;
|
|
||||||
const stopped = containersData.filter((c) => c.State === "exited").length;
|
|
||||||
const total = containersData.length;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("portainer.running")} value={running} />
|
|
||||||
<Block label={t("portainer.stopped")} value={stopped} />
|
|
||||||
<Block label={t("portainer.total")} value={total} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
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 Prowlarr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: indexersData, error: indexersError } = useSWR(formatApiUrl(config, "indexer"));
|
|
||||||
const { data: grabsData, error: grabsError } = useSWR(formatApiUrl(config, "indexerstats"));
|
|
||||||
|
|
||||||
if (indexersError || grabsError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!indexersData || !grabsData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("prowlarr.enableIndexers")} />
|
|
||||||
<Block label={t("prowlarr.numberOfGrabs")} />
|
|
||||||
<Block label={t("prowlarr.numberOfQueries")} />
|
|
||||||
<Block label={t("prowlarr.numberOfFailGrabs")} />
|
|
||||||
<Block label={t("prowlarr.numberOfFailQueries")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const indexers = indexersData?.filter((indexer) => indexer.enable === true);
|
|
||||||
|
|
||||||
let numberOfGrabs = 0
|
|
||||||
let numberOfQueries = 0
|
|
||||||
let numberOfFailedGrabs = 0
|
|
||||||
let numberOfFailedQueries = 0
|
|
||||||
grabsData?.indexers?.forEach(element => {
|
|
||||||
numberOfGrabs += element.numberOfGrabs;
|
|
||||||
numberOfQueries += element.numberOfQueries;
|
|
||||||
numberOfFailedGrabs += numberOfFailedGrabs + element.numberOfFailedGrabs;
|
|
||||||
numberOfFailedQueries += numberOfFailedQueries + element.numberOfFailedQueries;
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("prowlarr.enableIndexers")} value={indexers.length} />
|
|
||||||
<Block label={t("prowlarr.numberOfGrabs")} value={numberOfGrabs} />
|
|
||||||
<Block label={t("prowlarr.numberOfQueries")} value={numberOfQueries} />
|
|
||||||
<Block label={t("prowlarr.numberOfFailGrabs")} value={numberOfFailedGrabs} />
|
|
||||||
<Block label={t("prowlarr.numberOfFailQueries")} value={numberOfFailedQueries} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
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 QBittorrent ({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: torrentData, error: torrentError } = useSWR(formatApiUrl(config, "torrents/info"));
|
|
||||||
|
|
||||||
if (torrentError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!torrentData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("qbittorrent.leech")} />
|
|
||||||
<Block label={t("qbittorrent.download")} />
|
|
||||||
<Block label={t("qbittorrent.seed")} />
|
|
||||||
<Block label={t("qbittorrent.upload")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
let rateDl = 0;
|
|
||||||
let rateUl = 0;
|
|
||||||
let completed = 0;
|
|
||||||
|
|
||||||
for (let i = 0; i < torrentData.length; i += 1) {
|
|
||||||
const torrent = torrentData[i];
|
|
||||||
rateDl += torrent.dlspeed;
|
|
||||||
rateUl += torrent.upspeed;
|
|
||||||
if (torrent.progress === 1) {
|
|
||||||
completed += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const leech = torrentData.length - completed;
|
|
||||||
|
|
||||||
let unitsDl = "KB/s";
|
|
||||||
let unitsUl = "KB/s";
|
|
||||||
rateDl /= 1024;
|
|
||||||
rateUl /= 1024;
|
|
||||||
|
|
||||||
if (rateDl > 1024) {
|
|
||||||
rateDl /= 1024;
|
|
||||||
unitsDl = "MB/s";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rateUl > 1024) {
|
|
||||||
rateUl /= 1024;
|
|
||||||
unitsUl = "MB/s";
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("qbittorrent.leech")} value={t("common.number", { value: leech })} />
|
|
||||||
<Block label={t("qbittorrent.download")} value={`${rateDl.toFixed(2)} ${unitsDl}`} />
|
|
||||||
<Block label={t("qbittorrent.seed")} value={t("common.number", { value: completed })} />
|
|
||||||
<Block label={t("qbittorrent.upload")} value={`${rateUl.toFixed(2)} ${unitsUl}`} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
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 Radarr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: moviesData, error: moviesError } = useSWR(formatApiUrl(config, "movie"));
|
|
||||||
const { data: queuedData, error: queuedError } = useSWR(formatApiUrl(config, "queue/status"));
|
|
||||||
|
|
||||||
if (moviesError || queuedError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!moviesData || !queuedData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("radarr.wanted")} />
|
|
||||||
<Block label={t("radarr.queued")} />
|
|
||||||
<Block label={t("radarr.movies")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("radarr.wanted")} value={moviesData.wanted} />
|
|
||||||
<Block label={t("radarr.queued")} value={queuedData.totalCount} />
|
|
||||||
<Block label={t("radarr.movies")} value={moviesData.have} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("readarr.wanted")} value={t("common.number", { value: wantedData.totalRecords })} />
|
|
||||||
<Block label={t("readarr.queued")} value={t("common.number", { value: queueData.totalCount })} />
|
|
||||||
<Block label={t("readarr.books")} value={t("common.number", { value: booksData.have })} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
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 Rutorrent({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: statusData, error: statusError } = useSWR(formatApiUrl(config));
|
|
||||||
|
|
||||||
if (statusError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!statusData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("rutorrent.active")} />
|
|
||||||
<Block label={t("rutorrent.upload")} />
|
|
||||||
<Block label={t("rutorrent.download")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const upload = statusData.reduce((acc, torrent) => acc + parseInt(torrent["d.get_up_rate"], 10), 0);
|
|
||||||
|
|
||||||
const download = statusData.reduce((acc, torrent) => acc + parseInt(torrent["d.get_down_rate"], 10), 0);
|
|
||||||
|
|
||||||
const active = statusData.filter((torrent) => torrent["d.get_state"] === "1");
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("rutorrent.active")} value={active.length} />
|
|
||||||
<Block label={t("rutorrent.upload")} value={t("common.bitrate", { value: upload })} />
|
|
||||||
<Block label={t("rutorrent.download")} value={t("common.bitrate", { value: download })} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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}B/s`} />
|
|
||||||
<Block label={t("sabnzbd.queue")} value={t("common.number", { value: queueData.queue.noofslots })} />
|
|
||||||
<Block label={t("sabnzbd.timeleft")} value={queueData.queue.timeleft} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
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 Sonarr({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: wantedData, error: wantedError } = useSWR(formatApiUrl(config, "wanted/missing"));
|
|
||||||
const { data: queuedData, error: queuedError } = useSWR(formatApiUrl(config, "queue"));
|
|
||||||
const { data: seriesData, error: seriesError } = useSWR(formatApiUrl(config, "series"));
|
|
||||||
|
|
||||||
if (wantedError || queuedError || seriesError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!wantedData || !queuedData || !seriesData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("sonarr.wanted")} />
|
|
||||||
<Block label={t("sonarr.queued")} />
|
|
||||||
<Block label={t("sonarr.series")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("sonarr.wanted")} value={wantedData.totalRecords} />
|
|
||||||
<Block label={t("sonarr.queued")} value={queuedData.totalRecords} />
|
|
||||||
<Block label={t("sonarr.series")} value={seriesData.total} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
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 Speedtest({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: speedtestData, error: speedtestError } = useSWR(formatApiUrl(config, "speedtest/latest"));
|
|
||||||
|
|
||||||
if (speedtestError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!speedtestData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("speedtest.download")} />
|
|
||||||
<Block label={t("speedtest.upload")} />
|
|
||||||
<Block label={t("speedtest.ping")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block
|
|
||||||
label={t("speedtest.download")}
|
|
||||||
value={t("common.bitrate", { value: speedtestData.data.download * 1024 * 1024 })}
|
|
||||||
/>
|
|
||||||
<Block
|
|
||||||
label={t("speedtest.upload")}
|
|
||||||
value={t("common.bitrate", { value: speedtestData.data.upload * 1024 * 1024 })}
|
|
||||||
/>
|
|
||||||
<Block
|
|
||||||
label={t("speedtest.ping")}
|
|
||||||
value={t("common.ms", { value: speedtestData.data.ping, style: "unit", unit: "millisecond" })}
|
|
||||||
/>
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
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 Traefik({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: traefikData, error: traefikError } = useSWR(formatApiUrl(config, "overview"));
|
|
||||||
|
|
||||||
if (traefikError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!traefikData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("traefik.routers")} />
|
|
||||||
<Block label={t("traefik.services")} />
|
|
||||||
<Block label={t("traefik.middleware")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("traefik.routers")} value={traefikData.http.routers.total} />
|
|
||||||
<Block label={t("traefik.services")} value={traefikData.http.services.total} />
|
|
||||||
<Block label={t("traefik.middleware")} value={traefikData.http.middlewares.total} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
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 Transmission({ service }) {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const config = service.widget;
|
|
||||||
|
|
||||||
const { data: torrentData, error: torrentError } = useSWR(formatApiUrl(config));
|
|
||||||
|
|
||||||
if (torrentError) {
|
|
||||||
return <Widget error={t("widget.api_error")} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!torrentData) {
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("transmission.leech")} />
|
|
||||||
<Block label={t("transmission.download")} />
|
|
||||||
<Block label={t("transmission.seed")} />
|
|
||||||
<Block label={t("transmission.upload")} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const { torrents } = torrentData.arguments;
|
|
||||||
let rateDl = 0;
|
|
||||||
let rateUl = 0;
|
|
||||||
let completed = 0;
|
|
||||||
|
|
||||||
for (let i = 0; i < torrents.length; i += 1) {
|
|
||||||
const torrent = torrents[i];
|
|
||||||
rateDl += torrent.rateDownload;
|
|
||||||
rateUl += torrent.rateUpload;
|
|
||||||
if (torrent.percentDone === 1) {
|
|
||||||
completed += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const leech = torrents.length - completed;
|
|
||||||
|
|
||||||
let unitsDl = "KB/s";
|
|
||||||
let unitsUl = "KB/s";
|
|
||||||
rateDl /= 1024;
|
|
||||||
rateUl /= 1024;
|
|
||||||
|
|
||||||
if (rateDl > 1024) {
|
|
||||||
rateDl /= 1024;
|
|
||||||
unitsDl = "MB/s";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rateUl > 1024) {
|
|
||||||
rateUl /= 1024;
|
|
||||||
unitsUl = "MB/s";
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Widget>
|
|
||||||
<Block label={t("transmission.leech")} value={t("common.number", { value: leech })} />
|
|
||||||
<Block label={t("transmission.download")} value={`${rateDl.toFixed(2)} ${unitsDl}`} />
|
|
||||||
<Block label={t("transmission.seed")} value={t("common.number", { value: completed })} />
|
|
||||||
<Block label={t("transmission.upload")} value={`${rateUl.toFixed(2)} ${unitsUl}`} />
|
|
||||||
</Widget>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
export default function Widget({ error = false, children }) {
|
|
||||||
if (error) {
|
|
||||||
return (
|
|
||||||
<div className="bg-theme-200/50 dark:bg-theme-900/20 rounded m-1 flex-1 flex flex-col items-center justify-center p-1">
|
|
||||||
<div className="font-thin text-sm">{error}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return <div className="relative flex flex-row w-full">{children}</div>;
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ import { IoColorPalette } from "react-icons/io5";
|
|||||||
import { Popover, Transition } from "@headlessui/react";
|
import { Popover, Transition } from "@headlessui/react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
import { ColorContext } from "utils/color-context";
|
import { ColorContext } from "utils/contexts/color";
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
"slate",
|
"slate",
|
||||||
@@ -45,6 +45,7 @@ export default function ColorToggle() {
|
|||||||
className="h-5 w-5 text-theme-800 dark:text-theme-200 transition duration-150 ease-in-out"
|
className="h-5 w-5 text-theme-800 dark:text-theme-200 transition duration-150 ease-in-out"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
|
<span className="sr-only">Change color</span>
|
||||||
</Popover.Button>
|
</Popover.Button>
|
||||||
<Transition
|
<Transition
|
||||||
as={Fragment}
|
as={Fragment}
|
||||||
@@ -67,6 +68,7 @@ export default function ColorToggle() {
|
|||||||
`rounded-md w-5 h-5 border-black/50 dark:border-white/50 theme-${color} bg-theme-400`
|
`rounded-md w-5 h-5 border-black/50 dark:border-white/50 theme-${color} bg-theme-400`
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<span className="sr-only">{color}</span>
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { MdDarkMode, MdLightMode, MdToggleOff, MdToggleOn } from "react-icons/md";
|
import { MdDarkMode, MdLightMode, MdToggleOff, MdToggleOn } from "react-icons/md";
|
||||||
|
|
||||||
import { ThemeContext } from "utils/theme-context";
|
import { ThemeContext } from "utils/contexts/theme";
|
||||||
|
|
||||||
export default function ThemeToggle() {
|
export default function ThemeToggle() {
|
||||||
const { theme, setTheme } = useContext(ThemeContext);
|
const { theme, setTheme } = useContext(ThemeContext);
|
||||||
51
src/components/version.jsx
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import { useTranslation } from "next-i18next";
|
||||||
|
import useSWR from "swr";
|
||||||
|
import { compareVersions } from "compare-versions";
|
||||||
|
import { MdNewReleases } from "react-icons/md";
|
||||||
|
|
||||||
|
import cachedFetch from "utils/proxy/cached-fetch";
|
||||||
|
|
||||||
|
export default function Version() {
|
||||||
|
const { t, i18n } = useTranslation();
|
||||||
|
|
||||||
|
const buildTime = process.env.NEXT_PUBLIC_BUILDTIME ?? new Date().toISOString();
|
||||||
|
const revision = process.env.NEXT_PUBLIC_REVISION ?? "dev";
|
||||||
|
const version = process.env.NEXT_PUBLIC_VERSION ?? "dev";
|
||||||
|
|
||||||
|
const cachedFetcher = (resource) => cachedFetch(resource, 5).then((res) => res.json());
|
||||||
|
|
||||||
|
const { data: releaseData } = useSWR("https://api.github.com/repos/benphelps/homepage/releases", cachedFetcher);
|
||||||
|
|
||||||
|
// use Intl.DateTimeFormat to format the date
|
||||||
|
const formatDate = (date) => {
|
||||||
|
const options = {
|
||||||
|
year: "numeric",
|
||||||
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
|
};
|
||||||
|
return new Intl.DateTimeFormat(i18n.language, options).format(new Date(date));
|
||||||
|
};
|
||||||
|
|
||||||
|
const latestRelease = releaseData?.[0];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex flex-row items-center">
|
||||||
|
<span className="text-xs text-theme-500 dark:text-theme-400">
|
||||||
|
{version} ({revision.substring(0, 7)}, {formatDate(buildTime)})
|
||||||
|
</span>
|
||||||
|
{version === "main" || version === "dev" || version === "nightly"
|
||||||
|
? null
|
||||||
|
: releaseData &&
|
||||||
|
compareVersions(latestRelease.tag_name, version) > 0 && (
|
||||||
|
<a
|
||||||
|
href={latestRelease.html_url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="ml-2 text-xs text-theme-500 dark:text-theme-400 flex flex-row items-center"
|
||||||
|
>
|
||||||
|
<MdNewReleases className="mr-1" /> {t("Update Available")}
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import WeatherApi from "components/widgets/weather/weather";
|
|
||||||
import OpenWeatherMap from "components/widgets/openweathermap/weather";
|
|
||||||
import Resources from "components/widgets/resources/resources";
|
|
||||||
import Search from "components/widgets/search/search";
|
|
||||||
import Greeting from "components/widgets/greeting/greeting";
|
|
||||||
import DateTime from "components/widgets/datetime/datetime";
|
|
||||||
|
|
||||||
const widgetMappings = {
|
|
||||||
weather: WeatherApi, // This key will be deprecated in the future
|
|
||||||
weatherapi: WeatherApi,
|
|
||||||
openweathermap: OpenWeatherMap,
|
|
||||||
resources: Resources,
|
|
||||||
search: Search,
|
|
||||||
greeting: Greeting,
|
|
||||||
datetime: DateTime,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function Widget({ widget }) {
|
|
||||||
const InfoWidget = widgetMappings[widget.type];
|
|
||||||
|
|
||||||
if (InfoWidget) {
|
|
||||||
return <InfoWidget options={widget.options} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="flex-none flex flex-row items-center justify-center">
|
|
||||||
Missing <strong>{widget.type}</strong>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
const textSizes = {
|
const textSizes = {
|
||||||
"4xl": "text-4xl",
|
"4xl": "text-4xl",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import mapIcon from "utils/owm-condition-map";
|
import mapIcon from "utils/weather/owm-condition-map";
|
||||||
|
|
||||||
export default function Icon({ condition, timeOfDay }) {
|
export default function Icon({ condition, timeOfDay }) {
|
||||||
const IconComponent = mapIcon(condition, timeOfDay);
|
const IconComponent = mapIcon(condition, timeOfDay);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useState } from "react";
|
|||||||
import { BiError } from "react-icons/bi";
|
import { BiError } from "react-icons/bi";
|
||||||
import { WiCloudDown } from "react-icons/wi";
|
import { WiCloudDown } from "react-icons/wi";
|
||||||
import { MdLocationDisabled, MdLocationSearching } from "react-icons/md";
|
import { MdLocationDisabled, MdLocationSearching } from "react-icons/md";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import Icon from "./icon";
|
import Icon from "./icon";
|
||||||
|
|
||||||
@@ -80,23 +80,25 @@ export default function OpenWeatherMap({ options }) {
|
|||||||
|
|
||||||
const requestLocation = () => {
|
const requestLocation = () => {
|
||||||
setRequesting(true);
|
setRequesting(true);
|
||||||
navigator.geolocation.getCurrentPosition(
|
if (typeof window !== "undefined") {
|
||||||
(position) => {
|
navigator.geolocation.getCurrentPosition(
|
||||||
setLocation({ latitude: position.coords.latitude, longitude: position.coords.longitude });
|
(position) => {
|
||||||
setRequesting(false);
|
setLocation({ latitude: position.coords.latitude, longitude: position.coords.longitude });
|
||||||
},
|
setRequesting(false);
|
||||||
() => {
|
},
|
||||||
setRequesting(false);
|
() => {
|
||||||
},
|
setRequesting(false);
|
||||||
{
|
},
|
||||||
enableHighAccuracy: true,
|
{
|
||||||
maximumAge: 1000 * 60 * 60 * 3,
|
enableHighAccuracy: true,
|
||||||
timeout: 1000 * 30,
|
maximumAge: 1000 * 60 * 60 * 3,
|
||||||
}
|
timeout: 1000 * 30,
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!requesting && !location) requestLocation();
|
// if (!requesting && !location) requestLocation();
|
||||||
|
|
||||||
if (!location) {
|
if (!location) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { FiCpu } from "react-icons/fi";
|
import { FiCpu } from "react-icons/fi";
|
||||||
import { BiError } from "react-icons/bi";
|
import { BiError } from "react-icons/bi";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import UsageBar from "./usage-bar";
|
import UsageBar from "./usage-bar";
|
||||||
|
|
||||||
@@ -25,10 +25,20 @@ export default function Cpu({ expanded }) {
|
|||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return (
|
return (
|
||||||
<div className="flex-none flex flex-row items-center mr-3 py-1.5">
|
<div className="flex-none flex flex-row items-center mr-3 py-1.5 animate-pulse">
|
||||||
<FiCpu className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
<FiCpu className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
||||||
<div className="flex flex-col ml-3 text-left">
|
<div className="flex flex-col ml-3 text-left min-w-[85px]">
|
||||||
<span className="text-theme-800 dark:text-theme-200 text-xs">-</span>
|
<div className="text-theme-800 dark:text-theme-200 text-xs flex flex-row justify-between">
|
||||||
|
<div className="pl-0.5">-</div>
|
||||||
|
<div className="pr-1">{t("docker.cpu")}</div>
|
||||||
|
</div>
|
||||||
|
{expanded && (
|
||||||
|
<div className="text-theme-800 dark:text-theme-200 text-xs flex flex-row justify-between">
|
||||||
|
<div className="pl-0.5">-</div>
|
||||||
|
<div className="pr-1">{t("resources.load")}</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<UsageBar percent={100} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { FiHardDrive } from "react-icons/fi";
|
import { FiHardDrive } from "react-icons/fi";
|
||||||
import { BiError } from "react-icons/bi";
|
import { BiError } from "react-icons/bi";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import UsageBar from "./usage-bar";
|
import UsageBar from "./usage-bar";
|
||||||
|
|
||||||
@@ -25,10 +25,20 @@ export default function Disk({ options, expanded }) {
|
|||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return (
|
return (
|
||||||
<div className="flex-none flex flex-row items-center mr-3 py-1.5">
|
<div className="flex-none flex flex-row items-center mr-3 py-1.5 animate-pulse">
|
||||||
<FiHardDrive className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
<FiHardDrive className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
||||||
<div className="flex flex-col ml-3 text-left">
|
<div className="flex flex-col ml-3 text-left min-w-[85px]">
|
||||||
<span className="text-theme-800 dark:text-theme-200 text-xs">-</span>
|
<span className="text-theme-800 dark:text-theme-200 text-xs flex flex-row justify-between">
|
||||||
|
<div className="pl-0.5">-</div>
|
||||||
|
<div className="pr-1">{t("resources.free")}</div>
|
||||||
|
</span>
|
||||||
|
{expanded && (
|
||||||
|
<span className="text-theme-800 dark:text-theme-200 text-xs flex flex-row justify-between">
|
||||||
|
<div className="pl-0.5">-</div>
|
||||||
|
<div className="pr-1">{t("resources.total")}</div>
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<UsageBar percent={100} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { FaMemory } from "react-icons/fa";
|
import { FaMemory } from "react-icons/fa";
|
||||||
import { BiError } from "react-icons/bi";
|
import { BiError } from "react-icons/bi";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import UsageBar from "./usage-bar";
|
import UsageBar from "./usage-bar";
|
||||||
|
|
||||||
@@ -25,10 +25,20 @@ export default function Memory({ expanded }) {
|
|||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return (
|
return (
|
||||||
<div className="flex-none flex flex-row items-center mr-3 py-1.5">
|
<div className="flex-none flex flex-row items-center mr-3 py-1.5 animate-pulse">
|
||||||
<FaMemory className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
<FaMemory className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
||||||
<div className="flex flex-col ml-3 text-left">
|
<div className="flex flex-col ml-3 text-left min-w-[85px]">
|
||||||
<span className="text-theme-800 dark:text-theme-200 text-xs">-</span>
|
<span className="text-theme-800 dark:text-theme-200 text-xs flex flex-row justify-between">
|
||||||
|
<div className="pl-0.5">-</div>
|
||||||
|
<div className="pr-1">{t("resources.free")}</div>
|
||||||
|
</span>
|
||||||
|
{expanded && (
|
||||||
|
<span className="text-theme-800 dark:text-theme-200 text-xs flex flex-row justify-between">
|
||||||
|
<div className="pl-0.5">-</div>
|
||||||
|
<div className="pr-1">{t("resources.total")}</div>
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<UsageBar percent={100} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
export default function UsageBar({ percent }) {
|
export default function UsageBar({ percent }) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-0.5 w-full bg-theme-800/30 rounded-full h-1 dark:bg-white/20">
|
<div className="mt-0.5 w-full bg-theme-800/30 rounded-full h-1 dark:bg-theme-200/20">
|
||||||
<div
|
<div
|
||||||
className="bg-theme-800/70 h-1 rounded-full dark:bg-white/50"
|
className="bg-theme-800/70 h-1 rounded-full dark:bg-theme-200/50 transition-all duration-1000"
|
||||||
style={{
|
style={{
|
||||||
width: `${percent}%`,
|
width: `${percent}%`,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
import { FiSearch } from "react-icons/fi";
|
import { FiSearch } from "react-icons/fi";
|
||||||
import { SiDuckduckgo, SiMicrosoftbing, SiGoogle } from "react-icons/si";
|
import { SiDuckduckgo, SiMicrosoftbing, SiGoogle, SiBaidu } from "react-icons/si";
|
||||||
|
|
||||||
const providers = {
|
const providers = {
|
||||||
google: {
|
google: {
|
||||||
@@ -19,6 +19,11 @@ const providers = {
|
|||||||
url: "https://www.bing.com/search?q=",
|
url: "https://www.bing.com/search?q=",
|
||||||
icon: SiMicrosoftbing,
|
icon: SiMicrosoftbing,
|
||||||
},
|
},
|
||||||
|
baidu: {
|
||||||
|
name: "Baidu",
|
||||||
|
url: "https://www.baidu.com/s?wd=",
|
||||||
|
icon: SiBaidu,
|
||||||
|
},
|
||||||
custom: {
|
custom: {
|
||||||
name: "Custom",
|
name: "Custom",
|
||||||
url: false,
|
url: false,
|
||||||
@@ -81,6 +86,7 @@ export default function Search({ options }) {
|
|||||||
focus:ring-theme-500 dark:focus:ring-white/50"
|
focus:ring-theme-500 dark:focus:ring-white/50"
|
||||||
>
|
>
|
||||||
<provider.icon className="text-white w-3 h-3" />
|
<provider.icon className="text-white w-3 h-3" />
|
||||||
|
<span className="sr-only">{t("search.search")}</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import mapIcon from "utils/condition-map";
|
import mapIcon from "utils/weather/condition-map";
|
||||||
|
|
||||||
export default function Icon({ condition, timeOfDay }) {
|
export default function Icon({ condition, timeOfDay }) {
|
||||||
const IconComponent = mapIcon(condition, timeOfDay);
|
const IconComponent = mapIcon(condition, timeOfDay);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useState } from "react";
|
|||||||
import { BiError } from "react-icons/bi";
|
import { BiError } from "react-icons/bi";
|
||||||
import { WiCloudDown } from "react-icons/wi";
|
import { WiCloudDown } from "react-icons/wi";
|
||||||
import { MdLocationDisabled, MdLocationSearching } from "react-icons/md";
|
import { MdLocationDisabled, MdLocationSearching } from "react-icons/md";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import Icon from "./icon";
|
import Icon from "./icon";
|
||||||
|
|
||||||
@@ -81,23 +81,25 @@ export default function WeatherApi({ options }) {
|
|||||||
|
|
||||||
const requestLocation = () => {
|
const requestLocation = () => {
|
||||||
setRequesting(true);
|
setRequesting(true);
|
||||||
navigator.geolocation.getCurrentPosition(
|
if (typeof window !== "undefined") {
|
||||||
(position) => {
|
navigator.geolocation.getCurrentPosition(
|
||||||
setLocation({ latitude: position.coords.latitude, longitude: position.coords.longitude });
|
(position) => {
|
||||||
setRequesting(false);
|
setLocation({ latitude: position.coords.latitude, longitude: position.coords.longitude });
|
||||||
},
|
setRequesting(false);
|
||||||
() => {
|
},
|
||||||
setRequesting(false);
|
() => {
|
||||||
},
|
setRequesting(false);
|
||||||
{
|
},
|
||||||
enableHighAccuracy: true,
|
{
|
||||||
maximumAge: 1000 * 60 * 60 * 3,
|
enableHighAccuracy: true,
|
||||||
timeout: 1000 * 30,
|
maximumAge: 1000 * 60 * 60 * 3,
|
||||||
}
|
timeout: 1000 * 30,
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!requesting && !location) requestLocation();
|
// if (!requesting && !location) requestLocation();
|
||||||
|
|
||||||
if (!location) {
|
if (!location) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
24
src/components/widgets/widget.jsx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import dynamic from "next/dynamic";
|
||||||
|
|
||||||
|
const widgetMappings = {
|
||||||
|
weatherapi: dynamic(() => import("components/widgets/weather/weather")),
|
||||||
|
openweathermap: dynamic(() => import("components/widgets/openweathermap/weather")),
|
||||||
|
resources: dynamic(() => import("components/widgets/resources/resources")),
|
||||||
|
search: dynamic(() => import("components/widgets/search/search")),
|
||||||
|
greeting: dynamic(() => import("components/widgets/greeting/greeting")),
|
||||||
|
datetime: dynamic(() => import("components/widgets/datetime/datetime")),
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function Widget({ widget }) {
|
||||||
|
const InfoWidget = widgetMappings[widget.type];
|
||||||
|
|
||||||
|
if (InfoWidget) {
|
||||||
|
return <InfoWidget options={widget.options} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex-none flex flex-row items-center justify-center">
|
||||||
|
Missing <strong>{widget.type}</strong>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
/* eslint-disable react/jsx-props-no-spreading */
|
/* eslint-disable react/jsx-props-no-spreading */
|
||||||
import { SWRConfig } from "swr";
|
import { SWRConfig } from "swr";
|
||||||
|
import { appWithTranslation } from "next-i18next";
|
||||||
|
|
||||||
import "styles/globals.css";
|
import "styles/globals.css";
|
||||||
import "styles/weather-icons.css";
|
|
||||||
import "styles/theme.css";
|
import "styles/theme.css";
|
||||||
|
import "styles/manrope.css";
|
||||||
|
import nextI18nextConfig from "../../next-i18next.config";
|
||||||
|
|
||||||
import "utils/i18n";
|
import { ColorProvider } from "utils/contexts/color";
|
||||||
import { ColorProvider } from "utils/color-context";
|
import { ThemeProvider } from "utils/contexts/theme";
|
||||||
import { ThemeProvider } from "utils/theme-context";
|
import { SettingsProvider } from "utils/contexts/settings";
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return (
|
return (
|
||||||
@@ -18,11 +20,13 @@ function MyApp({ Component, pageProps }) {
|
|||||||
>
|
>
|
||||||
<ColorProvider>
|
<ColorProvider>
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<Component {...pageProps} />
|
<SettingsProvider>
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</SettingsProvider>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</ColorProvider>
|
</ColorProvider>
|
||||||
</SWRConfig>
|
</SWRConfig>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyApp;
|
export default appWithTranslation(MyApp, nextI18nextConfig);
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ export default function Document() {
|
|||||||
return (
|
return (
|
||||||
<Html>
|
<Html>
|
||||||
<Head>
|
<Head>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<meta
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true" />
|
name="description"
|
||||||
<link
|
content="A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations."
|
||||||
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<body className="relative w-full h-full bg-theme-50 dark:bg-theme-800 transition duration-150 ease-in-out">
|
<body>
|
||||||
<Main />
|
<Main />
|
||||||
<NextScript />
|
<NextScript />
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,25 +1,5 @@
|
|||||||
import { promises as fs } from "fs";
|
import { bookmarksResponse } from "utils/config/api-response";
|
||||||
import path from "path";
|
|
||||||
|
|
||||||
import yaml from "js-yaml";
|
|
||||||
|
|
||||||
import checkAndCopyConfig from "utils/config";
|
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
checkAndCopyConfig("bookmarks.yaml");
|
res.send(await bookmarksResponse());
|
||||||
|
|
||||||
const bookmarksYaml = path.join(process.cwd(), "config", "bookmarks.yaml");
|
|
||||||
const fileContents = await fs.readFile(bookmarksYaml, "utf8");
|
|
||||||
const bookmarks = yaml.load(fileContents);
|
|
||||||
|
|
||||||
// map easy to write YAML objects into easy to consume JS arrays
|
|
||||||
const bookmarksArray = bookmarks.map((group) => ({
|
|
||||||
name: Object.keys(group)[0],
|
|
||||||
bookmarks: group[Object.keys(group)[0]].map((entries) => ({
|
|
||||||
name: Object.keys(entries)[0],
|
|
||||||
...entries[Object.keys(entries)[0]][0],
|
|
||||||
})),
|
|
||||||
}));
|
|
||||||
|
|
||||||
res.send(bookmarksArray);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Docker from "dockerode";
|
import Docker from "dockerode";
|
||||||
|
|
||||||
import getDockerArguments from "utils/docker";
|
import getDockerArguments from "utils/config/docker";
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
const { service } = req.query;
|
const { service } = req.query;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Docker from "dockerode";
|
import Docker from "dockerode";
|
||||||
|
|
||||||
import getDockerArguments from "utils/docker";
|
import getDockerArguments from "utils/config/docker";
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
const { service } = req.query;
|
const { service } = req.query;
|
||||||
|
|||||||
27
src/pages/api/hash.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import { join } from "path";
|
||||||
|
import { createHash } from "crypto";
|
||||||
|
import { readFileSync } from "fs";
|
||||||
|
|
||||||
|
import checkAndCopyConfig from "utils/config/config";
|
||||||
|
|
||||||
|
const configs = ["docker.yaml", "settings.yaml", "services.yaml", "bookmarks.yaml", "widgets.yaml"];
|
||||||
|
|
||||||
|
function hash(buffer) {
|
||||||
|
const hashSum = createHash("sha256");
|
||||||
|
hashSum.update(buffer);
|
||||||
|
return hashSum.digest("hex");
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function handler(req, res) {
|
||||||
|
const hashes = configs.map((config) => {
|
||||||
|
checkAndCopyConfig(config);
|
||||||
|
const configYaml = join(process.cwd(), "config", config);
|
||||||
|
return hash(readFileSync(configYaml, "utf8"));
|
||||||
|
});
|
||||||
|
|
||||||
|
const combinedHash = hash(hashes.join(""));
|
||||||
|
|
||||||
|
res.send({
|
||||||
|
hash: combinedHash,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ import https from "https";
|
|||||||
|
|
||||||
import getRawBody from "raw-body";
|
import getRawBody from "raw-body";
|
||||||
|
|
||||||
import { httpRequest, httpsRequest } from "utils/http";
|
import { httpRequest, httpsRequest } from "utils/proxy/http";
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
|
|||||||
@@ -1,43 +1,5 @@
|
|||||||
/* eslint-disable no-console */
|
import { servicesResponse } from "utils/config/api-response";
|
||||||
import { servicesFromConfig, servicesFromDocker, cleanServiceGroups } from "utils/service-helpers";
|
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
let discoveredServices;
|
res.send(await servicesResponse());
|
||||||
let configuredServices;
|
|
||||||
|
|
||||||
try {
|
|
||||||
discoveredServices = cleanServiceGroups(await servicesFromDocker());
|
|
||||||
} catch (e) {
|
|
||||||
console.error("Failed to discover services, please check docker.yaml for errors or remove example entries.");
|
|
||||||
console.error(e);
|
|
||||||
discoveredServices = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
configuredServices = cleanServiceGroups(await servicesFromConfig());
|
|
||||||
} catch (e) {
|
|
||||||
console.error("Failed to load services.yaml, please check for errors");
|
|
||||||
console.error(e);
|
|
||||||
configuredServices = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const mergedGroupsNames = [
|
|
||||||
...new Set([discoveredServices.map((group) => group.name), configuredServices.map((group) => group.name)].flat()),
|
|
||||||
];
|
|
||||||
|
|
||||||
const mergedGroups = [];
|
|
||||||
|
|
||||||
mergedGroupsNames.forEach((groupName) => {
|
|
||||||
const discoveredGroup = discoveredServices.find((group) => group.name === groupName) || { services: [] };
|
|
||||||
const configuredGroup = configuredServices.find((group) => group.name === groupName) || { services: [] };
|
|
||||||
|
|
||||||
const mergedGroup = {
|
|
||||||
name: groupName,
|
|
||||||
services: [...discoveredGroup.services, ...configuredGroup.services].filter((service) => service),
|
|
||||||
};
|
|
||||||
|
|
||||||
mergedGroups.push(mergedGroup);
|
|
||||||
});
|
|
||||||
|
|
||||||
res.send(mergedGroups);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,117 +1,64 @@
|
|||||||
import genericProxyHandler from "utils/proxies/generic";
|
import { formatApiCall } from "utils/proxy/api-helpers";
|
||||||
import credentialedProxyHandler from "utils/proxies/credentialed";
|
import createLogger from "utils/logger";
|
||||||
import rutorrentProxyHandler from "utils/proxies/rutorrent";
|
import genericProxyHandler from "utils/proxy/handlers/generic";
|
||||||
import nzbgetProxyHandler from "utils/proxies/nzbget";
|
import widgets from "widgets/widgets";
|
||||||
import npmProxyHandler from "utils/proxies/npm";
|
|
||||||
import transmissionProxyHandler from "utils/proxies/transmission";
|
|
||||||
import qbittorrentProxyHandler from "utils/proxies/qbittorrent";
|
|
||||||
|
|
||||||
function asJson(data) {
|
const logger = createLogger("servicesProxy");
|
||||||
if (data?.length > 0) {
|
|
||||||
const json = JSON.parse(data.toString());
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function jsonArrayTransform(data, transform) {
|
|
||||||
const json = asJson(data);
|
|
||||||
if (json instanceof Array) {
|
|
||||||
return transform(json);
|
|
||||||
}
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
function jsonArrayFilter(data, filter) {
|
|
||||||
return jsonArrayTransform(data, (items) => items.filter(filter));
|
|
||||||
}
|
|
||||||
|
|
||||||
const serviceProxyHandlers = {
|
|
||||||
// uses query param auth
|
|
||||||
emby: genericProxyHandler,
|
|
||||||
jellyfin: genericProxyHandler,
|
|
||||||
pihole: genericProxyHandler,
|
|
||||||
radarr: {
|
|
||||||
proxy: genericProxyHandler,
|
|
||||||
maps: {
|
|
||||||
movie: (data) => ({
|
|
||||||
wanted: jsonArrayFilter(data, (item) => item.isAvailable === false).length,
|
|
||||||
have: jsonArrayFilter(data, (item) => item.isAvailable === true).length,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sonarr: {
|
|
||||||
proxy: genericProxyHandler,
|
|
||||||
maps: {
|
|
||||||
series: (data) => ({
|
|
||||||
total: asJson(data).length,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lidarr: {
|
|
||||||
proxy: genericProxyHandler,
|
|
||||||
maps: {
|
|
||||||
album: (data) => ({
|
|
||||||
have: jsonArrayFilter(data, (item) => item?.statistics?.percentOfTracks === 100).length,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
readarr: {
|
|
||||||
proxy: genericProxyHandler,
|
|
||||||
maps: {
|
|
||||||
book: (data) => ({
|
|
||||||
have: jsonArrayFilter(data, (item) => item?.statistics?.bookFileCount > 0).length,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
bazarr: {
|
|
||||||
proxy: genericProxyHandler,
|
|
||||||
maps: {
|
|
||||||
movies: (data) => ({
|
|
||||||
total: asJson(data).total,
|
|
||||||
}),
|
|
||||||
episodes: (data) => ({
|
|
||||||
total: asJson(data).total,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
speedtest: genericProxyHandler,
|
|
||||||
tautulli: genericProxyHandler,
|
|
||||||
traefik: genericProxyHandler,
|
|
||||||
sabnzbd: genericProxyHandler,
|
|
||||||
jackett: genericProxyHandler,
|
|
||||||
adguard: genericProxyHandler,
|
|
||||||
// uses X-API-Key (or similar) header auth
|
|
||||||
gotify: credentialedProxyHandler,
|
|
||||||
portainer: credentialedProxyHandler,
|
|
||||||
jellyseerr: credentialedProxyHandler,
|
|
||||||
overseerr: credentialedProxyHandler,
|
|
||||||
ombi: credentialedProxyHandler,
|
|
||||||
coinmarketcap: credentialedProxyHandler,
|
|
||||||
prowlarr: credentialedProxyHandler,
|
|
||||||
// super specific handlers
|
|
||||||
rutorrent: rutorrentProxyHandler,
|
|
||||||
nzbget: nzbgetProxyHandler,
|
|
||||||
npm: npmProxyHandler,
|
|
||||||
transmission: transmissionProxyHandler,
|
|
||||||
qbittorrent: qbittorrentProxyHandler,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
const { type } = req.query;
|
try {
|
||||||
|
const { type } = req.query;
|
||||||
|
const widget = widgets[type];
|
||||||
|
|
||||||
const serviceProxyHandler = serviceProxyHandlers[type];
|
if (!widget) {
|
||||||
|
logger.debug("Unknown proxy service type: %s", type);
|
||||||
|
return res.status(403).json({ error: "Unkown proxy service type" });
|
||||||
|
}
|
||||||
|
|
||||||
|
const serviceProxyHandler = widget.proxyHandler || genericProxyHandler;
|
||||||
|
|
||||||
if (serviceProxyHandler) {
|
|
||||||
if (serviceProxyHandler instanceof Function) {
|
if (serviceProxyHandler instanceof Function) {
|
||||||
|
// map opaque endpoints to their actual endpoint
|
||||||
|
if (widget?.mappings) {
|
||||||
|
const mapping = widget?.mappings?.[req.query.endpoint];
|
||||||
|
const mappingParams = mapping?.params;
|
||||||
|
const map = mapping?.map;
|
||||||
|
const endpoint = mapping?.endpoint;
|
||||||
|
const endpointProxy = mapping?.proxyHandler || serviceProxyHandler;
|
||||||
|
|
||||||
|
if (!endpoint) {
|
||||||
|
logger.debug("Unsupported service endpoint: %s", type);
|
||||||
|
return res.status(403).json({ error: "Unsupported service endpoint" });
|
||||||
|
}
|
||||||
|
|
||||||
|
req.method = mapping?.method || "GET";
|
||||||
|
req.query.endpoint = endpoint;
|
||||||
|
|
||||||
|
if (req.query.segments) {
|
||||||
|
const segments = JSON.parse(req.query.segments);
|
||||||
|
req.query.endpoint = formatApiCall(endpoint, segments);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (req.query.query && mappingParams) {
|
||||||
|
const queryParams = JSON.parse(req.query.query);
|
||||||
|
const query = new URLSearchParams(mappingParams.map((p) => [p, queryParams[p]]));
|
||||||
|
req.query.endpoint = `${req.query.endpoint}?${query}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endpointProxy instanceof Function) {
|
||||||
|
return endpointProxy(req, res, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
return serviceProxyHandler(req, res, map);
|
||||||
|
}
|
||||||
|
|
||||||
return serviceProxyHandler(req, res);
|
return serviceProxyHandler(req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { proxy, maps } = serviceProxyHandler;
|
logger.debug("Unknown proxy service type: %s", type);
|
||||||
if (proxy) {
|
return res.status(403).json({ error: "Unkown proxy service type" });
|
||||||
return proxy(req, res, maps);
|
} catch (ex) {
|
||||||
}
|
logger.error(ex);
|
||||||
|
return res.status(500).send({ error: "Unexpected error" });
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.status(403).json({ error: "Unkown proxy service type" });
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import checkAndCopyConfig from "utils/config";
|
import checkAndCopyConfig from "utils/config/config";
|
||||||
|
|
||||||
const configs = ["docker.yaml", "settings.yaml", "services.yaml", "bookmarks.yaml"];
|
const configs = ["docker.yaml", "settings.yaml", "services.yaml", "bookmarks.yaml"];
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,5 @@
|
|||||||
import { promises as fs } from "fs";
|
import { widgetsResponse } from "utils/config/api-response";
|
||||||
import path from "path";
|
|
||||||
|
|
||||||
import yaml from "js-yaml";
|
|
||||||
|
|
||||||
import checkAndCopyConfig from "utils/config";
|
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
checkAndCopyConfig("widgets.yaml");
|
res.send(await widgetsResponse());
|
||||||
|
|
||||||
const widgetsYaml = path.join(process.cwd(), "config", "widgets.yaml");
|
|
||||||
const fileContents = await fs.readFile(widgetsYaml, "utf8");
|
|
||||||
const widgets = yaml.load(fileContents);
|
|
||||||
|
|
||||||
// map easy to write YAML objects into easy to consume JS arrays
|
|
||||||
const widgetsArray = widgets.map((group) => ({
|
|
||||||
type: Object.keys(group)[0],
|
|
||||||
options: { ...group[Object.keys(group)[0]] },
|
|
||||||
}));
|
|
||||||
|
|
||||||
res.send(widgetsArray);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import cachedFetch from "utils/cached-fetch";
|
import cachedFetch from "utils/proxy/cached-fetch";
|
||||||
import { getSettings } from "utils/config";
|
import { getSettings } from "utils/config/config";
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
const { latitude, longitude, units, provider, cache, lang } = req.query;
|
const { latitude, longitude, units, provider, cache, lang } = req.query;
|
||||||
|
|||||||