mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-12 07:05:56 -07:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 22f1317ad3 | |||
| 7c36d09217 | |||
| 378f2d5d6d | |||
| d907ca1d0e | |||
| 81accd8dbe | |||
| 070e1b9cca | |||
| 6324c5ee63 | |||
| 9b475f48d8 | |||
| 35b72b65de | |||
| f6dca0c5ad | |||
| e6ad43a76c | |||
| c46b3e6cff | |||
| e913243149 | |||
| 99e16c6da0 | |||
| c0b6eb3501 | |||
| a17763ca9f | |||
| bd39fb48b9 | |||
| f2dc80e39e | |||
| 7d48b7ea78 | |||
| 4c361422ca | |||
| 7c26cf6d97 |
@@ -10,6 +10,7 @@ version-resolver:
|
|||||||
- 'breaking-change'
|
- 'breaking-change'
|
||||||
minor:
|
minor:
|
||||||
labels:
|
labels:
|
||||||
|
- 'minor'
|
||||||
- 'enhancement'
|
- 'enhancement'
|
||||||
- 'feature'
|
- 'feature'
|
||||||
patch:
|
patch:
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ on:
|
|||||||
]
|
]
|
||||||
branches: [ dev ]
|
branches: [ dev ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
synchronize-with-crowdin:
|
synchronize-with-crowdin:
|
||||||
name: Crowdin Sync
|
name: Crowdin Sync
|
||||||
@@ -19,7 +23,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- name: crowdin action
|
- name: crowdin action
|
||||||
uses: crowdin/github-action@c7af9bc98b01694653031fef2a0dc6c7888ce9bc # v2
|
uses: crowdin/github-action@8f01d54f70f1713ee3f09d82c2bbb2daeac28689 # v2
|
||||||
with:
|
with:
|
||||||
upload_translations: false
|
upload_translations: false
|
||||||
download_translations: true
|
download_translations: true
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ on:
|
|||||||
env:
|
env:
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +29,6 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
id-token: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -101,7 +102,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
|
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
|
||||||
|
|
||||||
- name: Setup Docker buildx
|
- name: Setup Docker buildx
|
||||||
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
|
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -25,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version-file: ".python-version"
|
python-version-file: ".python-version"
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
|
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
||||||
- run: sudo apt-get install pngquant
|
- run: sudo apt-get install pngquant
|
||||||
- name: Test Docs Build
|
- name: Test Docs Build
|
||||||
run: uv run --frozen zensical build --clean
|
run: uv run --frozen zensical build --clean
|
||||||
@@ -33,6 +31,10 @@ jobs:
|
|||||||
name: Build & Deploy Docs
|
name: Build & Deploy Docs
|
||||||
if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
if: github.repository == 'gethomepage/homepage' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
@@ -43,7 +45,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version-file: ".python-version"
|
python-version-file: ".python-version"
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
|
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
||||||
- run: sudo apt-get install pngquant
|
- run: sudo apt-get install pngquant
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
run: uv run --frozen zensical build --clean
|
run: uv run --frozen zensical build --clean
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ on:
|
|||||||
discussion:
|
discussion:
|
||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
discussions: write
|
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
close-needs-discussion:
|
close-needs-discussion:
|
||||||
name: Issues Need Discussion
|
name: Issues Need Discussion
|
||||||
if: github.event_name == 'issues' && github.event.label.name == 'needs-discussion'
|
if: github.event_name == 'issues' && github.event.label.name == 'needs-discussion'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
with:
|
with:
|
||||||
@@ -49,6 +49,8 @@ jobs:
|
|||||||
name: Discussions Need Information
|
name: Discussions Need Information
|
||||||
if: github.event_name == 'discussion' && github.event.label.name == 'needs-information'
|
if: github.event_name == 'discussion' && github.event.label.name == 'needs-information'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
discussions: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
merge_group:
|
merge_group:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Linting Checks
|
name: Linting Checks
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ name: PR Quality
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: read
|
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ on:
|
|||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ on:
|
|||||||
- cron: '0 3 * * *'
|
- cron: '0 3 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
discussions: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: lock
|
group: lock
|
||||||
@@ -17,6 +14,9 @@ jobs:
|
|||||||
stale:
|
stale:
|
||||||
name: 'Stale'
|
name: 'Stale'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10
|
- uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10
|
||||||
with:
|
with:
|
||||||
@@ -31,6 +31,10 @@ jobs:
|
|||||||
lock-threads:
|
lock-threads:
|
||||||
name: 'Lock Old Threads'
|
name: 'Lock Old Threads'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
discussions: write
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2
|
- uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2
|
||||||
with:
|
with:
|
||||||
@@ -56,6 +60,8 @@ jobs:
|
|||||||
close-answered-discussions:
|
close-answered-discussions:
|
||||||
name: 'Close Answered Discussions'
|
name: 'Close Answered Discussions'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
discussions: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
with:
|
with:
|
||||||
@@ -112,6 +118,8 @@ jobs:
|
|||||||
close-outdated-discussions:
|
close-outdated-discussions:
|
||||||
name: 'Close Outdated Discussions'
|
name: 'Close Outdated Discussions'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
discussions: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
with:
|
with:
|
||||||
@@ -203,6 +211,8 @@ jobs:
|
|||||||
close-unsupported-feature-requests:
|
close-unsupported-feature-requests:
|
||||||
name: 'Close Unsupported Feature Requests'
|
name: 'Close Unsupported Feature Requests'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
discussions: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vitest:
|
vitest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ To ensure cohesiveness of various widgets, the following should be used as a gui
|
|||||||
- Note that we reserve the right to decline widgets for projects that are very young (eg < ~1y) or those with a small reach (eg low GitHub stars). Again, this is in an effort to keep overall widget maintenance under control.
|
- Note that we reserve the right to decline widgets for projects that are very young (eg < ~1y) or those with a small reach (eg low GitHub stars). Again, this is in an effort to keep overall widget maintenance under control.
|
||||||
- Widgets should be only one row of blocks
|
- Widgets should be only one row of blocks
|
||||||
- Widgets should be no more than 4 blocks wide and generally conform to the styling / design choices of other widgets
|
- Widgets should be no more than 4 blocks wide and generally conform to the styling / design choices of other widgets
|
||||||
|
- Use `withWidgetFields(service, defaultFields)` from `utils/widget-fields` to apply default fields and cap configured fields without mutating the service. The helper limits widgets to 4 fields.
|
||||||
- Minimize the number of API calls
|
- Minimize the number of API calls
|
||||||
- Avoid the use of custom proxy unless absolutely necessary
|
- Avoid the use of custom proxy unless absolutely necessary
|
||||||
- Widgets should be 'read-only', as in they should not make write changes using the relevant tool's API. Homepage widgets are designed to surface information, not to be a (usually worse) replacement for the tool itself.
|
- Widgets should be 'read-only', as in they should not make write changes using the relevant tool's API. Homepage widgets are designed to surface information, not to be a (usually worse) replacement for the tool itself.
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ See the [crowdsec docs](https://docs.crowdsec.net/docs/local_api/intro/#machines
|
|||||||
in most instances you can use the default credentials (`/etc/crowdsec/local_api_credentials.yaml`).
|
in most instances you can use the default credentials (`/etc/crowdsec/local_api_credentials.yaml`).
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Without the `limit24h` option, the widget will fetch all alerts which is limited to 100 by the API to avoid performance issues.
|
|
||||||
|
`alerts` counts alerts raised by your own engine in the last 24 hours. Alerts originating from the
|
||||||
|
CrowdSec community blocklist are excluded.
|
||||||
|
|
||||||
Allowed fields: `["alerts", "bans"]`.
|
Allowed fields: `["alerts", "bans"]`.
|
||||||
|
|
||||||
@@ -19,5 +21,4 @@ widget:
|
|||||||
url: http://crowdsechostorip:port
|
url: http://crowdsechostorip:port
|
||||||
username: localhost # machine_id in crowdsec
|
username: localhost # machine_id in crowdsec
|
||||||
password: password
|
password: password
|
||||||
limit24h: true # optional, limits alerts to last 24h. Default: false
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ widget:
|
|||||||
url: https://proxmoxbackupserver.host:port
|
url: https://proxmoxbackupserver.host:port
|
||||||
username: api_token_id
|
username: api_token_id
|
||||||
password: api_token_secret
|
password: api_token_secret
|
||||||
datastore: datastore_name #optional; if ommitted, will display a combination of all datastores used / total
|
datastore: datastore_name #optional; if omitted, will display a combination of all datastores used / total
|
||||||
```
|
```
|
||||||
|
|||||||
+4
-39
@@ -1,30 +1,13 @@
|
|||||||
import path from "node:path";
|
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
||||||
import { fileURLToPath } from "node:url";
|
import prettierConfig from "eslint-config-prettier/flat";
|
||||||
|
|
||||||
import { fixupConfigRules } from "@eslint/compat";
|
|
||||||
import { FlatCompat } from "@eslint/eslintrc";
|
|
||||||
import js from "@eslint/js";
|
|
||||||
import prettier from "eslint-plugin-prettier";
|
|
||||||
import { defineConfig, globalIgnores } from "eslint/config";
|
import { defineConfig, globalIgnores } from "eslint/config";
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
|
||||||
const __dirname = path.dirname(__filename);
|
|
||||||
const compat = new FlatCompat({
|
|
||||||
baseDirectory: __dirname,
|
|
||||||
recommendedConfig: js.configs.recommended,
|
|
||||||
allConfig: js.configs.all,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default defineConfig([
|
export default defineConfig([
|
||||||
|
...nextCoreWebVitals,
|
||||||
|
prettierConfig,
|
||||||
{
|
{
|
||||||
files: ["**/*.{js,mjs,cjs,jsx}"],
|
files: ["**/*.{js,mjs,cjs,jsx}"],
|
||||||
|
|
||||||
extends: fixupConfigRules(compat.extends("next/core-web-vitals", "prettier", "plugin:react-hooks/recommended")),
|
|
||||||
|
|
||||||
plugins: {
|
|
||||||
prettier,
|
|
||||||
},
|
|
||||||
|
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
ecmaVersion: 6,
|
ecmaVersion: 6,
|
||||||
sourceType: "module",
|
sourceType: "module",
|
||||||
@@ -65,24 +48,6 @@ export default defineConfig([
|
|||||||
allowElseIf: true,
|
allowElseIf: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
// Keep the pre-eslint-plugin-react-hooks v6 lint policy until rules are adopted incrementally
|
|
||||||
"react-hooks/config": "off",
|
|
||||||
"react-hooks/error-boundaries": "off",
|
|
||||||
"react-hooks/exhaustive-deps": "warn",
|
|
||||||
"react-hooks/gating": "off",
|
|
||||||
"react-hooks/globals": "off",
|
|
||||||
"react-hooks/immutability": "off",
|
|
||||||
"react-hooks/incompatible-library": "off",
|
|
||||||
"react-hooks/preserve-manual-memoization": "off",
|
|
||||||
"react-hooks/purity": "off",
|
|
||||||
"react-hooks/refs": "off",
|
|
||||||
"react-hooks/rules-of-hooks": "error",
|
|
||||||
"react-hooks/set-state-in-effect": "off",
|
|
||||||
"react-hooks/set-state-in-render": "off",
|
|
||||||
"react-hooks/static-components": "off",
|
|
||||||
"react-hooks/unsupported-syntax": "off",
|
|
||||||
"react-hooks/use-memo": "off",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Vitest tests often intentionally place imports after `vi.mock(...)` to ensure
|
// Vitest tests often intentionally place imports after `vi.mock(...)` to ensure
|
||||||
|
|||||||
+6
-14
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homepage",
|
"name": "homepage",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
@@ -23,12 +23,12 @@
|
|||||||
"gamedig": "^5.3.3",
|
"gamedig": "^5.3.3",
|
||||||
"i18next": "^26.3.6",
|
"i18next": "^26.3.6",
|
||||||
"ical.js": "^2.2.1",
|
"ical.js": "^2.2.1",
|
||||||
"js-yaml": "^5.3.0",
|
"js-yaml": "^5.4.0",
|
||||||
"json-rpc-2.0": "^1.7.1",
|
"json-rpc-2.0": "^1.7.1",
|
||||||
"luxon": "^3.7.2",
|
"luxon": "^3.7.2",
|
||||||
"memory-cache": "^0.2.0",
|
"memory-cache": "^0.2.0",
|
||||||
"minecraftstatuspinger": "^1.2.2",
|
"minecraftstatuspinger": "^1.2.2",
|
||||||
"next": "^16.2.12",
|
"next": "^16.3.3",
|
||||||
"next-auth": "^4.24.15",
|
"next-auth": "^4.24.15",
|
||||||
"next-i18next": "^16.0.8",
|
"next-i18next": "^16.0.8",
|
||||||
"ping": "^1.0.0",
|
"ping": "^1.0.0",
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"raw-body": "^4.0.0",
|
"raw-body": "^4.0.0",
|
||||||
"react": "^19.2.8",
|
"react": "^19.2.8",
|
||||||
"react-dom": "^19.2.8",
|
"react-dom": "^19.2.8",
|
||||||
"react-i18next": "^17.0.11",
|
"react-i18next": "^17.0.12",
|
||||||
"react-icons": "^5.6.0",
|
"react-icons": "^5.6.0",
|
||||||
"recharts": "^3.1.2",
|
"recharts": "^3.1.2",
|
||||||
"swr": "^2.5.1",
|
"swr": "^2.5.1",
|
||||||
@@ -48,29 +48,21 @@
|
|||||||
"xml-js": "^1.6.11"
|
"xml-js": "^1.6.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/compat": "^2.1.0",
|
|
||||||
"@eslint/eslintrc": "^3.3.3",
|
|
||||||
"@eslint/js": "^9.39.4",
|
|
||||||
"@tailwindcss/forms": "^0.5.11",
|
"@tailwindcss/forms": "^0.5.11",
|
||||||
"@tailwindcss/postcss": "^4.3.3",
|
"@tailwindcss/postcss": "^4.3.3",
|
||||||
"@testing-library/jest-dom": "^7.0.1",
|
"@testing-library/jest-dom": "^7.0.1",
|
||||||
"@testing-library/react": "^16.3.0",
|
"@testing-library/react": "^16.3.0",
|
||||||
"@vitest/coverage-v8": "^4.1.10",
|
"@vitest/coverage-v8": "^4.1.10",
|
||||||
"eslint": "^9.25.1",
|
"eslint": "^9.25.1",
|
||||||
"eslint-config-next": "^15.5.11",
|
"eslint-config-next": "^16.3.3",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
||||||
"eslint-plugin-prettier": "^5.5.6",
|
|
||||||
"eslint-plugin-react": "^7.37.4",
|
|
||||||
"eslint-plugin-react-hooks": "^7.1.1",
|
|
||||||
"jsdom": "^30.0.1",
|
"jsdom": "^30.0.1",
|
||||||
"postcss": "^8.5.26",
|
"postcss": "^8.5.26",
|
||||||
"prettier": "^3.8.4",
|
"prettier": "^3.8.4",
|
||||||
"prettier-plugin-organize-imports": "^4.3.0",
|
"prettier-plugin-organize-imports": "^4.3.0",
|
||||||
"tailwind-scrollbar": "^4.0.2",
|
"tailwind-scrollbar": "^4.0.2",
|
||||||
"tailwindcss": "^4.3.3",
|
"tailwindcss": "^4.3.3",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^6.0.3",
|
||||||
"vitest": "^4.1.0"
|
"vitest": "^4.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|||||||
Generated
+302
-382
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><circle cx="5" cy="5" r="4"/></svg>
|
||||||
|
After Width: | Height: | Size: 96 B |
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Wag asseblief"
|
"wait": "Wag asseblief"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Soek…"
|
"placeholder": "Soek…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "SVE",
|
"cpu": "SVE",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "الرجاء الإنتظار"
|
"wait": "الرجاء الإنتظار"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "بحث …"
|
"placeholder": "بحث …",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "المعالج",
|
"cpu": "المعالج",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Моля изчакайте"
|
"wait": "Моля изчакайте"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Търсене…"
|
"placeholder": "Търсене…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Процесор",
|
"cpu": "Процесор",
|
||||||
|
|||||||
+254
-252
@@ -21,7 +21,7 @@
|
|||||||
"seconds": "s"
|
"seconds": "s"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"signout": "Sign out"
|
"signout": "Tanca la sessió"
|
||||||
},
|
},
|
||||||
"widget": {
|
"widget": {
|
||||||
"missing_type": "Falta el tipus de widget: {{type}}",
|
"missing_type": "Falta el tipus de widget: {{type}}",
|
||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Si us plau, espereu"
|
"wait": "Si us plau, espereu"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Cerca…"
|
"placeholder": "Cerca…",
|
||||||
|
"provider": "Motor de cerca: {{name}}",
|
||||||
|
"select_provider": "Escull motor de cerca"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
@@ -70,17 +72,17 @@
|
|||||||
"empty_data": "Estat del subsistema desconegut"
|
"empty_data": "Estat del subsistema desconegut"
|
||||||
},
|
},
|
||||||
"unifi_drive": {
|
"unifi_drive": {
|
||||||
"healthy": "Healthy",
|
"healthy": "Saludable",
|
||||||
"degraded": "Degraded",
|
"degraded": "Degradat",
|
||||||
"no_data": "No storage data available"
|
"no_data": "Sense dades d'emmagatzematge disponible"
|
||||||
},
|
},
|
||||||
"duplicati": {
|
"duplicati": {
|
||||||
"jobs": "Jobs",
|
"jobs": "Tasques",
|
||||||
"stored": "Stored",
|
"stored": "Desat",
|
||||||
"lastBackup": "Last Run",
|
"lastBackup": "Darrera execució",
|
||||||
"nextRun": "Next Run",
|
"nextRun": "Propera execució",
|
||||||
"running": "Running",
|
"running": "En execució",
|
||||||
"warnings": "Warnings",
|
"warnings": "Avisos",
|
||||||
"errors": "Errors"
|
"errors": "Errors"
|
||||||
},
|
},
|
||||||
"docker": {
|
"docker": {
|
||||||
@@ -133,7 +135,7 @@
|
|||||||
"series": "Sèries",
|
"series": "Sèries",
|
||||||
"episodes": "Episodis",
|
"episodes": "Episodis",
|
||||||
"songs": "Cançons",
|
"songs": "Cançons",
|
||||||
"albums": "Albums"
|
"albums": "Àlbums"
|
||||||
},
|
},
|
||||||
"esphome": {
|
"esphome": {
|
||||||
"offline": "Desconnectat",
|
"offline": "Desconnectat",
|
||||||
@@ -244,10 +246,10 @@
|
|||||||
"seed": "Sembrat"
|
"seed": "Sembrat"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Download",
|
"download": "Baixada",
|
||||||
"upload": "Upload",
|
"upload": "Pujada",
|
||||||
"leech": "Leech",
|
"leech": "Sangonera",
|
||||||
"seed": "Seed"
|
"seed": "Sembrat"
|
||||||
},
|
},
|
||||||
"qnap": {
|
"qnap": {
|
||||||
"cpuUsage": "Ús de CPU",
|
"cpuUsage": "Ús de CPU",
|
||||||
@@ -258,44 +260,44 @@
|
|||||||
"invalid": "No vàlid"
|
"invalid": "No vàlid"
|
||||||
},
|
},
|
||||||
"deluge": {
|
"deluge": {
|
||||||
"download": "Download",
|
"download": "Baixada",
|
||||||
"upload": "Upload",
|
"upload": "Pujada",
|
||||||
"leech": "Leech",
|
"leech": "Sangonera",
|
||||||
"seed": "Seed"
|
"seed": "Sembrat"
|
||||||
},
|
},
|
||||||
"develancacheui": {
|
"develancacheui": {
|
||||||
"cachehitbytes": "Bytes trobats a la memòria cau",
|
"cachehitbytes": "Bytes trobats a la memòria cau",
|
||||||
"cachemissbytes": "Bytes no trobats a la memòria cau"
|
"cachemissbytes": "Bytes no trobats a la memòria cau"
|
||||||
},
|
},
|
||||||
"downloadstation": {
|
"downloadstation": {
|
||||||
"download": "Download",
|
"download": "Baixada",
|
||||||
"upload": "Upload",
|
"upload": "Pujada",
|
||||||
"leech": "Leech",
|
"leech": "Sangonera",
|
||||||
"seed": "Seed"
|
"seed": "Sembrat"
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"sonarr": {
|
||||||
"wanted": "Volgut",
|
"wanted": "Volgut",
|
||||||
"queued": "En cua",
|
"queued": "En cua",
|
||||||
"series": "Series",
|
"series": "Sèries",
|
||||||
"queue": "Queue",
|
"queue": "Cua",
|
||||||
"unknown": "Unknown"
|
"unknown": "Desconegut"
|
||||||
},
|
},
|
||||||
"radarr": {
|
"radarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Volguts",
|
||||||
"missing": "Falten",
|
"missing": "Falten",
|
||||||
"queued": "Queued",
|
"queued": "Encuat",
|
||||||
"movies": "Movies",
|
"movies": "Pel·lícules",
|
||||||
"queue": "Queue",
|
"queue": "Cua",
|
||||||
"unknown": "Unknown"
|
"unknown": "Desconegut"
|
||||||
},
|
},
|
||||||
"lidarr": {
|
"lidarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Volguts",
|
||||||
"queued": "Queued",
|
"queued": "Encuat",
|
||||||
"artists": "Artistes"
|
"artists": "Artistes"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Volguts",
|
||||||
"queued": "Queued",
|
"queued": "Encuat",
|
||||||
"books": "Llibres"
|
"books": "Llibres"
|
||||||
},
|
},
|
||||||
"bazarr": {
|
"bazarr": {
|
||||||
@@ -308,16 +310,16 @@
|
|||||||
"available": "Disponible"
|
"available": "Disponible"
|
||||||
},
|
},
|
||||||
"seerr": {
|
"seerr": {
|
||||||
"pending": "Pending",
|
"pending": "Pendent",
|
||||||
"approved": "Approved",
|
"approved": "Aprovat",
|
||||||
"available": "Available",
|
"available": "Disponible",
|
||||||
"completed": "Completed",
|
"completed": "Completat",
|
||||||
"processing": "Processing",
|
"processing": "Processant",
|
||||||
"issues": "Open Issues"
|
"issues": "Temes oberts"
|
||||||
},
|
},
|
||||||
"netalertx": {
|
"netalertx": {
|
||||||
"total": "Total",
|
"total": "Total",
|
||||||
"connected": "Connected",
|
"connected": "Connectat",
|
||||||
"new_devices": "Nous dispositius",
|
"new_devices": "Nous dispositius",
|
||||||
"down_alerts": "Alertes de caigudes"
|
"down_alerts": "Alertes de caigudes"
|
||||||
},
|
},
|
||||||
@@ -328,18 +330,18 @@
|
|||||||
"gravity": "Gravetat"
|
"gravity": "Gravetat"
|
||||||
},
|
},
|
||||||
"adguard": {
|
"adguard": {
|
||||||
"queries": "Queries",
|
"queries": "Consultes",
|
||||||
"blocked": "Blocked",
|
"blocked": "Bloquejat",
|
||||||
"filtered": "Filtrat",
|
"filtered": "Filtrat",
|
||||||
"latency": "Latència"
|
"latency": "Latència"
|
||||||
},
|
},
|
||||||
"speedtest": {
|
"speedtest": {
|
||||||
"upload": "Upload",
|
"upload": "Pujada",
|
||||||
"download": "Download",
|
"download": "Baixada",
|
||||||
"ping": "Ping"
|
"ping": "Latència"
|
||||||
},
|
},
|
||||||
"portainer": {
|
"portainer": {
|
||||||
"running": "Running",
|
"running": "En execució",
|
||||||
"stopped": "Aturat",
|
"stopped": "Aturat",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
@@ -357,16 +359,16 @@
|
|||||||
"address": "Adreça",
|
"address": "Adreça",
|
||||||
"expires": "Caduca",
|
"expires": "Caduca",
|
||||||
"never": "Mai",
|
"never": "Mai",
|
||||||
"user": "User",
|
"user": "Usuari",
|
||||||
"hostname": "Hostname",
|
"hostname": "Nom d'hoste",
|
||||||
"name": "Name",
|
"name": "Nom",
|
||||||
"client_version": "Client Version",
|
"client_version": "Versió de client",
|
||||||
"os": "OS",
|
"os": "OS",
|
||||||
"created": "Created",
|
"created": "Creat",
|
||||||
"authorized": "Authorized",
|
"authorized": "Autoritzat",
|
||||||
"is_external": "Is External",
|
"is_external": "És extern",
|
||||||
"update_available": "Update Available",
|
"update_available": "Actualització disponible",
|
||||||
"tags": "Tags",
|
"tags": "Etiquetes",
|
||||||
"last_seen": "Vist per darrer cop",
|
"last_seen": "Vist per darrer cop",
|
||||||
"now": "Ara",
|
"now": "Ara",
|
||||||
"years": "{{number}}a",
|
"years": "{{number}}a",
|
||||||
@@ -376,7 +378,7 @@
|
|||||||
"minutes": "{{number}}m",
|
"minutes": "{{number}}m",
|
||||||
"seconds": "{{number}}s",
|
"seconds": "{{number}}s",
|
||||||
"ago": "Fa {{value}}",
|
"ago": "Fa {{value}}",
|
||||||
"true": "Yes",
|
"true": "Sí",
|
||||||
"false": "No"
|
"false": "No"
|
||||||
},
|
},
|
||||||
"technitium": {
|
"technitium": {
|
||||||
@@ -472,7 +474,7 @@
|
|||||||
"users": "Usuaris",
|
"users": "Usuaris",
|
||||||
"loginsLast24H": "Inicis de sessió (24h)",
|
"loginsLast24H": "Inicis de sessió (24h)",
|
||||||
"failedLoginsLast24H": "Errors d'inici de sessió (24h)",
|
"failedLoginsLast24H": "Errors d'inici de sessió (24h)",
|
||||||
"authorizationsLast24H": "Auths (24h)"
|
"authorizationsLast24H": "Autentificacions (últ. 24h)"
|
||||||
},
|
},
|
||||||
"proxmox": {
|
"proxmox": {
|
||||||
"mem": "MEM",
|
"mem": "MEM",
|
||||||
@@ -540,37 +542,37 @@
|
|||||||
"61-day": "Pluja lleugera",
|
"61-day": "Pluja lleugera",
|
||||||
"61-night": "Pluja lleugera",
|
"61-night": "Pluja lleugera",
|
||||||
"63-day": "Pluja",
|
"63-day": "Pluja",
|
||||||
"63-night": "Rain",
|
"63-night": "Pluja",
|
||||||
"65-day": "Pluja intensa",
|
"65-day": "Pluja intensa",
|
||||||
"65-night": "Heavy Rain",
|
"65-night": "Pluja forta",
|
||||||
"66-day": "Pluja gelada",
|
"66-day": "Pluja gelada",
|
||||||
"66-night": "Freezing Rain",
|
"66-night": "Pluja gelada",
|
||||||
"67-day": "Freezing Rain",
|
"67-day": "Pluja gelada",
|
||||||
"67-night": "Freezing Rain",
|
"67-night": "Pluja gelada",
|
||||||
"71-day": "Neu lleugera",
|
"71-day": "Neu lleugera",
|
||||||
"71-night": "Light Snow",
|
"71-night": "Nevada lleugera",
|
||||||
"73-day": "Neu",
|
"73-day": "Neu",
|
||||||
"73-night": "Snow",
|
"73-night": "Nevada",
|
||||||
"75-day": "Neu intensa",
|
"75-day": "Neu intensa",
|
||||||
"75-night": "Heavy Snow",
|
"75-night": "Nevada forta",
|
||||||
"77-day": "Neu lleugera",
|
"77-day": "Neu lleugera",
|
||||||
"77-night": "Snow Grains",
|
"77-night": "Flocs de neu",
|
||||||
"80-day": "Plovisqueig",
|
"80-day": "Plovisqueig",
|
||||||
"80-night": "Light Showers",
|
"80-night": "Plugims suaus",
|
||||||
"81-day": "Xàfecs",
|
"81-day": "Xàfecs",
|
||||||
"81-night": "Showers",
|
"81-night": "Plugims",
|
||||||
"82-day": "Xàfecs intensos",
|
"82-day": "Xàfecs intensos",
|
||||||
"82-night": "Heavy Showers",
|
"82-night": "Plugims forts",
|
||||||
"85-day": "Xàfecs de neu",
|
"85-day": "Xàfecs de neu",
|
||||||
"85-night": "Snow Showers",
|
"85-night": "Plugims amb neu",
|
||||||
"86-day": "Snow Showers",
|
"86-day": "Plugims amb neu",
|
||||||
"86-night": "Snow Showers",
|
"86-night": "Plugims amb neu",
|
||||||
"95-day": "Tempesta",
|
"95-day": "Tempesta",
|
||||||
"95-night": "Thunderstorm",
|
"95-night": "Tormenta",
|
||||||
"96-day": "Tempesta amb calamarsa",
|
"96-day": "Tempesta amb calamarsa",
|
||||||
"96-night": "Thunderstorm With Hail",
|
"96-night": "Tormenta amb calamarsa",
|
||||||
"99-day": "Thunderstorm With Hail",
|
"99-day": "Tormenta amb calamarsa",
|
||||||
"99-night": "Thunderstorm With Hail"
|
"99-night": "Tormenta amb calamarsa"
|
||||||
},
|
},
|
||||||
"homebridge": {
|
"homebridge": {
|
||||||
"available_update": "Sistema",
|
"available_update": "Sistema",
|
||||||
@@ -579,18 +581,18 @@
|
|||||||
"up_to_date": "Actualitzat",
|
"up_to_date": "Actualitzat",
|
||||||
"child_bridges": "Ponts fills",
|
"child_bridges": "Ponts fills",
|
||||||
"child_bridges_status": "{{ok}}/{{total}}",
|
"child_bridges_status": "{{ok}}/{{total}}",
|
||||||
"up": "Up",
|
"up": "En línia",
|
||||||
"pending": "Pending",
|
"pending": "Pendent",
|
||||||
"down": "Down",
|
"down": "Inactiu",
|
||||||
"ok": "Ok"
|
"ok": "Ok"
|
||||||
},
|
},
|
||||||
"healthchecks": {
|
"healthchecks": {
|
||||||
"new": "Nou",
|
"new": "Nou",
|
||||||
"up": "Up",
|
"up": "Actiu",
|
||||||
"grace": "En Període de gràcia",
|
"grace": "En Període de gràcia",
|
||||||
"down": "Down",
|
"down": "Inactiu",
|
||||||
"paused": "En pausa",
|
"paused": "En pausa",
|
||||||
"status": "Status",
|
"status": "Estat",
|
||||||
"last_ping": "Últim ping",
|
"last_ping": "Últim ping",
|
||||||
"never": "Sense pings"
|
"never": "Sense pings"
|
||||||
},
|
},
|
||||||
@@ -600,74 +602,74 @@
|
|||||||
"containers_failed": "Error"
|
"containers_failed": "Error"
|
||||||
},
|
},
|
||||||
"autobrr": {
|
"autobrr": {
|
||||||
"approvedPushes": "Approved",
|
"approvedPushes": "Aprovat",
|
||||||
"rejectedPushes": "Rebutjat",
|
"rejectedPushes": "Rebutjat",
|
||||||
"filters": "Filtres",
|
"filters": "Filtres",
|
||||||
"indexers": "Indexers"
|
"indexers": "Indexadors"
|
||||||
},
|
},
|
||||||
"tubearchivist": {
|
"tubearchivist": {
|
||||||
"downloads": "Queue",
|
"downloads": "Cua",
|
||||||
"videos": "Vídeos",
|
"videos": "Vídeos",
|
||||||
"channels": "Canals",
|
"channels": "Canals",
|
||||||
"playlists": "Llistes de reproducció"
|
"playlists": "Llistes de reproducció"
|
||||||
},
|
},
|
||||||
"truenas": {
|
"truenas": {
|
||||||
"load": "Càrrega del sistema",
|
"load": "Càrrega del sistema",
|
||||||
"uptime": "Uptime",
|
"uptime": "Temps actiu",
|
||||||
"alerts": "Alerts"
|
"alerts": "Alertes"
|
||||||
},
|
},
|
||||||
"pyload": {
|
"pyload": {
|
||||||
"speed": "Velocitat",
|
"speed": "Velocitat",
|
||||||
"active": "Active",
|
"active": "Actiu",
|
||||||
"queue": "Queue",
|
"queue": "Cua",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"gluetun": {
|
"gluetun": {
|
||||||
"public_ip": "IP Pública",
|
"public_ip": "IP Pública",
|
||||||
"region": "Regió",
|
"region": "Regió",
|
||||||
"country": "País",
|
"country": "País",
|
||||||
"port_forwarded": "Port Forwarded"
|
"port_forwarded": "Ports redirigits"
|
||||||
},
|
},
|
||||||
"hdhomerun": {
|
"hdhomerun": {
|
||||||
"channels": "Channels",
|
"channels": "Canals",
|
||||||
"hd": "HD",
|
"hd": "HD",
|
||||||
"tunerCount": "Sintonitzadors",
|
"tunerCount": "Sintonitzadors",
|
||||||
"channelNumber": "Canal",
|
"channelNumber": "Canal",
|
||||||
"channelNetwork": "Xarxa",
|
"channelNetwork": "Xarxa",
|
||||||
"signalStrength": "Intensitat",
|
"signalStrength": "Intensitat",
|
||||||
"signalQuality": "Qualitat",
|
"signalQuality": "Qualitat",
|
||||||
"symbolQuality": "Quality",
|
"symbolQuality": "Qualitat",
|
||||||
"networkRate": "Bitrate",
|
"networkRate": "Taxa de bits",
|
||||||
"clientIP": "Client"
|
"clientIP": "Client"
|
||||||
},
|
},
|
||||||
"scrutiny": {
|
"scrutiny": {
|
||||||
"passed": "Aprovat",
|
"passed": "Aprovat",
|
||||||
"failed": "Failed",
|
"failed": "Error",
|
||||||
"unknown": "Unknown"
|
"unknown": "Desconegut"
|
||||||
},
|
},
|
||||||
"paperlessngx": {
|
"paperlessngx": {
|
||||||
"inbox": "Safata d'entrada",
|
"inbox": "Safata d'entrada",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"pangolin": {
|
"pangolin": {
|
||||||
"orgs": "Orgs",
|
"orgs": "Organitzacions",
|
||||||
"sites": "Sites",
|
"sites": "Llocs",
|
||||||
"resources": "Resources",
|
"resources": "Recursos",
|
||||||
"targets": "Targets",
|
"targets": "Objectius",
|
||||||
"traffic": "Traffic",
|
"traffic": "Tràfic",
|
||||||
"in": "In",
|
"in": "Dins",
|
||||||
"out": "Out"
|
"out": "Fora"
|
||||||
},
|
},
|
||||||
"peanut": {
|
"peanut": {
|
||||||
"battery_charge": "Càrrega de la bateria",
|
"battery_charge": "Càrrega de la bateria",
|
||||||
"ups_load": "Càrrega del SAI",
|
"ups_load": "Càrrega del SAI",
|
||||||
"ups_status": "Estat del SAI",
|
"ups_status": "Estat del SAI",
|
||||||
"online": "Online",
|
"online": "En línia",
|
||||||
"on_battery": "En Bateria",
|
"on_battery": "En Bateria",
|
||||||
"low_battery": "Bateria Baixa"
|
"low_battery": "Bateria Baixa"
|
||||||
},
|
},
|
||||||
"nextdns": {
|
"nextdns": {
|
||||||
"wait": "Please Wait",
|
"wait": "Espereu si us plau",
|
||||||
"no_devices": "No s'han rebut dades del Dispositiu"
|
"no_devices": "No s'han rebut dades del Dispositiu"
|
||||||
},
|
},
|
||||||
"mikrotik": {
|
"mikrotik": {
|
||||||
@@ -855,37 +857,37 @@
|
|||||||
"jdownloader": {
|
"jdownloader": {
|
||||||
"downloadCount": "Cua",
|
"downloadCount": "Cua",
|
||||||
"downloadBytesRemaining": "Restant",
|
"downloadBytesRemaining": "Restant",
|
||||||
"downloadTotalBytes": "Size",
|
"downloadTotalBytes": "Mida",
|
||||||
"downloadSpeed": "Speed"
|
"downloadSpeed": "Velocitat"
|
||||||
},
|
},
|
||||||
"kavita": {
|
"kavita": {
|
||||||
"seriesCount": "Series",
|
"seriesCount": "Sèries",
|
||||||
"totalFiles": "Files"
|
"totalFiles": "Fitxers"
|
||||||
},
|
},
|
||||||
"azuredevops": {
|
"azuredevops": {
|
||||||
"result": "Resultat",
|
"result": "Resultat",
|
||||||
"status": "Status",
|
"status": "Estat",
|
||||||
"buildId": "Id de compilació",
|
"buildId": "Id de compilació",
|
||||||
"succeeded": "Amb èxit",
|
"succeeded": "Amb èxit",
|
||||||
"notStarted": "No Iniciat",
|
"notStarted": "No Iniciat",
|
||||||
"failed": "Failed",
|
"failed": "Error",
|
||||||
"canceled": "Cancel·lat",
|
"canceled": "Cancel·lat",
|
||||||
"inProgress": "En curs",
|
"inProgress": "En curs",
|
||||||
"totalPrs": "PRs Totals",
|
"totalPrs": "PRs Totals",
|
||||||
"myPrs": "Les meves PRs",
|
"myPrs": "Les meves PRs",
|
||||||
"approved": "Approved"
|
"approved": "Aprovat"
|
||||||
},
|
},
|
||||||
"gamedig": {
|
"gamedig": {
|
||||||
"status": "Status",
|
"status": "Estat",
|
||||||
"online": "Online",
|
"online": "En línia",
|
||||||
"offline": "Offline",
|
"offline": "Desconnectat",
|
||||||
"name": "Nom",
|
"name": "Nom",
|
||||||
"map": "Mapa",
|
"map": "Mapa",
|
||||||
"currentPlayers": "Jugadors actuals",
|
"currentPlayers": "Jugadors actuals",
|
||||||
"players": "Players",
|
"players": "Jugadors",
|
||||||
"maxPlayers": "Màxim de jugadors",
|
"maxPlayers": "Màxim de jugadors",
|
||||||
"bots": "Bots",
|
"bots": "Bots",
|
||||||
"ping": "Ping"
|
"ping": "Latència"
|
||||||
},
|
},
|
||||||
"urbackup": {
|
"urbackup": {
|
||||||
"ok": "Ok",
|
"ok": "Ok",
|
||||||
@@ -895,39 +897,39 @@
|
|||||||
},
|
},
|
||||||
"mealie": {
|
"mealie": {
|
||||||
"recipes": "Receptes",
|
"recipes": "Receptes",
|
||||||
"users": "Users",
|
"users": "Usuaris",
|
||||||
"categories": "Categories",
|
"categories": "Categories",
|
||||||
"tags": "Etiquetes"
|
"tags": "Etiquetes"
|
||||||
},
|
},
|
||||||
"openmediavault": {
|
"openmediavault": {
|
||||||
"downloading": "Descarregant",
|
"downloading": "Descarregant",
|
||||||
"total": "Total",
|
"total": "Total",
|
||||||
"running": "Running",
|
"running": "En execució",
|
||||||
"stopped": "Stopped",
|
"stopped": "Aturat",
|
||||||
"passed": "Passed",
|
"passed": "Aprovat",
|
||||||
"failed": "Failed"
|
"failed": "Error"
|
||||||
},
|
},
|
||||||
"openwrt": {
|
"openwrt": {
|
||||||
"uptime": "Uptime",
|
"uptime": "Temps actiu",
|
||||||
"cpuLoad": "Càrrega mitjana de CPU (5min)",
|
"cpuLoad": "Càrrega mitjana de CPU (5min)",
|
||||||
"up": "Up",
|
"up": "En línia",
|
||||||
"down": "Down",
|
"down": "Desconnectat",
|
||||||
"bytesTx": "Enviat",
|
"bytesTx": "Enviat",
|
||||||
"bytesRx": "Received"
|
"bytesRx": "Rebut"
|
||||||
},
|
},
|
||||||
"uptimerobot": {
|
"uptimerobot": {
|
||||||
"status": "Status",
|
"status": "Estat",
|
||||||
"uptime": "Uptime",
|
"uptime": "Temps actiu",
|
||||||
"lastDown": "Darrera Inactivitat",
|
"lastDown": "Darrera Inactivitat",
|
||||||
"downDuration": "Duració d'Inactivitat",
|
"downDuration": "Duració d'Inactivitat",
|
||||||
"sitesUp": "Sites Up",
|
"sitesUp": "Pàgines actives",
|
||||||
"sitesDown": "Sites Down",
|
"sitesDown": "Pàgines inactives",
|
||||||
"paused": "Paused",
|
"paused": "Pausat",
|
||||||
"notyetchecked": "Sense verificar",
|
"notyetchecked": "Sense verificar",
|
||||||
"up": "Up",
|
"up": "En línia",
|
||||||
"seemsdown": "Sembla caigut",
|
"seemsdown": "Sembla caigut",
|
||||||
"down": "Down",
|
"down": "Desconnectat",
|
||||||
"unknown": "Unknown"
|
"unknown": "Desconegut"
|
||||||
},
|
},
|
||||||
"calendar": {
|
"calendar": {
|
||||||
"inCinemas": "En cines",
|
"inCinemas": "En cines",
|
||||||
@@ -935,7 +937,7 @@
|
|||||||
"digitalRelease": "Estrena digital",
|
"digitalRelease": "Estrena digital",
|
||||||
"noEventsToday": "Cap esdeveniment per avui!",
|
"noEventsToday": "Cap esdeveniment per avui!",
|
||||||
"noEventsFound": "No s'han trobat esdeveniments",
|
"noEventsFound": "No s'han trobat esdeveniments",
|
||||||
"errorWhenLoadingData": "Error when loading calendar data"
|
"errorWhenLoadingData": "Error carregant dades del calendari"
|
||||||
},
|
},
|
||||||
"romm": {
|
"romm": {
|
||||||
"platforms": "Plataformes",
|
"platforms": "Plataformes",
|
||||||
@@ -946,50 +948,50 @@
|
|||||||
"totalfilesize": "Tamany total"
|
"totalfilesize": "Tamany total"
|
||||||
},
|
},
|
||||||
"mailcow": {
|
"mailcow": {
|
||||||
"domains": "Domains",
|
"domains": "Dominis",
|
||||||
"mailboxes": "Bústies",
|
"mailboxes": "Bústies",
|
||||||
"mails": "Correus",
|
"mails": "Correus",
|
||||||
"storage": "Storage"
|
"storage": "Emmagatzematge"
|
||||||
},
|
},
|
||||||
"maintainerr": {
|
"maintainerr": {
|
||||||
"itemsHandled": "Items Handled",
|
"itemsHandled": "Items gestionats",
|
||||||
"episodesHandled": "Episodes Handled",
|
"episodesHandled": "Episodis gestionats",
|
||||||
"moviesHandled": "Movies Handled",
|
"moviesHandled": "Pel·lícules gestionades",
|
||||||
"showsHandled": "Shows Handled",
|
"showsHandled": "Sèries gestionades",
|
||||||
"seasonsHandled": "Seasons Handled",
|
"seasonsHandled": "Temporades gestionades",
|
||||||
"reclaimable": "Reclaimable",
|
"reclaimable": "Reclamable",
|
||||||
"movieReclaimable": "Movie Reclaimable",
|
"movieReclaimable": "Pel·lícula reclamable",
|
||||||
"showReclaimable": "Show Reclaimable",
|
"showReclaimable": "Sèrie reclamable",
|
||||||
"totalCapacity": "Total Capacity"
|
"totalCapacity": "Capacitat total"
|
||||||
},
|
},
|
||||||
"netdata": {
|
"netdata": {
|
||||||
"warnings": "Avisos",
|
"warnings": "Avisos",
|
||||||
"criticals": "Crítics"
|
"criticals": "Crítics"
|
||||||
},
|
},
|
||||||
"ntfy": {
|
"ntfy": {
|
||||||
"title": "Title",
|
"title": "Títol",
|
||||||
"priority": "Priority",
|
"priority": "Prioritat",
|
||||||
"lastReceived": "Last Received",
|
"lastReceived": "Rebut per últim cop",
|
||||||
"message": "Message",
|
"message": "Missatge",
|
||||||
"tags": "Tags",
|
"tags": "Etiquetes",
|
||||||
"none": "None",
|
"none": "Cap",
|
||||||
"min": "Min",
|
"min": "Min",
|
||||||
"low": "Low",
|
"low": "Baix",
|
||||||
"default": "Default",
|
"default": "Per defecte",
|
||||||
"high": "High",
|
"high": "Alt",
|
||||||
"urgent": "Urgent"
|
"urgent": "Urgent"
|
||||||
},
|
},
|
||||||
"plantit": {
|
"plantit": {
|
||||||
"events": "Esdeveniments",
|
"events": "Esdeveniments",
|
||||||
"plants": "Plantes",
|
"plants": "Plantes",
|
||||||
"photos": "Photos",
|
"photos": "Fotos",
|
||||||
"species": "Espècies"
|
"species": "Espècies"
|
||||||
},
|
},
|
||||||
"gitea": {
|
"gitea": {
|
||||||
"notifications": "Notificacions",
|
"notifications": "Notificacions",
|
||||||
"issues": "Issues",
|
"issues": "Problemes",
|
||||||
"pulls": "Sol·licitud de Canvis",
|
"pulls": "Sol·licitud de Canvis",
|
||||||
"repositories": "Repositories"
|
"repositories": "Repositoris"
|
||||||
},
|
},
|
||||||
"stash": {
|
"stash": {
|
||||||
"scenes": "Escenes",
|
"scenes": "Escenes",
|
||||||
@@ -1003,13 +1005,13 @@
|
|||||||
"galleries": "Biblioteques",
|
"galleries": "Biblioteques",
|
||||||
"performers": "Intèrprets",
|
"performers": "Intèrprets",
|
||||||
"studios": "Estudis",
|
"studios": "Estudis",
|
||||||
"movies": "Movies",
|
"movies": "Pel·lícules",
|
||||||
"tags": "Tags",
|
"tags": "Etiquetes",
|
||||||
"oCount": "O Count"
|
"oCount": "O Count"
|
||||||
},
|
},
|
||||||
"tandoor": {
|
"tandoor": {
|
||||||
"users": "Users",
|
"users": "Usuaris",
|
||||||
"recipes": "Recipes",
|
"recipes": "Receptes",
|
||||||
"keywords": "Paraules claus"
|
"keywords": "Paraules claus"
|
||||||
},
|
},
|
||||||
"homebox": {
|
"homebox": {
|
||||||
@@ -1017,17 +1019,17 @@
|
|||||||
"totalWithWarranty": "Amb Garantia",
|
"totalWithWarranty": "Amb Garantia",
|
||||||
"locations": "Ubicacions",
|
"locations": "Ubicacions",
|
||||||
"labels": "Etiquetes",
|
"labels": "Etiquetes",
|
||||||
"users": "Users",
|
"users": "Usuaris",
|
||||||
"totalValue": "Valor total"
|
"totalValue": "Valor total"
|
||||||
},
|
},
|
||||||
"crowdsec": {
|
"crowdsec": {
|
||||||
"alerts": "Alerts",
|
"alerts": "Alertes",
|
||||||
"bans": "Prohibicions"
|
"bans": "Prohibicions"
|
||||||
},
|
},
|
||||||
"wgeasy": {
|
"wgeasy": {
|
||||||
"connected": "Connected",
|
"connected": "Connectat",
|
||||||
"enabled": "Enabled",
|
"enabled": "Habilitat",
|
||||||
"disabled": "Disabled",
|
"disabled": "Deshabilitat",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"swagdashboard": {
|
"swagdashboard": {
|
||||||
@@ -1037,9 +1039,9 @@
|
|||||||
"banned": "Bloquejat"
|
"banned": "Bloquejat"
|
||||||
},
|
},
|
||||||
"myspeed": {
|
"myspeed": {
|
||||||
"ping": "Ping",
|
"ping": "Latència",
|
||||||
"download": "Download",
|
"download": "Baixada",
|
||||||
"upload": "Upload"
|
"upload": "Pujada"
|
||||||
},
|
},
|
||||||
"stocks": {
|
"stocks": {
|
||||||
"stocks": "Accions",
|
"stocks": "Accions",
|
||||||
@@ -1136,120 +1138,120 @@
|
|||||||
"tags": "Etiquetes"
|
"tags": "Etiquetes"
|
||||||
},
|
},
|
||||||
"slskd": {
|
"slskd": {
|
||||||
"slskStatus": "Network",
|
"slskStatus": "Xarxa",
|
||||||
"connected": "Connected",
|
"connected": "Connectat",
|
||||||
"disconnected": "Disconnected",
|
"disconnected": "Desconnectat",
|
||||||
"updateStatus": "Update",
|
"updateStatus": "Actualitza",
|
||||||
"update_yes": "Available",
|
"update_yes": "Disponible",
|
||||||
"update_no": "Up to Date",
|
"update_no": "Actualitzat",
|
||||||
"downloads": "Downloads",
|
"downloads": "Descàrregues",
|
||||||
"uploads": "Uploads",
|
"uploads": "Pujades",
|
||||||
"sharedFiles": "Files"
|
"sharedFiles": "Fitxers"
|
||||||
},
|
},
|
||||||
"jellystat": {
|
"jellystat": {
|
||||||
"songs": "Songs",
|
"songs": "Cançons",
|
||||||
"movies": "Movies",
|
"movies": "Pel·lícules",
|
||||||
"episodes": "Episodes",
|
"episodes": "Episodis",
|
||||||
"other": "Other"
|
"other": "Altres"
|
||||||
},
|
},
|
||||||
"checkmk": {
|
"checkmk": {
|
||||||
"serviceErrors": "Service issues",
|
"serviceErrors": "Errors de servei",
|
||||||
"hostErrors": "Host issues"
|
"hostErrors": "Problemes de l'hoste"
|
||||||
},
|
},
|
||||||
"komodo": {
|
"komodo": {
|
||||||
"total": "Total",
|
"total": "Total",
|
||||||
"running": "Running",
|
"running": "En execució",
|
||||||
"stopped": "Stopped",
|
"stopped": "Aturat",
|
||||||
"down": "Down",
|
"down": "Fora de servei",
|
||||||
"unhealthy": "Unhealthy",
|
"unhealthy": "No saludable",
|
||||||
"unknown": "Unknown",
|
"unknown": "Desconegut",
|
||||||
"servers": "Servers",
|
"servers": "Servidors",
|
||||||
"stacks": "Stacks",
|
"stacks": "Stacks",
|
||||||
"containers": "Containers"
|
"containers": "Contenidors"
|
||||||
},
|
},
|
||||||
"filebrowser": {
|
"filebrowser": {
|
||||||
"available": "Available",
|
"available": "Disponible",
|
||||||
"used": "Used",
|
"used": "Utilitzat",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
},
|
},
|
||||||
"wallos": {
|
"wallos": {
|
||||||
"activeSubscriptions": "Subscriptions",
|
"activeSubscriptions": "Subscripcions",
|
||||||
"thisMonthlyCost": "This Month",
|
"thisMonthlyCost": "Aquest mes",
|
||||||
"nextMonthlyCost": "Next Month",
|
"nextMonthlyCost": "Mes que ve",
|
||||||
"previousMonthlyCost": "Prev. Month",
|
"previousMonthlyCost": "Mes passat",
|
||||||
"nextRenewingSubscription": "Next Payment"
|
"nextRenewingSubscription": "Proper pagament"
|
||||||
},
|
},
|
||||||
"unraid": {
|
"unraid": {
|
||||||
"STARTED": "Started",
|
"STARTED": "Iniciat",
|
||||||
"STOPPED": "Stopped",
|
"STOPPED": "Aturat",
|
||||||
"NEW_ARRAY": "New Array",
|
"NEW_ARRAY": "Nou array",
|
||||||
"RECON_DISK": "Reconstructing Disk",
|
"RECON_DISK": "Reconstruint disc",
|
||||||
"DISABLE_DISK": "Disk Disabled",
|
"DISABLE_DISK": "Disc desactivat",
|
||||||
"SWAP_DSBL": "Swap Disable",
|
"SWAP_DSBL": "Swap desactivat",
|
||||||
"INVALID_EXPANSION": "Invalid Expansion",
|
"INVALID_EXPANSION": "Expansió invàlida",
|
||||||
"PARITY_NOT_BIGGEST": "Parity Not Biggest",
|
"PARITY_NOT_BIGGEST": "Paritat no del més gran",
|
||||||
"TOO_MANY_MISSING_DISKS": "Too Many Missing Disks",
|
"TOO_MANY_MISSING_DISKS": "Falten masses discs",
|
||||||
"NEW_DISK_TOO_SMALL": "New Disk Too Small",
|
"NEW_DISK_TOO_SMALL": "Nou disc massa petit",
|
||||||
"NO_DATA_DISKS": "No Data Disks",
|
"NO_DATA_DISKS": "Sense discs de dades",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notificacions",
|
||||||
"status": "Status",
|
"status": "Estat",
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
"memoryUsed": "Memory Used",
|
"memoryUsed": "Memòria emprada",
|
||||||
"memoryAvailable": "Memory Available",
|
"memoryAvailable": "Memòria disponible",
|
||||||
"arrayUsed": "Array Used",
|
"arrayUsed": "Array en ús",
|
||||||
"arrayFree": "Array Free",
|
"arrayFree": "Array lliure",
|
||||||
"poolUsed": "{{pool}} Used",
|
"poolUsed": "{{pool}} en ús",
|
||||||
"poolFree": "{{pool}} Free"
|
"poolFree": "{{pool}} lliure"
|
||||||
},
|
},
|
||||||
"backrest": {
|
"backrest": {
|
||||||
"num_plans": "Plans",
|
"num_plans": "Plans",
|
||||||
"num_success_30": "Successes",
|
"num_success_30": "Èxits",
|
||||||
"num_failure_30": "Failures",
|
"num_failure_30": "Fallades",
|
||||||
"num_success_latest": "Succeeding",
|
"num_success_latest": "Triomfant",
|
||||||
"num_failure_latest": "Failing",
|
"num_failure_latest": "Fallant",
|
||||||
"bytes_added_30": "Bytes Added"
|
"bytes_added_30": "Bytes afegits"
|
||||||
},
|
},
|
||||||
"yourspotify": {
|
"yourspotify": {
|
||||||
"songs": "Songs",
|
"songs": "Cançons",
|
||||||
"time": "Time",
|
"time": "Temps",
|
||||||
"artists": "Artists"
|
"artists": "Artistes"
|
||||||
},
|
},
|
||||||
"arcane": {
|
"arcane": {
|
||||||
"containers": "Containers",
|
"containers": "Contenidors",
|
||||||
"images": "Images",
|
"images": "Imatges",
|
||||||
"image_updates": "Image Updates",
|
"image_updates": "Actualitzacions d'imatges",
|
||||||
"images_unused": "Unused",
|
"images_unused": "Sense utilitzar",
|
||||||
"environment_required": "Environment ID Required"
|
"environment_required": "ID d'entorn requerit"
|
||||||
},
|
},
|
||||||
"dockhand": {
|
"dockhand": {
|
||||||
"running": "Running",
|
"running": "En execució",
|
||||||
"stopped": "Stopped",
|
"stopped": "Aturats",
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
"memory": "Memory",
|
"memory": "Memòria",
|
||||||
"images": "Images",
|
"images": "Imatges",
|
||||||
"volumes": "Volumes",
|
"volumes": "Volums",
|
||||||
"events_today": "Events Today",
|
"events_today": "Esdeveniments avui",
|
||||||
"pending_updates": "Pending Updates",
|
"pending_updates": "Actualitzacions pendents",
|
||||||
"stacks": "Stacks",
|
"stacks": "Stacks",
|
||||||
"paused": "Paused",
|
"paused": "Pausats",
|
||||||
"total": "Total",
|
"total": "Total",
|
||||||
"environment_not_found": "Environment Not Found"
|
"environment_not_found": "Entorn no trobat"
|
||||||
},
|
},
|
||||||
"sparkyfitness": {
|
"sparkyfitness": {
|
||||||
"eaten": "Eaten",
|
"eaten": "Menjat",
|
||||||
"burned": "Burned",
|
"burned": "Cremat",
|
||||||
"remaining": "Remaining",
|
"remaining": "Restant",
|
||||||
"steps": "Steps"
|
"steps": "Passes"
|
||||||
},
|
},
|
||||||
"syncthing": {
|
"syncthing": {
|
||||||
"connected": "Connected",
|
"connected": "Connectat",
|
||||||
"synced": "Synced",
|
"synced": "Sincronitzat",
|
||||||
"errors": "Errors",
|
"errors": "Errors",
|
||||||
"storage": "Storage"
|
"storage": "Emmagatzematge"
|
||||||
},
|
},
|
||||||
"sportarr": {
|
"sportarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Volgut",
|
||||||
"queued": "Queued",
|
"queued": "Encuat",
|
||||||
"leagues": "Leagues"
|
"leagues": "Lligues"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Počkejte prosím"
|
"wait": "Počkejte prosím"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Hledat…"
|
"placeholder": "Hledat…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Využití procesoru",
|
"cpu": "Využití procesoru",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Vent venligst"
|
"wait": "Vent venligst"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Søg…"
|
"placeholder": "Søg…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Bitte warten"
|
"wait": "Bitte warten"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Suche…"
|
"placeholder": "Suche…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Παρακαλώ περιμένετε"
|
"wait": "Παρακαλώ περιμένετε"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Αναζήτηση…"
|
"placeholder": "Αναζήτηση…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Επεξεργαστής",
|
"cpu": "Επεξεργαστής",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Please wait"
|
"wait": "Please wait"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Search…"
|
"placeholder": "Search…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Bonvolu atendi"
|
"wait": "Bonvolu atendi"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Serĉi…"
|
"placeholder": "Serĉi…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Ĉefprocesoro",
|
"cpu": "Ĉefprocesoro",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Espera, por favor"
|
"wait": "Espera, por favor"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Buscar…"
|
"placeholder": "Buscar…",
|
||||||
|
"provider": "Motor de búsqueda: {{name}}",
|
||||||
|
"select_provider": "Seleccionar motores de búsqueda"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Itxaron mesedez"
|
"wait": "Itxaron mesedez"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Bilatu…"
|
"placeholder": "Bilatu…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Odota, ole hyvä"
|
"wait": "Odota, ole hyvä"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Hae…"
|
"placeholder": "Hae…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Veuillez patienter"
|
"wait": "Veuillez patienter"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Recherche…"
|
"placeholder": "Recherche…",
|
||||||
|
"provider": "Moteur de recherche : {{name}}",
|
||||||
|
"select_provider": "Sélectionnez un moteur de recherche"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "המתן בבקשה"
|
"wait": "המתן בבקשה"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "חיפוש…"
|
"placeholder": "חיפוש…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "מעבד",
|
"cpu": "מעבד",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Please wait"
|
"wait": "Please wait"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Search…"
|
"placeholder": "Search…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"seconds": "s"
|
"seconds": "s"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"signout": "Sign out"
|
"signout": "Odjavi se"
|
||||||
},
|
},
|
||||||
"widget": {
|
"widget": {
|
||||||
"missing_type": "Nedostajuća vrsta widgeta: {{type}}",
|
"missing_type": "Nedostajuća vrsta widgeta: {{type}}",
|
||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Pričekaj"
|
"wait": "Pričekaj"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Traži …"
|
"placeholder": "Traži …",
|
||||||
|
"provider": "Tražilica: {{name}}",
|
||||||
|
"select_provider": "Odaberi tražilicu"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
@@ -133,7 +135,7 @@
|
|||||||
"series": "Serije",
|
"series": "Serije",
|
||||||
"episodes": "Epizode",
|
"episodes": "Epizode",
|
||||||
"songs": "Pjesme",
|
"songs": "Pjesme",
|
||||||
"albums": "Albums"
|
"albums": "Albumi"
|
||||||
},
|
},
|
||||||
"esphome": {
|
"esphome": {
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
@@ -472,7 +474,7 @@
|
|||||||
"users": "Korisnici",
|
"users": "Korisnici",
|
||||||
"loginsLast24H": "Prijave (24 h)",
|
"loginsLast24H": "Prijave (24 h)",
|
||||||
"failedLoginsLast24H": "Neuspjele prijave (24 h)",
|
"failedLoginsLast24H": "Neuspjele prijave (24 h)",
|
||||||
"authorizationsLast24H": "Auths (24h)"
|
"authorizationsLast24H": "Autorizacije (24h)"
|
||||||
},
|
},
|
||||||
"proxmox": {
|
"proxmox": {
|
||||||
"mem": "MEM",
|
"mem": "MEM",
|
||||||
@@ -952,15 +954,15 @@
|
|||||||
"storage": "Spremište"
|
"storage": "Spremište"
|
||||||
},
|
},
|
||||||
"maintainerr": {
|
"maintainerr": {
|
||||||
"itemsHandled": "Items Handled",
|
"itemsHandled": "Obrađene stavke",
|
||||||
"episodesHandled": "Episodes Handled",
|
"episodesHandled": "Obrađene epizode",
|
||||||
"moviesHandled": "Movies Handled",
|
"moviesHandled": "Obrađeni filmovi",
|
||||||
"showsHandled": "Shows Handled",
|
"showsHandled": "Obrađene emisije",
|
||||||
"seasonsHandled": "Seasons Handled",
|
"seasonsHandled": "Obrađene sezone",
|
||||||
"reclaimable": "Reclaimable",
|
"reclaimable": "Reclaimable",
|
||||||
"movieReclaimable": "Movie Reclaimable",
|
"movieReclaimable": "Movie Reclaimable",
|
||||||
"showReclaimable": "Show Reclaimable",
|
"showReclaimable": "Show Reclaimable",
|
||||||
"totalCapacity": "Total Capacity"
|
"totalCapacity": "Ukupni kapacitet"
|
||||||
},
|
},
|
||||||
"netdata": {
|
"netdata": {
|
||||||
"warnings": "Upozorenja",
|
"warnings": "Upozorenja",
|
||||||
@@ -1248,8 +1250,8 @@
|
|||||||
"storage": "Spremište"
|
"storage": "Spremište"
|
||||||
},
|
},
|
||||||
"sportarr": {
|
"sportarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Željeno",
|
||||||
"queued": "Queued",
|
"queued": "U redu čekanja",
|
||||||
"leagues": "Leagues"
|
"leagues": "Lige"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Kérjük várjon"
|
"wait": "Kérjük várjon"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Keresés…"
|
"placeholder": "Keresés…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Processzor",
|
"cpu": "Processzor",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Harap tunggu"
|
"wait": "Harap tunggu"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Telusuri…"
|
"placeholder": "Telusuri…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Attendi per favore"
|
"wait": "Attendi per favore"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Cerca…"
|
"placeholder": "Cerca…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "お待ちください"
|
"wait": "お待ちください"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "検索…"
|
"placeholder": "検索…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "잠시만 기다리세요"
|
"wait": "잠시만 기다리세요"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "검색…"
|
"placeholder": "검색…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
@@ -472,7 +474,7 @@
|
|||||||
"users": "사용자",
|
"users": "사용자",
|
||||||
"loginsLast24H": "로그인 (24시간)",
|
"loginsLast24H": "로그인 (24시간)",
|
||||||
"failedLoginsLast24H": "실패한 로그인 (24시간)",
|
"failedLoginsLast24H": "실패한 로그인 (24시간)",
|
||||||
"authorizationsLast24H": "Auths (24h)"
|
"authorizationsLast24H": "인증(24시간)"
|
||||||
},
|
},
|
||||||
"proxmox": {
|
"proxmox": {
|
||||||
"mem": "메모리",
|
"mem": "메모리",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Lūdzu, uzgaidiet"
|
"wait": "Lūdzu, uzgaidiet"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Meklēt…"
|
"placeholder": "Meklēt…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Sila tunggu"
|
"wait": "Sila tunggu"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Carian…"
|
"placeholder": "Carian…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Even geduld"
|
"wait": "Even geduld"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Zoeken…"
|
"placeholder": "Zoeken…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Vennligst vent"
|
"wait": "Vennligst vent"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Søk…"
|
"placeholder": "Søk…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Proszę czekać"
|
"wait": "Proszę czekać"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Szukaj…"
|
"placeholder": "Szukaj…",
|
||||||
|
"provider": "Wyszukiwarka: {{name}}",
|
||||||
|
"select_provider": "Wybierz wyszukiwarkę"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Procesor",
|
"cpu": "Procesor",
|
||||||
@@ -472,7 +474,7 @@
|
|||||||
"users": "Użytkownicy",
|
"users": "Użytkownicy",
|
||||||
"loginsLast24H": "Logowania (24h)",
|
"loginsLast24H": "Logowania (24h)",
|
||||||
"failedLoginsLast24H": "Nieudane logowania (24h)",
|
"failedLoginsLast24H": "Nieudane logowania (24h)",
|
||||||
"authorizationsLast24H": "Auths (24h)"
|
"authorizationsLast24H": "Uwierzytelnienia (24h)"
|
||||||
},
|
},
|
||||||
"proxmox": {
|
"proxmox": {
|
||||||
"mem": "RAM",
|
"mem": "RAM",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Por favor aguarde"
|
"wait": "Por favor aguarde"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Pesquisar…"
|
"placeholder": "Pesquisar…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Por favor, aguarde"
|
"wait": "Por favor, aguarde"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Pesquisar…"
|
"placeholder": "Pesquisar…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Va rugăm așteptați"
|
"wait": "Va rugăm așteptați"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Caută…"
|
"placeholder": "Caută…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Procesor",
|
"cpu": "Procesor",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Пожалуйста, подождите"
|
"wait": "Пожалуйста, подождите"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Поиск…"
|
"placeholder": "Поиск…",
|
||||||
|
"provider": "Поисковая система: {{name}}",
|
||||||
|
"select_provider": "Выберите поисковую систему"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "ЦП",
|
"cpu": "ЦП",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Počkajte prosím"
|
"wait": "Počkajte prosím"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Hľadať…"
|
"placeholder": "Hľadať…",
|
||||||
|
"provider": "Vyhľadávač: {{name}}",
|
||||||
|
"select_provider": "Vyberte vyhľadávač"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Prosimo počakajte"
|
"wait": "Prosimo počakajte"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Iskanje…"
|
"placeholder": "Iskanje…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Молим сачекајте"
|
"wait": "Молим сачекајте"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Претражи…"
|
"placeholder": "Претражи…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "Процесор",
|
"cpu": "Процесор",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Vänligen vänta"
|
"wait": "Vänligen vänta"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Sök…"
|
"placeholder": "Sök…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "దయచేసి వేచి ఉండండి"
|
"wait": "దయచేసి వేచి ఉండండి"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "వెతకండి…"
|
"placeholder": "వెతకండి…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "సీపియూ",
|
"cpu": "సీపియూ",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "โปรดรอ"
|
"wait": "โปรดรอ"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "ค้นหา…"
|
"placeholder": "ค้นหา…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "ซีพียู",
|
"cpu": "ซีพียู",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Lütfen bekleyin"
|
"wait": "Lütfen bekleyin"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Ara…"
|
"placeholder": "Ara…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "İşlemci",
|
"cpu": "İşlemci",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Будь ласка, зачекайте"
|
"wait": "Будь ласка, зачекайте"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Пошук…"
|
"placeholder": "Пошук…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "ЦП",
|
"cpu": "ЦП",
|
||||||
|
|||||||
+202
-200
@@ -21,7 +21,7 @@
|
|||||||
"seconds": "giây"
|
"seconds": "giây"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"signout": "Sign out"
|
"signout": "Đăng xuất"
|
||||||
},
|
},
|
||||||
"widget": {
|
"widget": {
|
||||||
"missing_type": "Thiếu loại Widget: {{type}}",
|
"missing_type": "Thiếu loại Widget: {{type}}",
|
||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "Vui lòng chờ"
|
"wait": "Vui lòng chờ"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "Tìm kiếm…"
|
"placeholder": "Tìm kiếm…",
|
||||||
|
"provider": "Công cụ tìm kiếm: {{name}}",
|
||||||
|
"select_provider": "Chọn công cụ tìm kiếm"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
@@ -48,7 +50,7 @@
|
|||||||
"free": "Dư",
|
"free": "Dư",
|
||||||
"used": "Đã dùng",
|
"used": "Đã dùng",
|
||||||
"load": "\n",
|
"load": "\n",
|
||||||
"temp": "TEMP",
|
"temp": "Tạm thời",
|
||||||
"max": "Tối đa",
|
"max": "Tối đa",
|
||||||
"uptime": "UP"
|
"uptime": "UP"
|
||||||
},
|
},
|
||||||
@@ -64,24 +66,24 @@
|
|||||||
"wlan_devices": "Thiết bị trong mạng WLAN",
|
"wlan_devices": "Thiết bị trong mạng WLAN",
|
||||||
"lan_users": "Người dùng mạng LAN",
|
"lan_users": "Người dùng mạng LAN",
|
||||||
"wlan_users": "Người dùng mạng WLAN",
|
"wlan_users": "Người dùng mạng WLAN",
|
||||||
"up": "UP",
|
"up": "Hoạt động",
|
||||||
"down": "DOWN",
|
"down": "Không hoạt động",
|
||||||
"wait": "Vui lòng chờ",
|
"wait": "Vui lòng chờ",
|
||||||
"empty_data": "Trạng thái hệ thống phụ không xác định"
|
"empty_data": "Trạng thái hệ thống phụ không xác định"
|
||||||
},
|
},
|
||||||
"unifi_drive": {
|
"unifi_drive": {
|
||||||
"healthy": "Healthy",
|
"healthy": "Bình thường",
|
||||||
"degraded": "Degraded",
|
"degraded": "Suy giảm",
|
||||||
"no_data": "No storage data available"
|
"no_data": "Không có dữ liệu"
|
||||||
},
|
},
|
||||||
"duplicati": {
|
"duplicati": {
|
||||||
"jobs": "Jobs",
|
"jobs": "Tác vụ",
|
||||||
"stored": "Stored",
|
"stored": "Đã lưu",
|
||||||
"lastBackup": "Last Run",
|
"lastBackup": "Lần chạy cuối",
|
||||||
"nextRun": "Next Run",
|
"nextRun": "Lần chạy tiếp theo",
|
||||||
"running": "Running",
|
"running": "Đang chạy",
|
||||||
"warnings": "Warnings",
|
"warnings": "Cảnh báo",
|
||||||
"errors": "Errors"
|
"errors": "Lỗi"
|
||||||
},
|
},
|
||||||
"docker": {
|
"docker": {
|
||||||
"rx": "RX",
|
"rx": "RX",
|
||||||
@@ -96,8 +98,8 @@
|
|||||||
"starting": "Đang bắt đầu",
|
"starting": "Đang bắt đầu",
|
||||||
"unhealthy": "Bất thường",
|
"unhealthy": "Bất thường",
|
||||||
"not_found": "Không tìm thấy",
|
"not_found": "Không tìm thấy",
|
||||||
"exited": "Exited",
|
"exited": "Đã thoát",
|
||||||
"partial": "Partial"
|
"partial": "Một phần"
|
||||||
},
|
},
|
||||||
"ping": {
|
"ping": {
|
||||||
"error": "Lỗi",
|
"error": "Lỗi",
|
||||||
@@ -118,35 +120,35 @@
|
|||||||
"playing": "Đang chơi",
|
"playing": "Đang chơi",
|
||||||
"transcoding": "Chuyển định dạng",
|
"transcoding": "Chuyển định dạng",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Bitrate",
|
||||||
"no_active": "No Active Streams",
|
"no_active": "Không có luồng đang hoạt động",
|
||||||
"movies": "Phim ảnh",
|
"movies": "Phim ảnh",
|
||||||
"series": "Series",
|
"series": "Series",
|
||||||
"episodes": "Episodes",
|
"episodes": "Tập",
|
||||||
"songs": "Bài hát"
|
"songs": "Bài hát"
|
||||||
},
|
},
|
||||||
"jellyfin": {
|
"jellyfin": {
|
||||||
"playing": "Playing",
|
"playing": "Đang phát",
|
||||||
"transcoding": "Transcoding",
|
"transcoding": "Đang chuyển mã",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Tốc độ bit",
|
||||||
"no_active": "No Active Streams",
|
"no_active": "Không có luồng đang hoạt động",
|
||||||
"movies": "Movies",
|
"movies": "Phim",
|
||||||
"series": "Series",
|
"series": "Series",
|
||||||
"episodes": "Episodes",
|
"episodes": "Tập",
|
||||||
"songs": "Songs",
|
"songs": "Bài hát",
|
||||||
"albums": "Albums"
|
"albums": "Album"
|
||||||
},
|
},
|
||||||
"esphome": {
|
"esphome": {
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"offline_alt": "Offline",
|
"offline_alt": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"total": "Total",
|
"total": "Tổng cộng",
|
||||||
"unknown": "Không xác định"
|
"unknown": "Không xác định"
|
||||||
},
|
},
|
||||||
"evcc": {
|
"evcc": {
|
||||||
"pv_power": "Production",
|
"pv_power": "Công suất phát",
|
||||||
"battery_soc": "Pin",
|
"battery_soc": "Pin",
|
||||||
"grid_power": "Lưới",
|
"grid_power": "Lưới",
|
||||||
"home_power": "Consumption",
|
"home_power": "Công suất tiêu thụ",
|
||||||
"charge_power": "Bộ sạc",
|
"charge_power": "Bộ sạc",
|
||||||
"kilowatt": "kW"
|
"kilowatt": "kW"
|
||||||
},
|
},
|
||||||
@@ -154,7 +156,7 @@
|
|||||||
"download": "Tải xuống",
|
"download": "Tải xuống",
|
||||||
"upload": "Tải lên",
|
"upload": "Tải lên",
|
||||||
"leech": "",
|
"leech": "",
|
||||||
"seed": "Seed"
|
"seed": "Seeder"
|
||||||
},
|
},
|
||||||
"freshrss": {
|
"freshrss": {
|
||||||
"subscriptions": "Đăng ký",
|
"subscriptions": "Đăng ký",
|
||||||
@@ -173,115 +175,115 @@
|
|||||||
"maxDown": "Tải xuống tối đa",
|
"maxDown": "Tải xuống tối đa",
|
||||||
"maxUp": "Tải lên tối đa",
|
"maxUp": "Tải lên tối đa",
|
||||||
"down": "Down",
|
"down": "Down",
|
||||||
"up": "Up",
|
"up": "Tải lên",
|
||||||
"received": "Received",
|
"received": "Đã nhận",
|
||||||
"sent": "Sent",
|
"sent": "Đã gửi",
|
||||||
"externalIPAddress": "Ext. IP",
|
"externalIPAddress": "Địa chỉ IP bên ngoài",
|
||||||
"externalIPv6Address": "Ext. IPv6",
|
"externalIPv6Address": "Địa chỉ IPv6 bên ngoài",
|
||||||
"externalIPv6Prefix": "Ext. IPv6-Prefix"
|
"externalIPv6Prefix": "Tiền tố IPv6 bên ngoài"
|
||||||
},
|
},
|
||||||
"caddy": {
|
"caddy": {
|
||||||
"upstreams": "Upstreams",
|
"upstreams": "Máy chủ backend",
|
||||||
"requests": "Current requests",
|
"requests": "Yêu cầu hiện tại",
|
||||||
"requests_failed": "Failed requests"
|
"requests_failed": "Yêu cầu thất bại"
|
||||||
},
|
},
|
||||||
"changedetectionio": {
|
"changedetectionio": {
|
||||||
"totalObserved": "Total Observed",
|
"totalObserved": "Tổng số đã theo dõi",
|
||||||
"diffsDetected": "Diffs Detected"
|
"diffsDetected": "Số thay đổi đã phát hiện"
|
||||||
},
|
},
|
||||||
"channelsdvrserver": {
|
"channelsdvrserver": {
|
||||||
"shows": "Shows",
|
"shows": "Chương trình",
|
||||||
"recordings": "Recordings",
|
"recordings": "Bản ghi",
|
||||||
"scheduled": "Scheduled",
|
"scheduled": "Đã lên lịch",
|
||||||
"passes": "Passes"
|
"passes": "Quy tắc ghi"
|
||||||
},
|
},
|
||||||
"tautulli": {
|
"tautulli": {
|
||||||
"playing": "Playing",
|
"playing": "Đang phát",
|
||||||
"transcoding": "Transcoding",
|
"transcoding": "Đang chuyển mã",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Tốc độ bit",
|
||||||
"no_active": "No Active Streams",
|
"no_active": "Không có luồng đang hoạt động",
|
||||||
"plex_connection_error": "Check Plex Connection"
|
"plex_connection_error": "Kiểm tra kết nối Plex"
|
||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"no_active": "No Active Streams",
|
"no_active": "Không có luồng đang hoạt động",
|
||||||
"streams": "Streams",
|
"streams": "Luồng",
|
||||||
"transcodes": "Transcodes",
|
"transcodes": "Luồng chuyển mã",
|
||||||
"directplay": "Direct Play",
|
"directplay": "Phát trực tiếp",
|
||||||
"bitrate": "Bitrate"
|
"bitrate": "Tốc độ bit"
|
||||||
},
|
},
|
||||||
"omada": {
|
"omada": {
|
||||||
"connectedAp": "Connected APs",
|
"connectedAp": "AP đã kết nối",
|
||||||
"activeUser": "Active devices",
|
"activeUser": "Thiết bị đang hoạt động",
|
||||||
"alerts": "Alerts",
|
"alerts": "Cảnh báo",
|
||||||
"connectedGateways": "Connected gateways",
|
"connectedGateways": "Gateway đã kết nối",
|
||||||
"connectedSwitches": "Connected switches"
|
"connectedSwitches": "Switch đã kết nối"
|
||||||
},
|
},
|
||||||
"nzbget": {
|
"nzbget": {
|
||||||
"rate": "Rate",
|
"rate": "Tốc độ",
|
||||||
"remaining": "Remaining",
|
"remaining": "Còn lại",
|
||||||
"downloaded": "Đã tải"
|
"downloaded": "Đã tải"
|
||||||
},
|
},
|
||||||
"plex": {
|
"plex": {
|
||||||
"streams": "Active Streams",
|
"streams": "Luồng đang hoạt động",
|
||||||
"albums": "Albums",
|
"albums": "Album",
|
||||||
"movies": "Movies",
|
"movies": "Phim",
|
||||||
"tv": "TV Shows"
|
"tv": "Chương trình TV"
|
||||||
},
|
},
|
||||||
"sabnzbd": {
|
"sabnzbd": {
|
||||||
"rate": "Rate",
|
"rate": "Tốc độ",
|
||||||
"queue": "Hàng chờ",
|
"queue": "Hàng chờ",
|
||||||
"timeleft": "Thời gian còn lại"
|
"timeleft": "Thời gian còn lại"
|
||||||
},
|
},
|
||||||
"rutorrent": {
|
"rutorrent": {
|
||||||
"active": "Hoạt động",
|
"active": "Hoạt động",
|
||||||
"upload": "Upload",
|
"upload": "Tải lên",
|
||||||
"download": "Download"
|
"download": "Tải xuống"
|
||||||
},
|
},
|
||||||
"transmission": {
|
"transmission": {
|
||||||
"download": "Download",
|
"download": "Tải xuống",
|
||||||
"upload": "Upload",
|
"upload": "Tải lên",
|
||||||
"leech": "Leech",
|
"leech": "Leecher",
|
||||||
"seed": "Seed"
|
"seed": "Seeder"
|
||||||
},
|
},
|
||||||
"qbittorrent": {
|
"qbittorrent": {
|
||||||
"download": "Download",
|
"download": "Tải xuống",
|
||||||
"upload": "Upload",
|
"upload": "Tải lên",
|
||||||
"leech": "Leech",
|
"leech": "Leecher",
|
||||||
"seed": "Seed"
|
"seed": "Seeder"
|
||||||
},
|
},
|
||||||
"qnap": {
|
"qnap": {
|
||||||
"cpuUsage": "CPU Usage",
|
"cpuUsage": "Mức sử dụng CPU",
|
||||||
"memUsage": "MEM Usage",
|
"memUsage": "Mức sử dụng bộ nhớ",
|
||||||
"systemTempC": "System Temp",
|
"systemTempC": "Nhiệt độ hệ thống",
|
||||||
"poolUsage": "Pool Usage",
|
"poolUsage": "Mức sử dụng pool",
|
||||||
"volumeUsage": "Volume Usage",
|
"volumeUsage": "Mức sử dụng volume",
|
||||||
"invalid": "Invalid"
|
"invalid": "Không hợp lệ"
|
||||||
},
|
},
|
||||||
"deluge": {
|
"deluge": {
|
||||||
"download": "Download",
|
"download": "Tải xuống",
|
||||||
"upload": "Upload",
|
"upload": "Tải lên",
|
||||||
"leech": "Leech",
|
"leech": "Leecher",
|
||||||
"seed": "Seed"
|
"seed": "Seeder"
|
||||||
},
|
},
|
||||||
"develancacheui": {
|
"develancacheui": {
|
||||||
"cachehitbytes": "Cache Hit Bytes",
|
"cachehitbytes": "Dung lượng cache hit",
|
||||||
"cachemissbytes": "Cache Miss Bytes"
|
"cachemissbytes": "Dung lượng cache miss"
|
||||||
},
|
},
|
||||||
"downloadstation": {
|
"downloadstation": {
|
||||||
"download": "Download",
|
"download": "Tải xuống",
|
||||||
"upload": "Upload",
|
"upload": "Tải lên",
|
||||||
"leech": "Leech",
|
"leech": "Leecher",
|
||||||
"seed": "Seed"
|
"seed": "Seeder"
|
||||||
},
|
},
|
||||||
"sonarr": {
|
"sonarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Cần tải",
|
||||||
"queued": "Queued",
|
"queued": "Queued",
|
||||||
"series": "Series",
|
"series": "Phim bộ",
|
||||||
"queue": "Queue",
|
"queue": "Queue",
|
||||||
"unknown": "Unknown"
|
"unknown": "Unknown"
|
||||||
},
|
},
|
||||||
"radarr": {
|
"radarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Cần tải",
|
||||||
"missing": "Missing",
|
"missing": "Missing",
|
||||||
"queued": "Queued",
|
"queued": "Queued",
|
||||||
"movies": "Movies",
|
"movies": "Movies",
|
||||||
@@ -289,12 +291,12 @@
|
|||||||
"unknown": "Unknown"
|
"unknown": "Unknown"
|
||||||
},
|
},
|
||||||
"lidarr": {
|
"lidarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Cần tải",
|
||||||
"queued": "Queued",
|
"queued": "Queued",
|
||||||
"artists": "Artists"
|
"artists": "Artists"
|
||||||
},
|
},
|
||||||
"readarr": {
|
"readarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Cần tải",
|
||||||
"queued": "Queued",
|
"queued": "Queued",
|
||||||
"books": "Sách"
|
"books": "Sách"
|
||||||
},
|
},
|
||||||
@@ -334,66 +336,66 @@
|
|||||||
"latency": "Latency"
|
"latency": "Latency"
|
||||||
},
|
},
|
||||||
"speedtest": {
|
"speedtest": {
|
||||||
"upload": "Upload",
|
"upload": "Tải lên",
|
||||||
"download": "Download",
|
"download": "Tải xuống",
|
||||||
"ping": "Ping"
|
"ping": "Ping"
|
||||||
},
|
},
|
||||||
"portainer": {
|
"portainer": {
|
||||||
"running": "Running",
|
"running": "Đang chạy",
|
||||||
"stopped": "Stopped",
|
"stopped": "Đã dừng",
|
||||||
"total": "Total"
|
"total": "Tổng cộng"
|
||||||
},
|
},
|
||||||
"suwayomi": {
|
"suwayomi": {
|
||||||
"download": "Downloaded",
|
"download": "Đã tải xuống",
|
||||||
"nondownload": "Non-Downloaded",
|
"nondownload": "Chưa tải xuống",
|
||||||
"read": "Read",
|
"read": "Đã đọc",
|
||||||
"unread": "Unread",
|
"unread": "Chưa đọc",
|
||||||
"downloadedread": "Downloaded & Read",
|
"downloadedread": "Đã tải xuống & Đã đọc",
|
||||||
"downloadedunread": "Downloaded & Unread",
|
"downloadedunread": "Đã tải xuống & Chưa đọc",
|
||||||
"nondownloadedread": "Non-Downloaded & Read",
|
"nondownloadedread": "Chưa tải xuống & Đã đọc",
|
||||||
"nondownloadedunread": "Non-Downloaded & Unread"
|
"nondownloadedunread": "Chưa tải xuống & Chưa đọc"
|
||||||
},
|
},
|
||||||
"tailscale": {
|
"tailscale": {
|
||||||
"address": "Address",
|
"address": "Địa chỉ",
|
||||||
"expires": "Expires",
|
"expires": "Hết hạn",
|
||||||
"never": "Never",
|
"never": "Không bao giờ",
|
||||||
"user": "User",
|
"user": "Người dùng",
|
||||||
"hostname": "Hostname",
|
"hostname": "Tên máy chủ",
|
||||||
"name": "Name",
|
"name": "Tên",
|
||||||
"client_version": "Client Version",
|
"client_version": "Phiên bản máy khách",
|
||||||
"os": "OS",
|
"os": "Hệ điều hành",
|
||||||
"created": "Created",
|
"created": "Đã tạo",
|
||||||
"authorized": "Authorized",
|
"authorized": "Đã cấp quyền",
|
||||||
"is_external": "Is External",
|
"is_external": "Là bên ngoài",
|
||||||
"update_available": "Update Available",
|
"update_available": "Có bản cập nhật",
|
||||||
"tags": "Tags",
|
"tags": "Thẻ",
|
||||||
"last_seen": "Last Seen",
|
"last_seen": "Lần cuối nhìn thấy",
|
||||||
"now": "Now",
|
"now": "Bây giờ",
|
||||||
"years": "{{number}}y",
|
"years": "{{number}} năm",
|
||||||
"weeks": "{{number}}w",
|
"weeks": "{{number}} tuần",
|
||||||
"days": "{{number}}d",
|
"days": "{{number}} ngày",
|
||||||
"hours": "{{number}}h",
|
"hours": "{{number}} giờ",
|
||||||
"minutes": "{{number}}m",
|
"minutes": "{{number}} phút",
|
||||||
"seconds": "{{number}}s",
|
"seconds": "{{number}} giây",
|
||||||
"ago": "{{value}} Ago",
|
"ago": "{{value}} trước",
|
||||||
"true": "Yes",
|
"true": "Có",
|
||||||
"false": "No"
|
"false": "Không"
|
||||||
},
|
},
|
||||||
"technitium": {
|
"technitium": {
|
||||||
"totalQueries": "Queries",
|
"totalQueries": "Tổng số truy vấn",
|
||||||
"totalNoError": "Success",
|
"totalNoError": "Thành công",
|
||||||
"totalServerFailure": "Failures",
|
"totalServerFailure": "Lỗi máy chủ",
|
||||||
"totalNxDomain": "NX Domains",
|
"totalNxDomain": "NX Domain",
|
||||||
"totalRefused": "Refused",
|
"totalRefused": "Bị từ chối",
|
||||||
"totalAuthoritative": "Authoritative",
|
"totalAuthoritative": "Authoritative",
|
||||||
"totalRecursive": "Recursive",
|
"totalRecursive": "Recursive",
|
||||||
"totalCached": "Cached",
|
"totalCached": "Được lưu trong bộ nhớ đệm",
|
||||||
"totalBlocked": "Blocked",
|
"totalBlocked": "Bị chặn",
|
||||||
"totalDropped": "Dropped",
|
"totalDropped": "Bị loại bỏ",
|
||||||
"totalClients": "Clients"
|
"totalClients": "Số máy khách"
|
||||||
},
|
},
|
||||||
"tdarr": {
|
"tdarr": {
|
||||||
"queue": "Queue",
|
"queue": "Hàng đợi",
|
||||||
"processed": "Processed",
|
"processed": "Processed",
|
||||||
"errored": "Errored",
|
"errored": "Errored",
|
||||||
"saved": "Saved"
|
"saved": "Saved"
|
||||||
@@ -410,7 +412,7 @@
|
|||||||
"unknown": "Unknown"
|
"unknown": "Unknown"
|
||||||
},
|
},
|
||||||
"navidrome": {
|
"navidrome": {
|
||||||
"nothing_streaming": "No Active Streams",
|
"nothing_streaming": "Không có luồng đang hoạt động",
|
||||||
"please_wait": "Please Wait"
|
"please_wait": "Please Wait"
|
||||||
},
|
},
|
||||||
"npm": {
|
"npm": {
|
||||||
@@ -453,9 +455,9 @@
|
|||||||
"domain_count": "Domains"
|
"domain_count": "Domains"
|
||||||
},
|
},
|
||||||
"medusa": {
|
"medusa": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Cần tải",
|
||||||
"queued": "Queued",
|
"queued": "Queued",
|
||||||
"series": "Series"
|
"series": "Phim bộ"
|
||||||
},
|
},
|
||||||
"minecraft": {
|
"minecraft": {
|
||||||
"players": "Players",
|
"players": "Players",
|
||||||
@@ -472,66 +474,66 @@
|
|||||||
"users": "Users",
|
"users": "Users",
|
||||||
"loginsLast24H": "Logins (24h)",
|
"loginsLast24H": "Logins (24h)",
|
||||||
"failedLoginsLast24H": "Failed Logins (24h)",
|
"failedLoginsLast24H": "Failed Logins (24h)",
|
||||||
"authorizationsLast24H": "Auths (24h)"
|
"authorizationsLast24H": "Lượt ủy quyền (24 giờ)"
|
||||||
},
|
},
|
||||||
"proxmox": {
|
"proxmox": {
|
||||||
"mem": "MEM",
|
"mem": "Bộ nhớ",
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
"lxc": "LXC",
|
"lxc": "LXC",
|
||||||
"vms": "VMs"
|
"vms": "VM"
|
||||||
},
|
},
|
||||||
"pulse": {
|
"pulse": {
|
||||||
"nodes": "Nodes",
|
"nodes": "Node",
|
||||||
"vms": "VMs",
|
"vms": "VM",
|
||||||
"lxcs": "LXCs"
|
"lxcs": "LXC"
|
||||||
},
|
},
|
||||||
"glances": {
|
"glances": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
"load": "Load",
|
"load": "Tải hệ thống",
|
||||||
"wait": "Please wait",
|
"wait": "Vui lòng đợi",
|
||||||
"temp": "TEMP",
|
"temp": "Nhiệt độ",
|
||||||
"_temp": "Temp",
|
"_temp": "Nhiệt độ",
|
||||||
"warn": "Warn",
|
"warn": "Cảnh báo",
|
||||||
"uptime": "UP",
|
"uptime": "Thời gian hoạt động",
|
||||||
"total": "Total",
|
"total": "Tổng cộng",
|
||||||
"free": "Free",
|
"free": "Còn trống",
|
||||||
"used": "Used",
|
"used": "Đã sử dụng",
|
||||||
"days": "d",
|
"days": "ngày",
|
||||||
"hours": "h",
|
"hours": "giờ",
|
||||||
"crit": "Crit",
|
"crit": "Nghiêm trọng",
|
||||||
"read": "Read",
|
"read": "Đọc",
|
||||||
"write": "Write",
|
"write": "Ghi",
|
||||||
"gpu": "GPU",
|
"gpu": "GPU",
|
||||||
"mem": "Mem",
|
"mem": "Bộ nhớ",
|
||||||
"swap": "Swap"
|
"swap": "Swap"
|
||||||
},
|
},
|
||||||
"quicklaunch": {
|
"quicklaunch": {
|
||||||
"bookmark": "Bookmark",
|
"bookmark": "Dấu trang",
|
||||||
"service": "Service",
|
"service": "Dịch vụ",
|
||||||
"search": "Search",
|
"search": "Tìm kiếm",
|
||||||
"custom": "Custom",
|
"custom": "Tùy chỉnh",
|
||||||
"visit": "Visit",
|
"visit": "Truy cập",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"searchsuggestion": "Suggestion"
|
"searchsuggestion": "Gợi ý"
|
||||||
},
|
},
|
||||||
"wmo": {
|
"wmo": {
|
||||||
"0-day": "Sunny",
|
"0-day": "Trời nắng",
|
||||||
"0-night": "Clear",
|
"0-night": "Trời quang",
|
||||||
"1-day": "Mainly Sunny",
|
"1-day": "Chủ yếu có nắng",
|
||||||
"1-night": "Mainly Clear",
|
"1-night": "Chủ yếu trời quang",
|
||||||
"2-day": "Partly Cloudy",
|
"2-day": "Có mây từng phần",
|
||||||
"2-night": "Partly Cloudy",
|
"2-night": "Có mây từng phần",
|
||||||
"3-day": "Cloudy",
|
"3-day": "Nhiều mây",
|
||||||
"3-night": "Cloudy",
|
"3-night": "Nhiều mây",
|
||||||
"45-day": "Foggy",
|
"45-day": "Có sương mù",
|
||||||
"45-night": "Foggy",
|
"45-night": "Có sương mù",
|
||||||
"48-day": "Foggy",
|
"48-day": "Có sương mù",
|
||||||
"48-night": "Foggy",
|
"48-night": "Có sương mù",
|
||||||
"51-day": "Light Drizzle",
|
"51-day": "Mưa phùn nhẹ",
|
||||||
"51-night": "Light Drizzle",
|
"51-night": "Mưa phùn nhẹ",
|
||||||
"53-day": "Drizzle",
|
"53-day": "Mưa phùn",
|
||||||
"53-night": "Drizzle",
|
"53-night": "Mưa phùn",
|
||||||
"55-day": "Heavy Drizzle",
|
"55-day": "Mưa phùn lớn",
|
||||||
"55-night": "Heavy Drizzle",
|
"55-night": "Heavy Drizzle",
|
||||||
"56-day": "Light Freezing Drizzle",
|
"56-day": "Light Freezing Drizzle",
|
||||||
"56-night": "Light Freezing Drizzle",
|
"56-night": "Light Freezing Drizzle",
|
||||||
@@ -739,14 +741,14 @@
|
|||||||
"m": "m"
|
"m": "m"
|
||||||
},
|
},
|
||||||
"atsumeru": {
|
"atsumeru": {
|
||||||
"series": "Series",
|
"series": "Bộ truyện",
|
||||||
"archives": "Archives",
|
"archives": "Archives",
|
||||||
"chapters": "Chapters",
|
"chapters": "Chapters",
|
||||||
"categories": "Categories"
|
"categories": "Categories"
|
||||||
},
|
},
|
||||||
"komga": {
|
"komga": {
|
||||||
"libraries": "Libraries",
|
"libraries": "Libraries",
|
||||||
"series": "Series",
|
"series": "Bộ truyện",
|
||||||
"books": "Books"
|
"books": "Books"
|
||||||
},
|
},
|
||||||
"diskstation": {
|
"diskstation": {
|
||||||
@@ -759,9 +761,9 @@
|
|||||||
"streams": "Streams"
|
"streams": "Streams"
|
||||||
},
|
},
|
||||||
"mylar": {
|
"mylar": {
|
||||||
"series": "Series",
|
"series": "Phim bộ",
|
||||||
"issues": "Issues",
|
"issues": "Issues",
|
||||||
"wanted": "Wanted"
|
"wanted": "Cần tải"
|
||||||
},
|
},
|
||||||
"photoprism": {
|
"photoprism": {
|
||||||
"albums": "Albums",
|
"albums": "Albums",
|
||||||
@@ -844,7 +846,7 @@
|
|||||||
"books": "Books",
|
"books": "Books",
|
||||||
"authors": "Authors",
|
"authors": "Authors",
|
||||||
"categories": "Categories",
|
"categories": "Categories",
|
||||||
"series": "Series"
|
"series": "Bộ sách"
|
||||||
},
|
},
|
||||||
"booklore": {
|
"booklore": {
|
||||||
"libraries": "Libraries",
|
"libraries": "Libraries",
|
||||||
@@ -859,7 +861,7 @@
|
|||||||
"downloadSpeed": "Speed"
|
"downloadSpeed": "Speed"
|
||||||
},
|
},
|
||||||
"kavita": {
|
"kavita": {
|
||||||
"seriesCount": "Series",
|
"seriesCount": "Số bộ truyện",
|
||||||
"totalFiles": "Files"
|
"totalFiles": "Files"
|
||||||
},
|
},
|
||||||
"azuredevops": {
|
"azuredevops": {
|
||||||
@@ -1248,7 +1250,7 @@
|
|||||||
"storage": "Storage"
|
"storage": "Storage"
|
||||||
},
|
},
|
||||||
"sportarr": {
|
"sportarr": {
|
||||||
"wanted": "Wanted",
|
"wanted": "Cần tải",
|
||||||
"queued": "Queued",
|
"queued": "Queued",
|
||||||
"leagues": "Leagues"
|
"leagues": "Leagues"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "請稍後"
|
"wait": "請稍後"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "搜索緊…"
|
"placeholder": "搜索緊…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "请稍候"
|
"wait": "请稍候"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "搜索…"
|
"placeholder": "搜索…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
"wait": "請稍候"
|
"wait": "請稍候"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"placeholder": "搜尋…"
|
"placeholder": "搜尋…",
|
||||||
|
"provider": "Search engine: {{name}}",
|
||||||
|
"select_provider": "Select search engine"
|
||||||
},
|
},
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": "CPU",
|
"cpu": "CPU",
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ describe("pages/api/auth/[...nextauth]", () => {
|
|||||||
it("routes sanitized NextAuth logs through the Homepage logger", async () => {
|
it("routes sanitized NextAuth logs through the Homepage logger", async () => {
|
||||||
const mod = await import("pages/api/auth/[...nextauth]");
|
const mod = await import("pages/api/auth/[...nextauth]");
|
||||||
const sensitiveMetadata = {
|
const sensitiveMetadata = {
|
||||||
|
error: Object.assign(new Error("State cookie was missing."), { access_token: "sensitive-access-token" }),
|
||||||
clientSecret: "sensitive-client-secret",
|
clientSecret: "sensitive-client-secret",
|
||||||
access_token: "sensitive-access-token",
|
access_token: "sensitive-access-token",
|
||||||
id_token: "sensitive-id-token",
|
id_token: "sensitive-id-token",
|
||||||
@@ -82,7 +83,7 @@ describe("pages/api/auth/[...nextauth]", () => {
|
|||||||
mod.authOptions.logger.warn("NEXTAUTH_URL", sensitiveMetadata);
|
mod.authOptions.logger.warn("NEXTAUTH_URL", sensitiveMetadata);
|
||||||
mod.authOptions.logger.debug("OAUTH_CALLBACK_RESPONSE", sensitiveMetadata);
|
mod.authOptions.logger.debug("OAUTH_CALLBACK_RESPONSE", sensitiveMetadata);
|
||||||
|
|
||||||
expect(errorMock).toHaveBeenCalledWith("%s", "OAUTH_CALLBACK_ERROR");
|
expect(errorMock).toHaveBeenCalledWith("%s: %s", "OAUTH_CALLBACK_ERROR", "State cookie was missing.");
|
||||||
expect(warnMock).toHaveBeenCalledWith("%s", "NEXTAUTH_URL");
|
expect(warnMock).toHaveBeenCalledWith("%s", "NEXTAUTH_URL");
|
||||||
expect(debugMock).toHaveBeenCalledWith("%s", "OAUTH_CALLBACK_RESPONSE");
|
expect(debugMock).toHaveBeenCalledWith("%s", "OAUTH_CALLBACK_RESPONSE");
|
||||||
expect(JSON.stringify([...errorMock.mock.calls, ...warnMock.mock.calls, ...debugMock.mock.calls])).not.toContain(
|
expect(JSON.stringify([...errorMock.mock.calls, ...warnMock.mock.calls, ...debugMock.mock.calls])).not.toContain(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// @vitest-environment jsdom
|
// @vitest-environment jsdom
|
||||||
|
|
||||||
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
import { act, fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
import { ColorContext } from "utils/contexts/color";
|
import { ColorContext } from "utils/contexts/color";
|
||||||
@@ -25,6 +25,7 @@ const {
|
|||||||
throwIn: null,
|
throwIn: null,
|
||||||
validateData: [],
|
validateData: [],
|
||||||
hashData: null,
|
hashData: null,
|
||||||
|
hashConfig: null,
|
||||||
mutateHash: vi.fn(),
|
mutateHash: vi.fn(),
|
||||||
servicesData: [],
|
servicesData: [],
|
||||||
bookmarksData: [],
|
bookmarksData: [],
|
||||||
@@ -59,9 +60,12 @@ const {
|
|||||||
const serverSideTranslations = vi.fn(async (language) => ({ _translations: language }));
|
const serverSideTranslations = vi.fn(async (language) => ({ _translations: language }));
|
||||||
const logger = { error: vi.fn() };
|
const logger = { error: vi.fn() };
|
||||||
|
|
||||||
const useSWR = vi.fn((key) => {
|
const useSWR = vi.fn((key, config) => {
|
||||||
if (key === "/api/validate") return { data: state.validateData };
|
if (key === "/api/validate") return { data: state.validateData };
|
||||||
if (key === "/api/hash") return { data: state.hashData, mutate: state.mutateHash };
|
if (key === "/api/hash") {
|
||||||
|
state.hashConfig = config;
|
||||||
|
return { data: state.hashData, mutate: state.mutateHash };
|
||||||
|
}
|
||||||
if (key === "/api/services") return { data: state.servicesData };
|
if (key === "/api/services") return { data: state.servicesData };
|
||||||
if (key === "/api/bookmarks") return { data: state.bookmarksData };
|
if (key === "/api/bookmarks") return { data: state.bookmarksData };
|
||||||
if (key === "/api/widgets") return { data: state.widgetsData };
|
if (key === "/api/widgets") return { data: state.widgetsData };
|
||||||
@@ -172,6 +176,7 @@ describe("pages/index getStaticProps", () => {
|
|||||||
state.throwIn = null;
|
state.throwIn = null;
|
||||||
state.validateData = [];
|
state.validateData = [];
|
||||||
state.hashData = null;
|
state.hashData = null;
|
||||||
|
state.hashConfig = null;
|
||||||
state.servicesData = [];
|
state.servicesData = [];
|
||||||
state.bookmarksData = [];
|
state.bookmarksData = [];
|
||||||
state.widgetsData = [];
|
state.widgetsData = [];
|
||||||
@@ -351,6 +356,7 @@ describe("pages/index Index routing + SWR branches", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await renderIndex({ initialSettings: { title: "Homepage", layout: {} }, settings: { layout: {} } });
|
await renderIndex({ initialSettings: { title: "Homepage", layout: {} }, settings: { layout: {} } });
|
||||||
|
act(() => state.hashConfig.onSuccess(state.hashData));
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(fetchSpy).toHaveBeenCalledWith("/api/revalidate");
|
expect(fetchSpy).toHaveBeenCalledWith("/api/revalidate");
|
||||||
@@ -379,11 +385,24 @@ describe("pages/index Index routing + SWR branches", () => {
|
|||||||
localStorage.removeItem("hash");
|
localStorage.removeItem("hash");
|
||||||
|
|
||||||
await renderIndex({ initialSettings: { title: "Homepage", layout: {} }, settings: { layout: {} } });
|
await renderIndex({ initialSettings: { title: "Homepage", layout: {} }, settings: { layout: {} } });
|
||||||
|
act(() => state.hashConfig.onSuccess(state.hashData));
|
||||||
|
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(localStorage.getItem("hash")).toBe("first-hash");
|
expect(localStorage.getItem("hash")).toBe("first-hash");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("ignores a hash response without a hash", async () => {
|
||||||
|
state.validateData = [];
|
||||||
|
localStorage.setItem("hash", "old-hash");
|
||||||
|
|
||||||
|
await renderIndex({ initialSettings: { title: "Homepage", layout: {} }, settings: { layout: {} } });
|
||||||
|
|
||||||
|
expect(() => act(() => state.hashConfig.onSuccess(null))).not.toThrow();
|
||||||
|
expect(() => act(() => state.hashConfig.onSuccess({}))).not.toThrow();
|
||||||
|
expect(localStorage.getItem("hash")).toBe("old-hash");
|
||||||
|
expect(document.querySelector(".animate-spin")).toBeFalsy();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("pages/index Home behavior", () => {
|
describe("pages/index Home behavior", () => {
|
||||||
@@ -419,11 +438,27 @@ describe("pages/index Home behavior", () => {
|
|||||||
|
|
||||||
fireEvent.keyDown(document.body, { key: "a" });
|
fireEvent.keyDown(document.body, { key: "a" });
|
||||||
expect(screen.getByTestId("quicklaunch")).toHaveTextContent("open:3");
|
expect(screen.getByTestId("quicklaunch")).toHaveTextContent("open:3");
|
||||||
|
expect(state.quickLaunchProps.searchString).toBe("a");
|
||||||
|
|
||||||
fireEvent.keyDown(document.body, { key: "Escape" });
|
fireEvent.keyDown(document.body, { key: "Escape" });
|
||||||
expect(screen.getByTestId("quicklaunch")).toHaveTextContent("closed:3");
|
expect(screen.getByTestId("quicklaunch")).toHaveTextContent("closed:3");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("opens search on space without seeding the query with whitespace", async () => {
|
||||||
|
await renderIndex({
|
||||||
|
initialSettings: { title: "Homepage", layout: {} },
|
||||||
|
settings: { title: "Homepage", layout: {}, language: "en" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await waitFor(() => {
|
||||||
|
expect(state.quickLaunchProps).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
fireEvent.keyDown(document.body, { key: " " });
|
||||||
|
expect(screen.getByTestId("quicklaunch")).toHaveTextContent("open:3");
|
||||||
|
expect(state.quickLaunchProps.searchString).toBe("");
|
||||||
|
});
|
||||||
|
|
||||||
it("renders services and bookmark groups when present", async () => {
|
it("renders services and bookmark groups when present", async () => {
|
||||||
await renderIndex({
|
await renderIndex({
|
||||||
initialSettings: { title: "Homepage", layout: {} },
|
initialSettings: { title: "Homepage", layout: {} },
|
||||||
@@ -489,7 +524,7 @@ describe("pages/index Home behavior", () => {
|
|||||||
state.widgetsData = [];
|
state.widgetsData = [];
|
||||||
|
|
||||||
const { setTheme, setColor, setSettings } = await renderIndex({
|
const { setTheme, setColor, setSettings } = await renderIndex({
|
||||||
initialSettings: { title: "Homepage", layout: {} },
|
initialSettings: { title: "Homepage", layout: {}, favicon: "/x.ico" },
|
||||||
settings: {
|
settings: {
|
||||||
title: "Homepage",
|
title: "Homepage",
|
||||||
layout: {},
|
layout: {},
|
||||||
@@ -498,7 +533,6 @@ describe("pages/index Home behavior", () => {
|
|||||||
color: "emerald",
|
color: "emerald",
|
||||||
disableIndexing: true,
|
disableIndexing: true,
|
||||||
base: "/base/",
|
base: "/base/",
|
||||||
favicon: "/x.ico",
|
|
||||||
},
|
},
|
||||||
theme: "dark",
|
theme: "dark",
|
||||||
color: "slate",
|
color: "slate",
|
||||||
@@ -516,6 +550,20 @@ describe("pages/index Home behavior", () => {
|
|||||||
expect(document.querySelector('link[rel="icon"]')?.getAttribute("href")).toBe("/x.ico");
|
expect(document.querySelector('link[rel="icon"]')?.getAttribute("href")).toBe("/x.ico");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Safari reads the head without running JS, so the favicon has to be there before the
|
||||||
|
// settings context is populated, and mask-icon must not be
|
||||||
|
it("renders a custom favicon before the settings context is populated", async () => {
|
||||||
|
await renderIndex({
|
||||||
|
initialSettings: { title: "Homepage", layout: {}, favicon: "/x.ico" },
|
||||||
|
settings: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(document.querySelector('link[rel="icon"]')?.getAttribute("href")).toBe("/x.ico");
|
||||||
|
expect(document.querySelector('link[rel="apple-touch-icon"]')?.getAttribute("href")).toBe("/x.ico");
|
||||||
|
expect(document.querySelector('link[rel="mask-icon"]')).toBeNull();
|
||||||
|
expect(document.querySelector('link[rel="shortcut icon"]')).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
it("marks information widgets as right-aligned for known widget types", async () => {
|
it("marks information widgets as right-aligned for known widget types", async () => {
|
||||||
await renderIndex({
|
await renderIndex({
|
||||||
initialSettings: { title: "Homepage", layout: {} },
|
initialSettings: { title: "Homepage", layout: {} },
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
import { useEffect, useRef } from "react";
|
||||||
|
import { MdKeyboardArrowDown } from "react-icons/md";
|
||||||
|
|
||||||
import List from "components/bookmarks/list";
|
import List from "components/bookmarks/list";
|
||||||
import ErrorBoundary from "components/errorboundry";
|
import ErrorBoundary from "components/errorboundry";
|
||||||
import ResolvedIcon from "components/resolvedicon";
|
import ResolvedIcon from "components/resolvedicon";
|
||||||
import { useEffect, useRef } from "react";
|
|
||||||
import { MdKeyboardArrowDown } from "react-icons/md";
|
|
||||||
|
|
||||||
export default function BookmarksGroup({
|
export default function BookmarksGroup({
|
||||||
bookmarks,
|
bookmarks,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import ResolvedIcon from "components/resolvedicon";
|
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
|
||||||
|
import ResolvedIcon from "components/resolvedicon";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
export default function Item({ bookmark, iconOnly = false }) {
|
export default function Item({ bookmark, iconOnly = false }) {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import Item from "components/bookmarks/item";
|
|
||||||
|
|
||||||
import { columnMap } from "../../utils/layout/columns";
|
import { columnMap } from "../../utils/layout/columns";
|
||||||
|
|
||||||
|
import Item from "components/bookmarks/item";
|
||||||
|
|
||||||
export default function List({ bookmarks, layout, bookmarksStyle }) {
|
export default function List({ bookmarks, layout, bookmarksStyle }) {
|
||||||
let classes = layout?.style === "row" ? `grid ${columnMap[layout?.columns]} gap-x-2` : "flex flex-col bookmark-list";
|
let classes = layout?.style === "row" ? `grid ${columnMap[layout?.columns]} gap-x-2` : "flex flex-col bookmark-list";
|
||||||
const style = {};
|
const style = {};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/* eslint-disable @next/next/no-img-element */
|
/* eslint-disable @next/next/no-img-element */
|
||||||
/* eslint-disable jsx-a11y/alt-text */
|
/* eslint-disable jsx-a11y/alt-text */
|
||||||
import { useContext, useEffect, useRef } from "react";
|
import { useContext, useEffect, useRef } from "react";
|
||||||
import { ColorContext } from "utils/contexts/color";
|
|
||||||
|
|
||||||
|
import { ColorContext } from "utils/contexts/color";
|
||||||
import themes from "utils/styles/themes";
|
import themes from "utils/styles/themes";
|
||||||
|
|
||||||
export function Svg({ svgRef = null }) {
|
export function Svg({ svgRef = null }) {
|
||||||
|
|||||||
+131
-111
@@ -3,11 +3,12 @@ import { useTranslation } from "next-i18next/pages";
|
|||||||
import { useCallback, useContext, useEffect, useRef, useState } from "react";
|
import { useCallback, useContext, useEffect, useRef, useState } from "react";
|
||||||
import { FiSearch } from "react-icons/fi";
|
import { FiSearch } from "react-icons/fi";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
|
||||||
|
|
||||||
import ResolvedIcon from "./resolvedicon";
|
import ResolvedIcon from "./resolvedicon";
|
||||||
import { getStoredProvider, searchProviders } from "./widgets/search/search";
|
import { getStoredProvider, searchProviders } from "./widgets/search/search";
|
||||||
|
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
const MOBILE_BUTTON_POSITIONS = {
|
const MOBILE_BUTTON_POSITIONS = {
|
||||||
"top-left": "top-4 left-4",
|
"top-left": "top-4 left-4",
|
||||||
"top-right": "top-4 right-4",
|
"top-right": "top-4 right-4",
|
||||||
@@ -15,6 +16,69 @@ const MOBILE_BUTTON_POSITIONS = {
|
|||||||
"bottom-right": "bottom-4 right-4",
|
"bottom-right": "bottom-4 right-4",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function parseUrl(searchString) {
|
||||||
|
if (!/.+[.:].+/.test(searchString)) return null; // basic test for probably a url
|
||||||
|
|
||||||
|
try {
|
||||||
|
return new URL(searchString.toLowerCase().startsWith("http") ? searchString : `https://${searchString}`);
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSearchResults({
|
||||||
|
hideVisitURL,
|
||||||
|
searchDescriptions,
|
||||||
|
searchProvider,
|
||||||
|
searchString,
|
||||||
|
searchSuggestions,
|
||||||
|
servicesAndBookmarks,
|
||||||
|
t,
|
||||||
|
url,
|
||||||
|
}) {
|
||||||
|
if (searchString.trim().length === 0) return [];
|
||||||
|
|
||||||
|
const results = servicesAndBookmarks.flatMap((result) => {
|
||||||
|
const nameMatch = result.name.toLowerCase().includes(searchString);
|
||||||
|
const descriptionMatch = searchDescriptions && result.description?.toLowerCase().includes(searchString);
|
||||||
|
|
||||||
|
if (!nameMatch && !descriptionMatch) return [];
|
||||||
|
return [{ ...result, ...(searchDescriptions && { priority: nameMatch ? 2 : +descriptionMatch }) }];
|
||||||
|
});
|
||||||
|
|
||||||
|
if (searchDescriptions) {
|
||||||
|
results.sort((a, b) => b.priority - a.priority);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchProvider) {
|
||||||
|
results.push({
|
||||||
|
href: searchProvider.url + encodeURIComponent(searchString),
|
||||||
|
name: `${searchProvider.name ?? t("quicklaunch.custom")} ${t("quicklaunch.search")}`,
|
||||||
|
type: "search",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (searchProvider.showSearchSuggestions && searchProvider.suggestionUrl && searchSuggestions[1]) {
|
||||||
|
results.push(
|
||||||
|
...searchSuggestions[1].map((suggestion) => ({
|
||||||
|
href: searchProvider.url + encodeURIComponent(suggestion),
|
||||||
|
name: suggestion,
|
||||||
|
type: "searchSuggestion",
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hideVisitURL && url) {
|
||||||
|
results.unshift({
|
||||||
|
href: url.toString(),
|
||||||
|
name: `${t("quicklaunch.visit")} URL`,
|
||||||
|
type: "url",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
export default function QuickLaunch({ servicesAndBookmarks, searchString, setSearchString, isOpen, setSearching }) {
|
export default function QuickLaunch({ servicesAndBookmarks, searchString, setSearchString, isOpen, setSearching }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
@@ -23,9 +87,8 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
|
|
||||||
const searchField = useRef();
|
const searchField = useRef();
|
||||||
|
|
||||||
const [results, setResults] = useState([]);
|
|
||||||
const [currentItemIndex, setCurrentItemIndex] = useState(null);
|
const [currentItemIndex, setCurrentItemIndex] = useState(null);
|
||||||
const [url, setUrl] = useState(null);
|
const url = parseUrl(searchString);
|
||||||
const [searchSuggestions, setSearchSuggestions] = useState([]);
|
const [searchSuggestions, setSearchSuggestions] = useState([]);
|
||||||
|
|
||||||
const { data: widgets } = useSWR("/api/widgets");
|
const { data: widgets } = useSWR("/api/widgets");
|
||||||
@@ -62,7 +125,7 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
function openCurrentItem(newWindow) {
|
function openCurrentItem(newWindow) {
|
||||||
const result = results[currentItemIndex];
|
const result = results[activeItemIndex];
|
||||||
window.open(
|
window.open(
|
||||||
result.href,
|
result.href,
|
||||||
newWindow ? "_blank" : (result.target ?? searchProvider?.target ?? settings.target ?? "_blank"),
|
newWindow ? "_blank" : (result.target ?? searchProvider?.target ?? settings.target ?? "_blank"),
|
||||||
@@ -81,17 +144,9 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
|
|
||||||
function handleSearchChange(event) {
|
function handleSearchChange(event) {
|
||||||
const rawSearchString = event.target.value;
|
const rawSearchString = event.target.value;
|
||||||
try {
|
setCurrentItemIndex(null);
|
||||||
if (!/.+[.:].+/g.test(rawSearchString)) throw new Error(); // basic test for probably a url
|
// urls keep their casing, everything else is lowercased for matching
|
||||||
let urlString = rawSearchString;
|
setSearchString(parseUrl(rawSearchString) ? rawSearchString : rawSearchString.toLowerCase());
|
||||||
if (urlString.toLowerCase().indexOf("http") !== 0) urlString = `https://${rawSearchString}`;
|
|
||||||
setUrl(new URL(urlString)); // basic validation
|
|
||||||
setSearchString(rawSearchString);
|
|
||||||
return;
|
|
||||||
} catch (e) {
|
|
||||||
setUrl(null);
|
|
||||||
}
|
|
||||||
setSearchString(rawSearchString.toLowerCase());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSearchKeyDown(event) {
|
function handleSearchKeyDown(event) {
|
||||||
@@ -103,18 +158,19 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
} else if (event.key === "Enter" && results.length) {
|
} else if (event.key === "Enter" && results.length) {
|
||||||
closeAndReset();
|
closeAndReset();
|
||||||
openCurrentItem(event.metaKey);
|
openCurrentItem(event.metaKey);
|
||||||
} else if (event.key === "ArrowDown" && results[currentItemIndex + 1]) {
|
} else if (event.key === "ArrowDown" && results[activeItemIndex + 1]) {
|
||||||
setCurrentItemIndex(currentItemIndex + 1);
|
setCurrentItemIndex(activeItemIndex + 1);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
} else if (event.key === "ArrowUp" && currentItemIndex > 0) {
|
} else if (event.key === "ArrowUp" && activeItemIndex > 0) {
|
||||||
setCurrentItemIndex(currentItemIndex - 1);
|
setCurrentItemIndex(activeItemIndex - 1);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
} else if (
|
} else if (
|
||||||
event.key === "ArrowRight" &&
|
event.key === "ArrowRight" &&
|
||||||
results[currentItemIndex] &&
|
results[activeItemIndex] &&
|
||||||
results[currentItemIndex].type === "searchSuggestion"
|
results[activeItemIndex].type === "searchSuggestion"
|
||||||
) {
|
) {
|
||||||
setSearchString(results[currentItemIndex].name);
|
setCurrentItemIndex(null);
|
||||||
|
setSearchString(results[activeItemIndex].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,88 +194,51 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const abortController = new AbortController();
|
if (
|
||||||
|
searchString.trim().length === 0 ||
|
||||||
if (searchString.trim().length === 0) setResults([]);
|
!searchProvider?.showSearchSuggestions ||
|
||||||
else {
|
!searchProvider.suggestionUrl ||
|
||||||
let newResults = servicesAndBookmarks.filter((r) => {
|
searchString.trim() === searchSuggestions[0]?.trim()
|
||||||
const nameMatch = r.name.toLowerCase().includes(searchString);
|
) {
|
||||||
let descriptionMatch;
|
return undefined;
|
||||||
if (searchDescriptions) {
|
|
||||||
descriptionMatch = r.description?.toLowerCase().includes(searchString);
|
|
||||||
r.priority = nameMatch ? 2 * +nameMatch : +descriptionMatch;
|
|
||||||
}
|
|
||||||
return nameMatch || descriptionMatch;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (searchDescriptions) {
|
|
||||||
newResults = newResults.sort((a, b) => b.priority - a.priority);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searchProvider) {
|
|
||||||
newResults.push({
|
|
||||||
href: searchProvider.url + encodeURIComponent(searchString),
|
|
||||||
name: `${searchProvider.name ?? t("quicklaunch.custom")} ${t("quicklaunch.search")}`,
|
|
||||||
type: "search",
|
|
||||||
});
|
|
||||||
|
|
||||||
if (searchProvider.showSearchSuggestions && searchProvider.suggestionUrl) {
|
|
||||||
if (searchString.trim() !== searchSuggestions[0]?.trim()) {
|
|
||||||
fetch(
|
|
||||||
`/api/search/searchSuggestion?query=${encodeURIComponent(searchString)}&providerName=${
|
|
||||||
searchProvider.name ?? "Custom"
|
|
||||||
}`,
|
|
||||||
{ signal: abortController.signal },
|
|
||||||
)
|
|
||||||
.then(async (searchSuggestionResult) => {
|
|
||||||
const newSearchSuggestions = await searchSuggestionResult.json();
|
|
||||||
|
|
||||||
if (newSearchSuggestions) {
|
|
||||||
if (newSearchSuggestions[1].length > 4) {
|
|
||||||
newSearchSuggestions[1] = newSearchSuggestions[1].splice(0, 4);
|
|
||||||
}
|
|
||||||
setSearchSuggestions(newSearchSuggestions);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
// If there is an error, just ignore it. There just will be no search suggestions.
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searchSuggestions[1]) {
|
|
||||||
newResults = newResults.concat(
|
|
||||||
searchSuggestions[1].map((suggestion) => ({
|
|
||||||
href: searchProvider.url + encodeURIComponent(suggestion),
|
|
||||||
name: suggestion,
|
|
||||||
type: "searchSuggestion",
|
|
||||||
})),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hideVisitURL && url) {
|
|
||||||
newResults.unshift({
|
|
||||||
href: url.toString(),
|
|
||||||
name: `${t("quicklaunch.visit")} URL`,
|
|
||||||
type: "url",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
setResults(newResults);
|
|
||||||
|
|
||||||
if (newResults.length) {
|
|
||||||
setCurrentItemIndex(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
const abortController = new AbortController();
|
||||||
abortController.abort();
|
|
||||||
};
|
fetch(
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
`/api/search/searchSuggestion?query=${encodeURIComponent(searchString)}&providerName=${
|
||||||
}, [searchString, servicesAndBookmarks, searchDescriptions, hideVisitURL, searchSuggestions, searchProvider, url]);
|
searchProvider.name ?? "Custom"
|
||||||
|
}`,
|
||||||
|
{ signal: abortController.signal },
|
||||||
|
)
|
||||||
|
.then(async (searchSuggestionResult) => {
|
||||||
|
const newSearchSuggestions = await searchSuggestionResult.json();
|
||||||
|
|
||||||
|
if (newSearchSuggestions) {
|
||||||
|
setCurrentItemIndex(null);
|
||||||
|
setSearchSuggestions([newSearchSuggestions[0], newSearchSuggestions[1].slice(0, 4)]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// If there is an error, just ignore it. There just will be no search suggestions.
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => abortController.abort();
|
||||||
|
}, [searchProvider, searchString, searchSuggestions]);
|
||||||
|
|
||||||
|
const results = getSearchResults({
|
||||||
|
hideVisitURL,
|
||||||
|
searchDescriptions,
|
||||||
|
searchProvider,
|
||||||
|
searchString,
|
||||||
|
searchSuggestions,
|
||||||
|
servicesAndBookmarks,
|
||||||
|
t,
|
||||||
|
url,
|
||||||
|
});
|
||||||
|
|
||||||
|
const activeItemIndex = currentItemIndex ?? (results.length ? 0 : null);
|
||||||
|
|
||||||
const [hidden, setHidden] = useState(true);
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function handleBackdropClick(event) {
|
function handleBackdropClick(event) {
|
||||||
if (event.target?.tagName === "DIV") closeAndReset();
|
if (event.target?.tagName === "DIV") closeAndReset();
|
||||||
@@ -228,14 +247,11 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
searchField.current.focus();
|
searchField.current.focus();
|
||||||
document.body.addEventListener("click", handleBackdropClick);
|
document.body.addEventListener("click", handleBackdropClick);
|
||||||
setHidden(false);
|
|
||||||
} else {
|
} else {
|
||||||
document.body.removeEventListener("click", handleBackdropClick);
|
|
||||||
searchField.current.blur();
|
searchField.current.blur();
|
||||||
setTimeout(() => {
|
|
||||||
setHidden(true);
|
|
||||||
}, 300); // disable on close
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return () => document.body.removeEventListener("click", handleBackdropClick);
|
||||||
}, [isOpen, closeAndReset]);
|
}, [isOpen, closeAndReset]);
|
||||||
|
|
||||||
function highlightText(text) {
|
function highlightText(text) {
|
||||||
@@ -259,13 +275,17 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"relative z-40 ease-in-out duration-300 transition-opacity",
|
"relative z-40 ease-in-out",
|
||||||
hidden && !isOpen && "hidden",
|
isOpen ? "visible opacity-100" : "invisible opacity-0 pointer-events-none",
|
||||||
!hidden && isOpen && "opacity-100",
|
|
||||||
!isOpen && "opacity-0",
|
|
||||||
)}
|
)}
|
||||||
|
style={{
|
||||||
|
transitionProperty: "opacity, visibility",
|
||||||
|
transitionDuration: "300ms, 0s",
|
||||||
|
transitionDelay: isOpen ? "0s, 0s" : "0s, 300ms",
|
||||||
|
}}
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
|
aria-hidden={!isOpen}
|
||||||
>
|
>
|
||||||
<div className="fixed inset-0 bg-gray-500 opacity-50" />
|
<div className="fixed inset-0 bg-gray-500 opacity-50" />
|
||||||
<div className="fixed inset-0 z-20 overflow-y-auto">
|
<div className="fixed inset-0 z-20 overflow-y-auto">
|
||||||
@@ -297,7 +317,7 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
|
|||||||
onKeyDown={handleItemKeyDown}
|
onKeyDown={handleItemKeyDown}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"flex flex-row w-full items-center justify-between rounded-md text-sm md:text-xl py-2 px-4 cursor-pointer text-theme-700 dark:text-theme-200",
|
"flex flex-row w-full items-center justify-between rounded-md text-sm md:text-xl py-2 px-4 cursor-pointer text-theme-700 dark:text-theme-200",
|
||||||
i === currentItemIndex && "bg-theme-300/50 dark:bg-theme-700/50",
|
i === activeItemIndex && "bg-theme-300/50 dark:bg-theme-700/50",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex flex-row items-center mr-4 pointer-events-none">
|
<div className="flex flex-row items-center mr-4 pointer-events-none">
|
||||||
|
|||||||
@@ -46,13 +46,25 @@ function Wrapper({ servicesAndBookmarks = [], initialOpen = true } = {}) {
|
|||||||
const [isOpen, setSearching] = useState(initialOpen);
|
const [isOpen, setSearching] = useState(initialOpen);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<QuickLaunch
|
<>
|
||||||
servicesAndBookmarks={servicesAndBookmarks}
|
<button
|
||||||
searchString={searchString}
|
type="button"
|
||||||
setSearchString={setSearchString}
|
data-testid="seed-key"
|
||||||
isOpen={isOpen}
|
onClick={() => {
|
||||||
setSearching={setSearching}
|
setSearchString((current) => `${current}g`);
|
||||||
/>
|
setSearching(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
seed
|
||||||
|
</button>
|
||||||
|
<QuickLaunch
|
||||||
|
servicesAndBookmarks={servicesAndBookmarks}
|
||||||
|
searchString={searchString}
|
||||||
|
setSearchString={setSearchString}
|
||||||
|
isOpen={isOpen}
|
||||||
|
setSearching={setSearching}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,6 +163,35 @@ describe("components/quicklaunch", () => {
|
|||||||
openSpy.mockRestore();
|
openSpy.mockRestore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("does not carry a previous url result into a search seeded by a keypress", async () => {
|
||||||
|
renderWithProviders(<Wrapper />, {
|
||||||
|
settings: {
|
||||||
|
target: "_self",
|
||||||
|
quicklaunch: {
|
||||||
|
provider: "duckduckgo",
|
||||||
|
showSearchSuggestions: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const input = screen.getByPlaceholderText("Search");
|
||||||
|
await waitFor(() => expect(input).toHaveFocus());
|
||||||
|
|
||||||
|
fireEvent.change(input, { target: { value: "example.com" } });
|
||||||
|
expect(await screen.findByText("quicklaunch.visit URL")).toBeInTheDocument();
|
||||||
|
|
||||||
|
fireEvent.keyDown(input, { key: "Escape" });
|
||||||
|
await act(async () => {
|
||||||
|
await new Promise((r) => setTimeout(r, 350));
|
||||||
|
});
|
||||||
|
|
||||||
|
// reopen by "typing" a character, the way pages/index does
|
||||||
|
fireEvent.click(screen.getByTestId("seed-key"));
|
||||||
|
|
||||||
|
expect(input).toHaveValue("g");
|
||||||
|
expect(screen.queryByText("quicklaunch.visit URL")).not.toBeInTheDocument();
|
||||||
|
});
|
||||||
|
|
||||||
it("closes on Escape and clears the search string after the timeout", async () => {
|
it("closes on Escape and clears the search string after the timeout", async () => {
|
||||||
renderWithProviders(<Wrapper />, {
|
renderWithProviders(<Wrapper />, {
|
||||||
settings: {
|
settings: {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
import { ThemeContext } from "utils/contexts/theme";
|
import { ThemeContext } from "utils/contexts/theme";
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import ResolvedIcon from "components/resolvedicon";
|
|
||||||
import List from "components/services/list";
|
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { MdKeyboardArrowDown } from "react-icons/md";
|
import { MdKeyboardArrowDown } from "react-icons/md";
|
||||||
|
|
||||||
import { columnMap } from "../../utils/layout/columns";
|
import { columnMap } from "../../utils/layout/columns";
|
||||||
|
|
||||||
|
import ResolvedIcon from "components/resolvedicon";
|
||||||
|
import List from "components/services/list";
|
||||||
|
|
||||||
export default function ServicesGroup({
|
export default function ServicesGroup({
|
||||||
group,
|
group,
|
||||||
layout,
|
layout,
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import ResolvedIcon from "components/resolvedicon";
|
|
||||||
import { useContext, useState } from "react";
|
import { useContext, useState } from "react";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
|
||||||
import Docker from "widgets/docker/component";
|
|
||||||
import Kubernetes from "widgets/kubernetes/component";
|
|
||||||
import ProxmoxVM from "widgets/proxmoxvm/component";
|
|
||||||
|
|
||||||
import KubernetesStatus from "./kubernetes-status";
|
import KubernetesStatus from "./kubernetes-status";
|
||||||
import Ping from "./ping";
|
import Ping from "./ping";
|
||||||
@@ -13,6 +8,12 @@ import SiteMonitor from "./site-monitor";
|
|||||||
import Status from "./status";
|
import Status from "./status";
|
||||||
import Widget from "./widget";
|
import Widget from "./widget";
|
||||||
|
|
||||||
|
import ResolvedIcon from "components/resolvedicon";
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
import Docker from "widgets/docker/component";
|
||||||
|
import Kubernetes from "widgets/kubernetes/component";
|
||||||
|
import ProxmoxVM from "widgets/proxmoxvm/component";
|
||||||
|
|
||||||
export default function Item({ service, groupName, useEqualHeights }) {
|
export default function Item({ service, groupName, useEqualHeights }) {
|
||||||
const hasLink = service.href && service.href !== "#";
|
const hasLink = service.href && service.href !== "#";
|
||||||
const { settings } = useContext(SettingsContext);
|
const { settings } = useContext(SettingsContext);
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import Item from "components/services/item";
|
|
||||||
|
|
||||||
import { columnMap } from "../../utils/layout/columns";
|
import { columnMap } from "../../utils/layout/columns";
|
||||||
|
|
||||||
|
import Item from "components/services/item";
|
||||||
|
|
||||||
export default function List({ groupName, services, layout, useEqualHeights, header }) {
|
export default function List({ groupName, services, layout, useEqualHeights, header }) {
|
||||||
return (
|
return (
|
||||||
<ul
|
<ul
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import ErrorBoundary from "components/errorboundry";
|
|
||||||
import { useTranslation } from "next-i18next/pages";
|
import { useTranslation } from "next-i18next/pages";
|
||||||
|
|
||||||
|
import ErrorBoundary from "components/errorboundry";
|
||||||
import components from "widgets/components";
|
import components from "widgets/components";
|
||||||
|
|
||||||
export default function Widget({ widget, service }) {
|
export default function Widget({ widget, service }) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { useContext, useMemo } from "react";
|
import { useContext, useMemo } from "react";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
|
||||||
|
|
||||||
import Error from "./error";
|
import Error from "./error";
|
||||||
import { BlockHighlightContext } from "./highlight-context";
|
import { BlockHighlightContext } from "./highlight-context";
|
||||||
|
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
import { buildHighlightConfig } from "utils/highlights";
|
import { buildHighlightConfig } from "utils/highlights";
|
||||||
|
|
||||||
const ALIASED_WIDGETS = {
|
const ALIASED_WIDGETS = {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
|
|
||||||
import { TabContext } from "utils/contexts/tab";
|
import { TabContext } from "utils/contexts/tab";
|
||||||
|
|
||||||
function slugify(tabName) {
|
function slugify(tabName) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Popover, Transition } from "@headlessui/react";
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { Fragment, useContext } from "react";
|
import { Fragment, useContext } from "react";
|
||||||
import { IoColorPalette } from "react-icons/io5";
|
import { IoColorPalette } from "react-icons/io5";
|
||||||
|
|
||||||
import { ColorContext } from "utils/contexts/color";
|
import { ColorContext } from "utils/contexts/color";
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
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/contexts/theme";
|
import { ThemeContext } from "utils/contexts/theme";
|
||||||
|
|
||||||
export default function ThemeToggle() {
|
export default function ThemeToggle() {
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import { useTranslation } from "next-i18next/pages";
|
import { useTranslation } from "next-i18next/pages";
|
||||||
import { useEffect, useState } from "react";
|
import { useMemo } from "react";
|
||||||
|
|
||||||
import Container from "../widget/container";
|
import Container from "../widget/container";
|
||||||
import Raw from "../widget/raw";
|
import Raw from "../widget/raw";
|
||||||
|
|
||||||
|
import useCurrentTime from "utils/hooks/use-current-time";
|
||||||
|
|
||||||
const textSizes = {
|
const textSizes = {
|
||||||
"4xl": "text-4xl",
|
"4xl": "text-4xl",
|
||||||
"3xl": "text-3xl",
|
"3xl": "text-3xl",
|
||||||
@@ -18,17 +20,10 @@ const textSizes = {
|
|||||||
export default function DateTime({ options }) {
|
export default function DateTime({ options }) {
|
||||||
const { text_size: textSize, locale, format } = options;
|
const { text_size: textSize, locale, format } = options;
|
||||||
const { i18n } = useTranslation();
|
const { i18n } = useTranslation();
|
||||||
const [date, setDate] = useState("");
|
|
||||||
const dateLocale = locale ?? i18n.language;
|
const dateLocale = locale ?? i18n.language;
|
||||||
|
const currentTime = useCurrentTime(1000);
|
||||||
useEffect(() => {
|
const dateFormatter = useMemo(() => new Intl.DateTimeFormat(dateLocale, { ...format }), [dateLocale, format]);
|
||||||
const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format });
|
const date = currentTime === null ? "" : dateFormatter.format(new Date(currentTime));
|
||||||
setDate(dateFormat.format(new Date()));
|
|
||||||
const interval = setInterval(() => {
|
|
||||||
setDate(dateFormat.format(new Date()));
|
|
||||||
}, 1000);
|
|
||||||
return () => clearInterval(interval);
|
|
||||||
}, [date, setDate, dateLocale, format]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container options={options} additionalClassNames="information-widget-datetime">
|
<Container options={options} additionalClassNames="information-widget-datetime">
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ import { useContext } from "react";
|
|||||||
import { FaMemory, FaRegClock, FaThermometerHalf } from "react-icons/fa";
|
import { FaMemory, FaRegClock, FaThermometerHalf } from "react-icons/fa";
|
||||||
import { FiCpu, FiHardDrive } from "react-icons/fi";
|
import { FiCpu, FiHardDrive } from "react-icons/fi";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
|
||||||
|
|
||||||
import Error from "../widget/error";
|
import Error from "../widget/error";
|
||||||
import Resource from "../widget/resource";
|
import Resource from "../widget/resource";
|
||||||
import Resources from "../widget/resources";
|
import Resources from "../widget/resources";
|
||||||
import WidgetLabel from "../widget/widget_label";
|
import WidgetLabel from "../widget/widget_label";
|
||||||
|
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
const defaultCpuSensorLabels = ["cpu_thermal", "Core", "Tctl", "Temperature"];
|
const defaultCpuSensorLabels = ["cpu_thermal", "Core", "Tctl", "Temperature"];
|
||||||
|
|
||||||
function convertToFahrenheit(t) {
|
function convertToFahrenheit(t) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import ResolvedIcon from "components/resolvedicon";
|
|
||||||
|
|
||||||
import Container from "../widget/container";
|
import Container from "../widget/container";
|
||||||
import Raw from "../widget/raw";
|
import Raw from "../widget/raw";
|
||||||
|
|
||||||
|
import ResolvedIcon from "components/resolvedicon";
|
||||||
|
|
||||||
export default function Logo({ options }) {
|
export default function Logo({ options }) {
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import Resource from "../widget/resource";
|
|||||||
|
|
||||||
export default function Network({ options, refresh = 1500 }) {
|
export default function Network({ options, refresh = 1500 }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
if (options.network === true) options.network = "default";
|
const network = options.network === true ? "default" : options.network;
|
||||||
|
|
||||||
const { data, error } = useSWR(`/api/widgets/resources?type=network&interfaceName=${options.network}`, {
|
const { data, error } = useSWR(`/api/widgets/resources?type=network&interfaceName=${network}`, {
|
||||||
refreshInterval: refresh,
|
refreshInterval: refresh,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ describe("components/widgets/resources/network", () => {
|
|||||||
|
|
||||||
it("normalizes options.network=true to default interfaceName in the request", () => {
|
it("normalizes options.network=true to default interfaceName in the request", () => {
|
||||||
useSWR.mockReturnValue({ data: undefined, error: undefined });
|
useSWR.mockReturnValue({ data: undefined, error: undefined });
|
||||||
|
const options = Object.freeze({ network: true });
|
||||||
|
|
||||||
render(<Network options={{ network: true }} />);
|
render(<Network options={options} />);
|
||||||
|
|
||||||
expect(useSWR).toHaveBeenCalledWith(expect.stringContaining("interfaceName=default"), expect.any(Object));
|
expect(useSWR).toHaveBeenCalledWith(expect.stringContaining("interfaceName=default"), expect.any(Object));
|
||||||
|
expect(options.network).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders rates and usage percentage when data is present", () => {
|
it("renders rates and usage percentage when data is present", () => {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from "@headlessui/react";
|
} from "@headlessui/react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useTranslation } from "next-i18next/pages";
|
import { useTranslation } from "next-i18next/pages";
|
||||||
import { Fragment, useEffect, useMemo, useState } from "react";
|
import { Fragment, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
||||||
import { BiLogoBing } from "react-icons/bi";
|
import { BiLogoBing } from "react-icons/bi";
|
||||||
import { FiSearch } from "react-icons/fi";
|
import { FiSearch } from "react-icons/fi";
|
||||||
import { SiBaidu, SiBrave, SiDuckduckgo, SiGoogle } from "react-icons/si";
|
import { SiBaidu, SiBrave, SiDuckduckgo, SiGoogle } from "react-icons/si";
|
||||||
@@ -79,24 +79,32 @@ export function getStoredProvider() {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function subscribeToStoredProvider(onStoreChange) {
|
||||||
|
const handleStorage = (event) => {
|
||||||
|
if (event.key === localStorageKey) onStoreChange();
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener("storage", handleStorage);
|
||||||
|
return () => window.removeEventListener("storage", handleStorage);
|
||||||
|
}
|
||||||
|
|
||||||
export default function Search({ options }) {
|
export default function Search({ options }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
// options is a fresh object each render, so memo on provider itself
|
// options is a fresh object each render, so memo on provider itself
|
||||||
const availableProviderIds = useMemo(() => getAvailableProviderIds(options.provider) ?? [], [options.provider]);
|
const availableProviderIds = useMemo(() => getAvailableProviderIds(options.provider) ?? [], [options.provider]);
|
||||||
|
const storedProvider = useSyncExternalStore(subscribeToStoredProvider, getStoredProvider, () => null);
|
||||||
|
const storedProviderId = Object.keys(searchProviders).find(
|
||||||
|
(providerId) => searchProviders[providerId] === storedProvider,
|
||||||
|
);
|
||||||
|
const initialProvider = availableProviderIds.includes(storedProviderId)
|
||||||
|
? storedProvider
|
||||||
|
: searchProviders[availableProviderIds[0] ?? "google"];
|
||||||
|
|
||||||
const [query, setQuery] = useState("");
|
const [query, setQuery] = useState("");
|
||||||
const [selectedProvider, setSelectedProvider] = useState(searchProviders[availableProviderIds[0] ?? "google"]);
|
const [providerOverride, setProviderOverride] = useState(null);
|
||||||
const [searchSuggestions, setSearchSuggestions] = useState([]);
|
const [searchSuggestions, setSearchSuggestions] = useState([]);
|
||||||
|
const selectedProvider = providerOverride ?? initialProvider;
|
||||||
useEffect(() => {
|
|
||||||
const storedProvider = getStoredProvider();
|
|
||||||
let storedProviderKey = null;
|
|
||||||
storedProviderKey = Object.keys(searchProviders).find((pkey) => searchProviders[pkey] === storedProvider);
|
|
||||||
if (storedProvider && availableProviderIds.includes(storedProviderKey)) {
|
|
||||||
setSelectedProvider(storedProvider);
|
|
||||||
}
|
|
||||||
}, [availableProviderIds]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
@@ -130,8 +138,6 @@ export default function Search({ options }) {
|
|||||||
};
|
};
|
||||||
}, [selectedProvider, options, query, searchSuggestions]);
|
}, [selectedProvider, options, query, searchSuggestions]);
|
||||||
|
|
||||||
let currentSuggestion;
|
|
||||||
|
|
||||||
function doSearch(value) {
|
function doSearch(value) {
|
||||||
const q = encodeURIComponent(value);
|
const q = encodeURIComponent(value);
|
||||||
const { url } = selectedProvider;
|
const { url } = selectedProvider;
|
||||||
@@ -142,13 +148,11 @@ export default function Search({ options }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setQuery("");
|
setQuery("");
|
||||||
currentSuggestion = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSearchKeyDown = (event) => {
|
const handleSearchKeyDown = (event) => {
|
||||||
const useSuggestion = searchSuggestions.length && currentSuggestion;
|
if (event.key === "Enter" && !searchSuggestions[1]?.length) {
|
||||||
if (event.key === "Enter") {
|
doSearch(event.target.value);
|
||||||
doSearch(useSuggestion ? currentSuggestion : event.target.value);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -157,7 +161,7 @@ export default function Search({ options }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onChangeProvider = (provider) => {
|
const onChangeProvider = (provider) => {
|
||||||
setSelectedProvider(provider);
|
setProviderOverride(provider);
|
||||||
localStorage.setItem(localStorageKey, provider.name);
|
localStorage.setItem(localStorageKey, provider.name);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -166,7 +170,7 @@ export default function Search({ options }) {
|
|||||||
<Raw>
|
<Raw>
|
||||||
<div className="flex-col relative h-8 my-4 min-w-fit z-20">
|
<div className="flex-col relative h-8 my-4 min-w-fit z-20">
|
||||||
<div className="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none w-full text-theme-800 dark:text-white" />
|
<div className="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none w-full text-theme-800 dark:text-white" />
|
||||||
<Combobox value={query}>
|
<Combobox value={query} onChange={doSearch}>
|
||||||
<ComboboxInput
|
<ComboboxInput
|
||||||
type="text"
|
type="text"
|
||||||
className="
|
className="
|
||||||
@@ -178,6 +182,7 @@ export default function Search({ options }) {
|
|||||||
focus:border-theme-500 dark:focus:border-white/50
|
focus:border-theme-500 dark:focus:border-white/50
|
||||||
border border-theme-300 dark:border-theme-200/50"
|
border border-theme-300 dark:border-theme-200/50"
|
||||||
placeholder={t("search.placeholder")}
|
placeholder={t("search.placeholder")}
|
||||||
|
aria-label={t("search.placeholder")}
|
||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setQuery(event.target.value);
|
setQuery(event.target.value);
|
||||||
}}
|
}}
|
||||||
@@ -204,8 +209,8 @@ export default function Search({ options }) {
|
|||||||
bg-theme-600/40 dark:bg-white/10
|
bg-theme-600/40 dark:bg-white/10
|
||||||
focus:ring-theme-500 dark:focus:ring-white/50"
|
focus:ring-theme-500 dark:focus:ring-white/50"
|
||||||
>
|
>
|
||||||
<selectedProvider.icon className="text-white w-3 h-3" />
|
<selectedProvider.icon className="text-white w-3 h-3" aria-hidden="true" />
|
||||||
<span className="sr-only">{t("search.search")}</span>
|
<span className="sr-only">{t("search.provider", { name: selectedProvider.name })}</span>
|
||||||
</ListboxButton>
|
</ListboxButton>
|
||||||
</div>
|
</div>
|
||||||
<Transition
|
<Transition
|
||||||
@@ -218,6 +223,7 @@ export default function Search({ options }) {
|
|||||||
leaveTo="transform opacity-0 scale-95"
|
leaveTo="transform opacity-0 scale-95"
|
||||||
>
|
>
|
||||||
<ListboxOptions
|
<ListboxOptions
|
||||||
|
aria-label={t("search.select_provider")}
|
||||||
className="absolute right-0 z-10 mt-1 origin-top-right rounded-md
|
className="absolute right-0 z-10 mt-1 origin-top-right rounded-md
|
||||||
bg-theme-100 dark:bg-theme-600 shadow-lg
|
bg-theme-100 dark:bg-theme-600 shadow-lg
|
||||||
ring-1 ring-black ring-opacity-5 focus:outline-hidden"
|
ring-1 ring-black ring-opacity-5 focus:outline-hidden"
|
||||||
@@ -234,7 +240,8 @@ export default function Search({ options }) {
|
|||||||
active ? "bg-theme-600/10 dark:bg-white/10 dark:text-gray-900" : "dark:text-gray-100",
|
active ? "bg-theme-600/10 dark:bg-white/10 dark:text-gray-900" : "dark:text-gray-100",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<p.icon className="h-4 w-4 mx-4 my-2" />
|
<p.icon className="h-4 w-4 mx-4 my-2" aria-hidden="true" />
|
||||||
|
<span className="sr-only">{p.name}</span>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
</ListboxOption>
|
</ListboxOption>
|
||||||
@@ -248,32 +255,24 @@ export default function Search({ options }) {
|
|||||||
{searchSuggestions[1]?.length > 0 && (
|
{searchSuggestions[1]?.length > 0 && (
|
||||||
<ComboboxOptions className="mt-1 rounded-md bg-theme-50 dark:bg-theme-800 border border-theme-300 dark:border-theme-200/30 cursor-pointer shadow-lg">
|
<ComboboxOptions className="mt-1 rounded-md bg-theme-50 dark:bg-theme-800 border border-theme-300 dark:border-theme-200/30 cursor-pointer shadow-lg">
|
||||||
<div className="p-1 bg-white/50 dark:bg-white/10 text-theme-900/90 dark:text-white/90 text-xs">
|
<div className="p-1 bg-white/50 dark:bg-white/10 text-theme-900/90 dark:text-white/90 text-xs">
|
||||||
<ComboboxOption key={query} value={query} />
|
<ComboboxOption key={query} value={query}>
|
||||||
|
<span className="sr-only">{query}</span>
|
||||||
|
</ComboboxOption>
|
||||||
{searchSuggestions[1].map((suggestion) => (
|
{searchSuggestions[1].map((suggestion) => (
|
||||||
<ComboboxOption
|
<ComboboxOption key={suggestion} value={suggestion} className="flex w-full">
|
||||||
key={suggestion}
|
{({ active }) => (
|
||||||
value={suggestion}
|
<div
|
||||||
onMouseDown={() => {
|
className={classNames(
|
||||||
doSearch(suggestion);
|
"px-2 py-1 rounded-md w-full flex-nowrap",
|
||||||
}}
|
active ? "bg-theme-300/20 dark:bg-white/10" : "",
|
||||||
className="flex w-full"
|
)}
|
||||||
>
|
>
|
||||||
{({ active }) => {
|
<span className="whitespace-pre">{suggestion.indexOf(query) === 0 ? query : ""}</span>
|
||||||
if (active) currentSuggestion = suggestion;
|
<span className="mr-4 whitespace-pre opacity-50">
|
||||||
return (
|
{suggestion.indexOf(query) === 0 ? suggestion.substring(query.length) : suggestion}
|
||||||
<div
|
</span>
|
||||||
className={classNames(
|
</div>
|
||||||
"px-2 py-1 rounded-md w-full flex-nowrap",
|
)}
|
||||||
active ? "bg-theme-300/20 dark:bg-white/10" : "",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<span className="whitespace-pre">{suggestion.indexOf(query) === 0 ? query : ""}</span>
|
|
||||||
<span className="mr-4 whitespace-pre opacity-50">
|
|
||||||
{suggestion.indexOf(query) === 0 ? suggestion.substring(query.length) : suggestion}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</ComboboxOption>
|
</ComboboxOption>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { renderWithProviders } from "test-utils/render-with-providers";
|
|||||||
vi.mock("@headlessui/react", async () => {
|
vi.mock("@headlessui/react", async () => {
|
||||||
const React = await import("react");
|
const React = await import("react");
|
||||||
const { Fragment, createContext, useContext } = React;
|
const { Fragment, createContext, useContext } = React;
|
||||||
|
const ComboboxContext = createContext(null);
|
||||||
const ListboxContext = createContext(null);
|
const ListboxContext = createContext(null);
|
||||||
|
|
||||||
function passthrough({ as: As = "div", children, ...props }) {
|
function passthrough({ as: As = "div", children, ...props }) {
|
||||||
@@ -18,9 +19,21 @@ vi.mock("@headlessui/react", async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
Combobox: passthrough,
|
Combobox: ({ onChange, children }) => (
|
||||||
|
<ComboboxContext.Provider value={{ onChange }}>
|
||||||
|
<div>{children}</div>
|
||||||
|
</ComboboxContext.Provider>
|
||||||
|
),
|
||||||
ComboboxInput: (props) => <input {...props} />,
|
ComboboxInput: (props) => <input {...props} />,
|
||||||
ComboboxOption: passthrough,
|
ComboboxOption: ({ as: As = "div", value, children, ...props }) => {
|
||||||
|
const ctx = useContext(ComboboxContext);
|
||||||
|
const content = typeof children === "function" ? children({ active: false }) : children;
|
||||||
|
return (
|
||||||
|
<As value={value} onMouseDown={() => ctx?.onChange?.(value)} {...props}>
|
||||||
|
{content}
|
||||||
|
</As>
|
||||||
|
);
|
||||||
|
},
|
||||||
ComboboxOptions: passthrough,
|
ComboboxOptions: passthrough,
|
||||||
Listbox: ({ value, onChange, children, ...props }) => (
|
Listbox: ({ value, onChange, children, ...props }) => (
|
||||||
<ListboxContext.Provider value={{ value, onChange }}>
|
<ListboxContext.Provider value={{ value, onChange }}>
|
||||||
@@ -165,6 +178,28 @@ describe("components/widgets/search", () => {
|
|||||||
openSpy.mockRestore();
|
openSpy.mockRestore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("gives every provider option an accessible name", () => {
|
||||||
|
renderWithProviders(
|
||||||
|
<Search options={{ provider: ["google", "duckduckgo", "brave"], showSearchSuggestions: false }} />,
|
||||||
|
{ settings: {} },
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(screen.getAllByRole("option").map((option) => option.textContent)).toEqual([
|
||||||
|
"Google",
|
||||||
|
"DuckDuckGo",
|
||||||
|
"Brave",
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("labels the search input and the provider button", () => {
|
||||||
|
renderWithProviders(<Search options={{ provider: ["google", "duckduckgo"], showSearchSuggestions: false }} />, {
|
||||||
|
settings: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(screen.getByRole("textbox")).toHaveAccessibleName("search.placeholder");
|
||||||
|
expect(screen.getByRole("button")).toHaveAccessibleName(/search\.provider/);
|
||||||
|
});
|
||||||
|
|
||||||
it("fetches search suggestions and triggers a search when a suggestion is selected", async () => {
|
it("fetches search suggestions and triggers a search when a suggestion is selected", async () => {
|
||||||
const openSpy = vi.spyOn(window, "open").mockImplementation(() => null);
|
const openSpy = vi.spyOn(window, "open").mockImplementation(() => null);
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
|
|||||||
export default function Widget({ options }) {
|
export default function Widget({ options }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
options.service_group = options.service_name = "unifi_console";
|
const widgetOptions = { ...options, service_group: "unifi_console", service_name: "unifi_console" };
|
||||||
const { data: statsData, error: statsError } = useWidgetAPI(options, "stat/sites", { index: options.index });
|
const { data: statsData, error: statsError } = useWidgetAPI(widgetOptions, "stat/sites", { index: options.index });
|
||||||
|
|
||||||
if (statsError) {
|
if (statsError) {
|
||||||
return <Error options={options} />;
|
return <Error options={widgetOptions} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultSite = options.site
|
const defaultSite = options.site
|
||||||
@@ -27,27 +27,27 @@ export default function Widget({ options }) {
|
|||||||
|
|
||||||
if (!defaultSite) {
|
if (!defaultSite) {
|
||||||
return (
|
return (
|
||||||
<Container options={options} additionalClassNames="information-widget-unifi-console">
|
<Container options={widgetOptions} additionalClassNames="information-widget-unifi-console">
|
||||||
<PrimaryText>{t("unifi.wait")}</PrimaryText>
|
<PrimaryText>{t("unifi.wait")}</PrimaryText>
|
||||||
<WidgetIcon icon={SiUbiquiti} />
|
<WidgetIcon icon={SiUbiquiti} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const wan = defaultSite.health.find((h) => h.subsystem === "wan");
|
const getHealth = (subsystem) => {
|
||||||
const lan = defaultSite.health.find((h) => h.subsystem === "lan");
|
const health = defaultSite.health.find((item) => item.subsystem === subsystem) ?? { status: "unknown" };
|
||||||
const wlan = defaultSite.health.find((h) => h.subsystem === "wlan");
|
return { ...health, up: health.status === "ok", show: health.status !== "unknown" };
|
||||||
[wan, lan, wlan].forEach((s) => {
|
};
|
||||||
s.up = s.status === "ok";
|
const wan = getHealth("wan");
|
||||||
s.show = s.status !== "unknown";
|
const lan = getHealth("lan");
|
||||||
});
|
const wlan = getHealth("wlan");
|
||||||
const name = wan.gw_name ?? defaultSite.desc;
|
const name = wan.gw_name ?? defaultSite.desc;
|
||||||
const uptime = wan["gw_system-stats"] ? wan["gw_system-stats"].uptime : null;
|
const uptime = wan["gw_system-stats"] ? wan["gw_system-stats"].uptime : null;
|
||||||
|
|
||||||
const dataEmpty = !(wan.show || lan.show || wlan.show || uptime);
|
const dataEmpty = !(wan.show || lan.show || wlan.show || uptime);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container options={options} additionalClassNames="information-widget-unifi-console">
|
<Container options={widgetOptions} additionalClassNames="information-widget-unifi-console">
|
||||||
<Raw>
|
<Raw>
|
||||||
<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">
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
|
|||||||
@@ -40,32 +40,41 @@ describe("components/widgets/unifi_console", () => {
|
|||||||
|
|
||||||
it("renders a wait state when no site is available yet", () => {
|
it("renders a wait state when no site is available yet", () => {
|
||||||
useWidgetAPI.mockReturnValue({ data: undefined, error: undefined });
|
useWidgetAPI.mockReturnValue({ data: undefined, error: undefined });
|
||||||
|
const options = Object.freeze({ index: 0 });
|
||||||
|
|
||||||
renderWithProviders(<UnifiConsole options={{ index: 0 }} />, { settings: { target: "_self" } });
|
renderWithProviders(<UnifiConsole options={options} />, { settings: { target: "_self" } });
|
||||||
|
|
||||||
expect(screen.getByText("unifi.wait")).toBeInTheDocument();
|
expect(screen.getByText("unifi.wait")).toBeInTheDocument();
|
||||||
|
expect(useWidgetAPI).toHaveBeenCalledWith(
|
||||||
|
{ index: 0, service_group: "unifi_console", service_name: "unifi_console" },
|
||||||
|
"stat/sites",
|
||||||
|
{ index: 0 },
|
||||||
|
);
|
||||||
|
expect(options).toEqual({ index: 0 });
|
||||||
});
|
});
|
||||||
|
|
||||||
it("renders site name and uptime when data is available", () => {
|
it("renders site name and uptime when data is available", () => {
|
||||||
|
const data = {
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
name: "default",
|
||||||
|
desc: "Home",
|
||||||
|
health: [
|
||||||
|
{
|
||||||
|
subsystem: "wan",
|
||||||
|
status: "ok",
|
||||||
|
gw_name: "Router",
|
||||||
|
"gw_system-stats": { uptime: 172800 },
|
||||||
|
},
|
||||||
|
{ subsystem: "lan", status: "unknown" },
|
||||||
|
{ subsystem: "wlan", status: "unknown" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const originalData = structuredClone(data);
|
||||||
useWidgetAPI.mockReturnValue({
|
useWidgetAPI.mockReturnValue({
|
||||||
data: {
|
data,
|
||||||
data: [
|
|
||||||
{
|
|
||||||
name: "default",
|
|
||||||
desc: "Home",
|
|
||||||
health: [
|
|
||||||
{
|
|
||||||
subsystem: "wan",
|
|
||||||
status: "ok",
|
|
||||||
gw_name: "Router",
|
|
||||||
"gw_system-stats": { uptime: 172800 },
|
|
||||||
},
|
|
||||||
{ subsystem: "lan", status: "unknown" },
|
|
||||||
{ subsystem: "wlan", status: "unknown" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
error: undefined,
|
error: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -75,6 +84,7 @@ describe("components/widgets/unifi_console", () => {
|
|||||||
// common.number is mocked to return the numeric value as a string.
|
// common.number is mocked to return the numeric value as a string.
|
||||||
expect(screen.getByText("2")).toBeInTheDocument();
|
expect(screen.getByText("2")).toBeInTheDocument();
|
||||||
expect(screen.getByText("unifi.days")).toBeInTheDocument();
|
expect(screen.getByText("unifi.days")).toBeInTheDocument();
|
||||||
|
expect(data).toEqual(originalData);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("selects a site by description when options.site is set", () => {
|
it("selects a site by description when options.site is set", () => {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import ErrorBoundary from "components/errorboundry";
|
|
||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
|
|
||||||
|
import ErrorBoundary from "components/errorboundry";
|
||||||
|
|
||||||
const widgetMappings = {
|
const widgetMappings = {
|
||||||
weatherapi: dynamic(() => import("components/widgets/weather/weather")),
|
weatherapi: dynamic(() => import("components/widgets/weather/weather")),
|
||||||
openweathermap: dynamic(() => import("components/widgets/openweathermap/weather")),
|
openweathermap: dynamic(() => import("components/widgets/openweathermap/weather")),
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
|
||||||
|
|
||||||
import PrimaryText from "./primary_text";
|
import PrimaryText from "./primary_text";
|
||||||
import Raw from "./raw";
|
import Raw from "./raw";
|
||||||
import SecondaryText from "./secondary_text";
|
import SecondaryText from "./secondary_text";
|
||||||
import WidgetIcon from "./widget_icon";
|
import WidgetIcon from "./widget_icon";
|
||||||
|
|
||||||
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
export function getAllClasses(options, additionalClassNames = "") {
|
export function getAllClasses(options, additionalClassNames = "") {
|
||||||
if (options?.style?.header === "boxedWidgets") {
|
if (options?.style?.header === "boxedWidgets") {
|
||||||
if (options?.style?.cardBlur !== undefined) {
|
if (options?.style?.cardBlur !== undefined) {
|
||||||
|
|||||||
+3
-2
@@ -5,13 +5,14 @@ import "styles/globals.css";
|
|||||||
import "styles/manrope.css";
|
import "styles/manrope.css";
|
||||||
import "styles/theme.css";
|
import "styles/theme.css";
|
||||||
import { SWRConfig } from "swr";
|
import { SWRConfig } from "swr";
|
||||||
|
|
||||||
|
import nextI18nextConfig from "../../next-i18next.config";
|
||||||
|
|
||||||
import { ColorProvider } from "utils/contexts/color";
|
import { ColorProvider } from "utils/contexts/color";
|
||||||
import { SettingsProvider } from "utils/contexts/settings";
|
import { SettingsProvider } from "utils/contexts/settings";
|
||||||
import { TabProvider } from "utils/contexts/tab";
|
import { TabProvider } from "utils/contexts/tab";
|
||||||
import { ThemeProvider } from "utils/contexts/theme";
|
import { ThemeProvider } from "utils/contexts/theme";
|
||||||
|
|
||||||
import nextI18nextConfig from "../../next-i18next.config";
|
|
||||||
|
|
||||||
const tailwindSafelist = [
|
const tailwindSafelist = [
|
||||||
// TODO: remove pending https://github.com/tailwindlabs/tailwindcss/pull/17147
|
// TODO: remove pending https://github.com/tailwindlabs/tailwindcss/pull/17147
|
||||||
"backdrop-blur",
|
"backdrop-blur",
|
||||||
|
|||||||
@@ -71,6 +71,16 @@ function logFailedPasswordSignIn() {
|
|||||||
createLogger("nextauth").warn("Failed password sign-in attempt");
|
createLogger("nextauth").warn("Failed password sign-in attempt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function logNextAuthError(code, metadata) {
|
||||||
|
const error = metadata instanceof Error ? metadata : metadata?.error;
|
||||||
|
|
||||||
|
if (error?.message) {
|
||||||
|
createLogger("nextauth").error("%s: %s", code, error.message);
|
||||||
|
} else {
|
||||||
|
createLogger("nextauth").error("%s", code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let providers = [];
|
let providers = [];
|
||||||
if (authEnabled) {
|
if (authEnabled) {
|
||||||
if (hasOidcConfig) {
|
if (hasOidcConfig) {
|
||||||
@@ -140,7 +150,7 @@ export const authOptions = {
|
|||||||
signIn: "/auth/signin",
|
signIn: "/auth/signin",
|
||||||
},
|
},
|
||||||
logger: {
|
logger: {
|
||||||
error: (code) => createLogger("nextauth").error("%s", code),
|
error: logNextAuthError,
|
||||||
warn: (code) => createLogger("nextauth").warn("%s", code),
|
warn: (code) => createLogger("nextauth").warn("%s", code),
|
||||||
debug: (code) => createLogger("nextauth").debug("%s", code),
|
debug: (code) => createLogger("nextauth").debug("%s", code),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { searchProviders } from "components/widgets/search/search";
|
import { searchProviders } from "components/widgets/search/search";
|
||||||
|
|
||||||
import { getSettings } from "utils/config/config";
|
import { getSettings } from "utils/config/config";
|
||||||
import { widgetsFromConfig } from "utils/config/widget-helpers";
|
import { widgetsFromConfig } from "utils/config/widget-helpers";
|
||||||
import { cachedRequest } from "utils/proxy/http";
|
import { cachedRequest } from "utils/proxy/http";
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ export default async function handler(req, res) {
|
|||||||
if (serviceProxyHandler instanceof Function) {
|
if (serviceProxyHandler instanceof Function) {
|
||||||
// quick return for no endpoint services, calendar is an exception
|
// quick return for no endpoint services, calendar is an exception
|
||||||
if (!req.query.endpoint || serviceProxyHandler === calendarProxyHandler) {
|
if (!req.query.endpoint || serviceProxyHandler === calendarProxyHandler) {
|
||||||
|
req.method = "GET";
|
||||||
|
req.body = undefined;
|
||||||
return await serviceProxyHandler(req, res);
|
return await serviceProxyHandler(req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +88,7 @@ export default async function handler(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
req.method = mapping?.method || "GET";
|
req.method = mapping?.method || "GET";
|
||||||
if (mapping?.body) req.body = mapping?.body;
|
req.body = mapping?.body;
|
||||||
req.query.endpoint = endpoint;
|
req.query.endpoint = endpoint;
|
||||||
|
|
||||||
if (mapping.segments || req.query.segments) {
|
if (mapping.segments || req.query.segments) {
|
||||||
@@ -125,6 +127,8 @@ export default async function handler(req, res) {
|
|||||||
|
|
||||||
if (widget.allowedEndpoints instanceof RegExp) {
|
if (widget.allowedEndpoints instanceof RegExp) {
|
||||||
if (widget.allowedEndpoints.test(req.query.endpoint)) {
|
if (widget.allowedEndpoints.test(req.query.endpoint)) {
|
||||||
|
req.method = "GET";
|
||||||
|
req.body = undefined;
|
||||||
return await serviceProxyHandler(req, res);
|
return await serviceProxyHandler(req, res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,229 @@
|
|||||||
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
|
import createMockRes from "test-utils/create-mock-res";
|
||||||
|
|
||||||
|
const { getServiceWidget, logger, genericHandler, allowedHandler, mappedHandler, calendarHandler } = vi.hoisted(() => ({
|
||||||
|
getServiceWidget: vi.fn(),
|
||||||
|
logger: { debug: vi.fn(), error: vi.fn() },
|
||||||
|
genericHandler: vi.fn(),
|
||||||
|
allowedHandler: vi.fn(),
|
||||||
|
mappedHandler: vi.fn(),
|
||||||
|
calendarHandler: vi.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
vi.mock("utils/logger", () => ({
|
||||||
|
default: () => logger,
|
||||||
|
}));
|
||||||
|
vi.mock("utils/config/service-helpers", () => ({
|
||||||
|
default: getServiceWidget,
|
||||||
|
}));
|
||||||
|
vi.mock("widgets/calendar/proxy", () => ({
|
||||||
|
default: calendarHandler,
|
||||||
|
}));
|
||||||
|
|
||||||
|
vi.mock("widgets/widgets", () => ({
|
||||||
|
default: {
|
||||||
|
noendpoint: {
|
||||||
|
api: "{url}",
|
||||||
|
proxyHandler: genericHandler,
|
||||||
|
},
|
||||||
|
allowed: {
|
||||||
|
api: "{url}/api/{endpoint}",
|
||||||
|
proxyHandler: allowedHandler,
|
||||||
|
allowedEndpoints: /^status$/,
|
||||||
|
},
|
||||||
|
mapped: {
|
||||||
|
api: "{url}/{endpoint}",
|
||||||
|
proxyHandler: mappedHandler,
|
||||||
|
mappings: {
|
||||||
|
Sessions: {
|
||||||
|
endpoint: "Sessions",
|
||||||
|
},
|
||||||
|
Pause: {
|
||||||
|
method: "POST",
|
||||||
|
endpoint: "Sessions/Playing/Pause",
|
||||||
|
body: "mapping-body",
|
||||||
|
},
|
||||||
|
Refresh: {
|
||||||
|
method: "POST",
|
||||||
|
endpoint: "Sessions/Refresh",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ical: {
|
||||||
|
api: "{url}",
|
||||||
|
proxyHandler: calendarHandler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
import handler from "./proxy";
|
||||||
|
|
||||||
|
function createReq({ method = "GET", body, query = {} } = {}) {
|
||||||
|
return { method, body, query };
|
||||||
|
}
|
||||||
|
|
||||||
|
describe("pages/api/services/proxy", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("client request shaping", () => {
|
||||||
|
it("forces GET and drops the body on the no-endpoint quick return", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "noendpoint", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "POST",
|
||||||
|
body: '{"cmd":"delete_all"}',
|
||||||
|
query: { group: "g", service: "svc", index: "0" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
expect(genericHandler).toHaveBeenCalledTimes(1);
|
||||||
|
const forwarded = genericHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("GET");
|
||||||
|
expect(forwarded.body).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(["PUT", "DELETE", "PATCH"])("forces GET for a %s on the no-endpoint quick return", async (method) => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "noendpoint", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({ method, body: "payload", query: { group: "g", service: "svc", index: "0" } });
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
const forwarded = genericHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("GET");
|
||||||
|
expect(forwarded.body).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("forces GET and drops the body on the allowedEndpoints path", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "allowed", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "DELETE",
|
||||||
|
body: "payload",
|
||||||
|
query: { group: "g", service: "svc", endpoint: "status", index: "0" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
expect(allowedHandler).toHaveBeenCalledTimes(1);
|
||||||
|
const forwarded = allowedHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("GET");
|
||||||
|
expect(forwarded.body).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("forces GET and drops the body on the calendar exception path", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "calendar", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "POST",
|
||||||
|
body: "payload",
|
||||||
|
query: { group: "g", service: "svc", endpoint: "events", index: "0" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
expect(calendarHandler).toHaveBeenCalledTimes(1);
|
||||||
|
const forwarded = calendarHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("GET");
|
||||||
|
expect(forwarded.body).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("forces GET for a mapping that does not declare a method", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "mapped", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "POST",
|
||||||
|
body: "payload",
|
||||||
|
query: { group: "g", service: "svc", endpoint: "Sessions", index: "0" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
const forwarded = mappedHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("GET");
|
||||||
|
expect(forwarded.body).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("drops a client body when a non-GET mapping does not declare one", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "mapped", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "POST",
|
||||||
|
body: "attacker-controlled",
|
||||||
|
query: { group: "g", service: "svc", endpoint: "Refresh", index: "0" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
const forwarded = mappedHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("POST");
|
||||||
|
expect(forwarded.body).toBeUndefined();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("mapping opt-in", () => {
|
||||||
|
it("still allows a mapping to declare a non-GET method and body", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "mapped", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "POST",
|
||||||
|
query: { group: "g", service: "svc", endpoint: "Pause", index: "0" },
|
||||||
|
});
|
||||||
|
|
||||||
|
await handler(req, createMockRes());
|
||||||
|
|
||||||
|
expect(mappedHandler).toHaveBeenCalledTimes(1);
|
||||||
|
const forwarded = mappedHandler.mock.calls[0][0];
|
||||||
|
expect(forwarded.method).toBe("POST");
|
||||||
|
expect(forwarded.body).toBe("mapping-body");
|
||||||
|
expect(forwarded.query.endpoint).toBe("Sessions/Playing/Pause");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("rejects a method that does not match the mapping", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "mapped", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({
|
||||||
|
method: "GET",
|
||||||
|
query: { group: "g", service: "svc", endpoint: "Pause", index: "0" },
|
||||||
|
});
|
||||||
|
const res = createMockRes();
|
||||||
|
|
||||||
|
await handler(req, res);
|
||||||
|
|
||||||
|
expect(mappedHandler).not.toHaveBeenCalled();
|
||||||
|
expect(res.statusCode).toBe(403);
|
||||||
|
expect(res.body).toEqual({ error: "Unsupported method" });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("dispatch guards", () => {
|
||||||
|
it("rejects an endpoint that fails the allowedEndpoints test", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "allowed", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({ query: { group: "g", service: "svc", endpoint: "shutdown", index: "0" } });
|
||||||
|
const res = createMockRes();
|
||||||
|
|
||||||
|
await handler(req, res);
|
||||||
|
|
||||||
|
expect(allowedHandler).not.toHaveBeenCalled();
|
||||||
|
expect(res.statusCode).toBe(403);
|
||||||
|
expect(res.body).toEqual({ error: "Unmapped proxy request." });
|
||||||
|
});
|
||||||
|
|
||||||
|
it("rejects an unknown widget type", async () => {
|
||||||
|
getServiceWidget.mockResolvedValue({ type: "nope", url: "http://example" });
|
||||||
|
|
||||||
|
const req = createReq({ query: { group: "g", service: "svc", index: "0" } });
|
||||||
|
const res = createMockRes();
|
||||||
|
|
||||||
|
await handler(req, res);
|
||||||
|
|
||||||
|
expect(res.statusCode).toBe(403);
|
||||||
|
expect(res.body).toEqual({ error: "Unknown proxy service type" });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
+46
-39
@@ -1,4 +1,14 @@
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
import { useTranslation } from "next-i18next/pages";
|
||||||
|
import { serverSideTranslations } from "next-i18next/pages/serverSideTranslations";
|
||||||
|
import dynamic from "next/dynamic";
|
||||||
|
import Head from "next/head";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import Script from "next/script";
|
||||||
|
import { useCallback, useContext, useEffect, useMemo, useState } from "react";
|
||||||
|
import { BiError } from "react-icons/bi";
|
||||||
|
import useSWR, { SWRConfig } from "swr";
|
||||||
|
|
||||||
import BookmarksGroup from "components/bookmarks/group";
|
import BookmarksGroup from "components/bookmarks/group";
|
||||||
import ErrorBoundary from "components/errorboundry";
|
import ErrorBoundary from "components/errorboundry";
|
||||||
import QuickLaunch from "components/quicklaunch";
|
import QuickLaunch from "components/quicklaunch";
|
||||||
@@ -6,22 +16,12 @@ import ServicesGroup from "components/services/group";
|
|||||||
import Tab, { slugifyAndEncode } from "components/tab";
|
import Tab, { slugifyAndEncode } from "components/tab";
|
||||||
import Revalidate from "components/toggles/revalidate";
|
import Revalidate from "components/toggles/revalidate";
|
||||||
import Widget from "components/widgets/widget";
|
import Widget from "components/widgets/widget";
|
||||||
import { useTranslation } from "next-i18next/pages";
|
import { bookmarksResponse, servicesResponse, widgetsResponse } from "utils/config/api-response";
|
||||||
import { serverSideTranslations } from "next-i18next/pages/serverSideTranslations";
|
import { getSettings } from "utils/config/config";
|
||||||
import dynamic from "next/dynamic";
|
|
||||||
import Head from "next/head";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import Script from "next/script";
|
|
||||||
import { useContext, useEffect, useMemo, useState } from "react";
|
|
||||||
import { BiError } from "react-icons/bi";
|
|
||||||
import useSWR, { SWRConfig } from "swr";
|
|
||||||
import { ColorContext } from "utils/contexts/color";
|
import { ColorContext } from "utils/contexts/color";
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
import { TabContext } from "utils/contexts/tab";
|
import { TabContext } from "utils/contexts/tab";
|
||||||
import { ThemeContext } from "utils/contexts/theme";
|
import { ThemeContext } from "utils/contexts/theme";
|
||||||
|
|
||||||
import { bookmarksResponse, servicesResponse, widgetsResponse } from "utils/config/api-response";
|
|
||||||
import { getSettings } from "utils/config/config";
|
|
||||||
import useWindowFocus from "utils/hooks/window-focus";
|
import useWindowFocus from "utils/hooks/window-focus";
|
||||||
import createLogger from "utils/logger";
|
import createLogger from "utils/logger";
|
||||||
import themes from "utils/styles/themes";
|
import themes from "utils/styles/themes";
|
||||||
@@ -102,7 +102,29 @@ function Index({ initialSettings, fallback }) {
|
|||||||
const [stale, setStale] = useState(false);
|
const [stale, setStale] = useState(false);
|
||||||
const { data: errorsData } = useSWR("/api/validate");
|
const { data: errorsData } = useSWR("/api/validate");
|
||||||
const { error: validateError } = errorsData || {};
|
const { error: validateError } = errorsData || {};
|
||||||
const { data: hashData, mutate: mutateHash } = useSWR("/api/hash");
|
|
||||||
|
const handleHashData = useCallback((hashData) => {
|
||||||
|
if (typeof window === "undefined" || !hashData?.hash) return;
|
||||||
|
|
||||||
|
const previousHash = localStorage.getItem("hash");
|
||||||
|
|
||||||
|
if (!previousHash) {
|
||||||
|
localStorage.setItem("hash", hashData.hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (previousHash && previousHash !== hashData.hash) {
|
||||||
|
setStale(true);
|
||||||
|
localStorage.setItem("hash", hashData.hash);
|
||||||
|
|
||||||
|
fetch("/api/revalidate").then((res) => {
|
||||||
|
if (res.ok) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const { mutate: mutateHash } = useSWR("/api/hash", { onSuccess: handleHashData });
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (windowFocused) {
|
if (windowFocused) {
|
||||||
@@ -110,29 +132,6 @@ function Index({ initialSettings, fallback }) {
|
|||||||
}
|
}
|
||||||
}, [windowFocused, mutateHash]);
|
}, [windowFocused, mutateHash]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (hashData) {
|
|
||||||
if (typeof window !== "undefined") {
|
|
||||||
const previousHash = localStorage.getItem("hash");
|
|
||||||
|
|
||||||
if (!previousHash) {
|
|
||||||
localStorage.setItem("hash", hashData.hash);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (previousHash && previousHash !== hashData.hash) {
|
|
||||||
setStale(true);
|
|
||||||
localStorage.setItem("hash", hashData.hash);
|
|
||||||
|
|
||||||
fetch("/api/revalidate").then((res) => {
|
|
||||||
if (res.ok) {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, [hashData]);
|
|
||||||
|
|
||||||
if (validateError) {
|
if (validateError) {
|
||||||
return (
|
return (
|
||||||
<div className="w-full h-screen container m-auto justify-center p-10 pointer-events-none">
|
<div className="w-full h-screen container m-auto justify-center p-10 pointer-events-none">
|
||||||
@@ -264,6 +263,13 @@ function Home({ initialSettings }) {
|
|||||||
e.key.match(/([à-ü]|[À-Ü]|!)/g) ||
|
e.key.match(/([à-ü]|[À-Ü]|!)/g) ||
|
||||||
(e.key === "v" && (e.ctrlKey || e.metaKey))
|
(e.key === "v" && (e.ctrlKey || e.metaKey))
|
||||||
) {
|
) {
|
||||||
|
if (e.key.length === 1 && !(e.key === "v" && (e.ctrlKey || e.metaKey))) {
|
||||||
|
e.preventDefault();
|
||||||
|
// whitespace opens the search but shouldn't be in it
|
||||||
|
if (e.key.trim()) {
|
||||||
|
setSearchString((currentSearchString) => currentSearchString + e.key);
|
||||||
|
}
|
||||||
|
}
|
||||||
setSearching(true);
|
setSearching(true);
|
||||||
} else if (e.key === "Escape") {
|
} else if (e.key === "Escape") {
|
||||||
setSearchString("");
|
setSearchString("");
|
||||||
@@ -420,10 +426,11 @@ function Home({ initialSettings }) {
|
|||||||
/>
|
/>
|
||||||
{settings.disableIndexing && <meta name="robots" content="noindex, nofollow" />}
|
{settings.disableIndexing && <meta name="robots" content="noindex, nofollow" />}
|
||||||
{settings.base && <base href={settings.base} />}
|
{settings.base && <base href={settings.base} />}
|
||||||
{settings.favicon ? (
|
{/* from props, not context so its set before running JS */}
|
||||||
|
{initialSettings.favicon ? (
|
||||||
<>
|
<>
|
||||||
<link rel="icon" href={settings.favicon} />
|
<link rel="icon" href={initialSettings.favicon} />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href={settings.favicon} />
|
<link rel="apple-touch-icon" sizes="180x180" href={initialSettings.favicon} />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { render } from "@testing-library/react";
|
import { render } from "@testing-library/react";
|
||||||
|
|
||||||
import { SettingsContext } from "utils/contexts/settings";
|
import { SettingsContext } from "utils/contexts/settings";
|
||||||
|
|
||||||
export function renderWithProviders(ui, { settings = {} } = {}) {
|
export function renderWithProviders(ui, { settings = {} } = {}) {
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ export function ColorProvider({ initialTheme, children }) {
|
|||||||
lastColor = rawColor;
|
lastColor = rawColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (initialTheme !== undefined) setColor(initialTheme ?? getInitialColor());
|
|
||||||
}, [initialTheme]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
rawSetColor(color);
|
rawSetColor(color);
|
||||||
}, [color]);
|
}, [color]);
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
import { createContext, useEffect, useMemo, useState } from "react";
|
import { createContext, useMemo, useState } from "react";
|
||||||
|
|
||||||
export const SettingsContext = createContext();
|
export const SettingsContext = createContext();
|
||||||
|
|
||||||
export function SettingsProvider({ initialSettings, children }) {
|
export function SettingsProvider({ initialSettings, children }) {
|
||||||
const [settings, setSettings] = useState(() => initialSettings ?? {});
|
const [settings, setSettings] = useState(() => initialSettings ?? {});
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (initialSettings !== undefined) setSettings(initialSettings ?? {});
|
|
||||||
}, [initialSettings]);
|
|
||||||
|
|
||||||
const value = useMemo(() => ({ settings, setSettings }), [settings]);
|
const value = useMemo(() => ({ settings, setSettings }), [settings]);
|
||||||
|
|
||||||
return <SettingsContext.Provider value={value}>{children}</SettingsContext.Provider>;
|
return <SettingsContext.Provider value={value}>{children}</SettingsContext.Provider>;
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
import { createContext, useEffect, useMemo, useState } from "react";
|
import { createContext, useMemo, useState } from "react";
|
||||||
|
|
||||||
export const TabContext = createContext();
|
export const TabContext = createContext();
|
||||||
|
|
||||||
export function TabProvider({ initialTab, children }) {
|
export function TabProvider({ initialTab, children }) {
|
||||||
const [activeTab, setActiveTab] = useState(() => initialTab ?? false);
|
const [activeTab, setActiveTab] = useState(() => initialTab ?? false);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (initialTab !== undefined) setActiveTab(initialTab ?? false);
|
|
||||||
}, [initialTab]);
|
|
||||||
|
|
||||||
const value = useMemo(() => ({ activeTab, setActiveTab }), [activeTab]);
|
const value = useMemo(() => ({ activeTab, setActiveTab }), [activeTab]);
|
||||||
|
|
||||||
return <TabContext.Provider value={value}>{children}</TabContext.Provider>;
|
return <TabContext.Provider value={value}>{children}</TabContext.Provider>;
|
||||||
|
|||||||
@@ -31,10 +31,6 @@ export function ThemeProvider({ initialTheme, children }) {
|
|||||||
localStorage.setItem("theme-mode", rawTheme);
|
localStorage.setItem("theme-mode", rawTheme);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (initialTheme !== undefined) setTheme(initialTheme ?? getInitialTheme());
|
|
||||||
}, [initialTheme]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
rawSetTheme(theme);
|
rawSetTheme(theme);
|
||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
import { useSyncExternalStore } from "react";
|
||||||
|
|
||||||
|
const MINUTE = 60_000;
|
||||||
|
const stores = new Map();
|
||||||
|
|
||||||
|
function getStore(refreshInterval) {
|
||||||
|
const existing = stores.get(refreshInterval);
|
||||||
|
if (existing) return existing;
|
||||||
|
|
||||||
|
const listeners = new Set();
|
||||||
|
let now = null; // null until mounted, so SSR and hydration render the same thing
|
||||||
|
let timer = null;
|
||||||
|
|
||||||
|
const store = {
|
||||||
|
getSnapshot: () => now,
|
||||||
|
subscribe: (onStoreChange) => {
|
||||||
|
listeners.add(onStoreChange);
|
||||||
|
|
||||||
|
if (!timer) {
|
||||||
|
now = Date.now();
|
||||||
|
timer = setInterval(() => {
|
||||||
|
now = Date.now();
|
||||||
|
listeners.forEach((listener) => listener());
|
||||||
|
}, refreshInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
listeners.delete(onStoreChange);
|
||||||
|
if (!listeners.size) {
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
stores.set(refreshInterval, store);
|
||||||
|
return store;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns null on the server and during hydration, then the current time.
|
||||||
|
export default function useCurrentTime(refreshInterval = MINUTE) {
|
||||||
|
const { subscribe, getSnapshot } = getStore(refreshInterval);
|
||||||
|
return useSyncExternalStore(subscribe, getSnapshot, () => null);
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user