Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
190e30dcf5 | ||
|
|
bd99c2cfaf | ||
|
|
cc7e5ddcb5 | ||
|
|
4eacce3e0b | ||
|
|
3b44d13791 | ||
|
|
d809398e64 | ||
|
|
3199a7f242 | ||
|
|
748f59f444 | ||
|
|
ab51d2f274 | ||
|
|
f5b3c5c442 | ||
|
|
7151abdb88 | ||
|
|
76154b5752 | ||
|
|
0d2675e1bb |
No files matched your search
@@ -1,191 +0,0 @@
|
|||||||
---
|
|
||||||
description: Comprehensive Homarr codebase architecture and conventions reference
|
|
||||||
alwaysApply: true
|
|
||||||
---
|
|
||||||
|
|
||||||
# Homarr Codebase Context
|
|
||||||
|
|
||||||
Homarr is an open-source, self-hosted dashboard for managing homelab services. It integrates with 50+ self-hosted apps (media servers, download clients, DNS, NAS, etc.) and provides a drag-and-drop widget-based UI.
|
|
||||||
|
|
||||||
## Tech Stack
|
|
||||||
|
|
||||||
- **Monorepo**: pnpm workspaces + Turborepo
|
|
||||||
- **Framework**: Next.js (App Router, `output: "standalone"`) — T3 Stack
|
|
||||||
- **Language**: TypeScript throughout
|
|
||||||
- **ORM**: Drizzle (supports SQLite via better-sqlite3, MySQL, PostgreSQL)
|
|
||||||
- **API**: tRPC (HTTP + WebSocket subscriptions) with superjson + OpenAPI bridge via `trpc-to-openapi`
|
|
||||||
- **Auth**: NextAuth v5 (database sessions, Credentials/LDAP/OIDC providers)
|
|
||||||
- **UI**: Mantine v7 (not Tailwind) + Tabler icons
|
|
||||||
- **State**: Jotai (atoms), TanStack Query (server state via tRPC)
|
|
||||||
- **Realtime**: WebSocket server (`ws`) for tRPC subscriptions, backed by Redis pub/sub
|
|
||||||
- **Cron**: `node-cron` in a standalone Fastify service (`apps/tasks`)
|
|
||||||
- **i18n**: next-intl with `[locale]` dynamic segment (prefix mode: `"never"`, locale from cookie)
|
|
||||||
- **Testing**: Vitest + jsdom, Playwright for E2E
|
|
||||||
- **Package manager**: pnpm 10.33.2, Node >= 24.15.0
|
|
||||||
|
|
||||||
## Repository Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
homarr/
|
|
||||||
├── apps/
|
|
||||||
│ ├── nextjs/ # Main Next.js application (port 3000)
|
|
||||||
│ ├── tasks/ # Cron job runner + Fastify tRPC API (port 3002)
|
|
||||||
│ └── websocket/ # Standalone tRPC WebSocket server (port 3001)
|
|
||||||
├── packages/
|
|
||||||
│ ├── api/ # tRPC appRouter, procedures, OpenAPI
|
|
||||||
│ ├── auth/ # NextAuth config, providers, session, API keys
|
|
||||||
│ ├── db/ # Drizzle schema (3 DB drivers), migrations, queries
|
|
||||||
│ ├── core/ # Env validation, DB/Redis driver factories, logging
|
|
||||||
│ ├── definitions/ # Domain enums: WidgetKind, IntegrationKind, permissions
|
|
||||||
│ ├── widgets/ # All 39 dashboard widgets (definitions + components)
|
|
||||||
│ ├── integrations/ # Integration classes (HTTP clients to external apps)
|
|
||||||
│ ├── redis/ # Redis pub/sub channels, caching abstractions
|
|
||||||
│ ├── translation/ # next-intl setup, locale configs, lang JSON files
|
|
||||||
│ ├── ui/ # Shared Mantine components, theme, hooks
|
|
||||||
│ ├── validation/ # Shared zod schemas for API/forms
|
|
||||||
│ ├── common/ # Shared utilities, IDs, errors
|
|
||||||
│ ├── cron-jobs/ # Cron job implementations (25+ jobs)
|
|
||||||
│ ├── cron-jobs-core/ # Cron scheduling primitives
|
|
||||||
│ ├── cron-job-api/ # tRPC router for job management (start/stop/trigger)
|
|
||||||
│ ├── cron-job-status/ # Cron status via Redis
|
|
||||||
│ ├── boards/ # Board context, edit mode, cache updater
|
|
||||||
│ ├── modals/ # Modal primitives on Mantine
|
|
||||||
│ ├── modals-collection/ # Feature modals (apps, boards, docker, etc.)
|
|
||||||
│ ├── form/ # useZodForm (Mantine + zod resolver)
|
|
||||||
│ ├── forms-collection/# Reusable form UIs (new app, icon picker, upload)
|
|
||||||
│ ├── spotlight/ # Command palette / search with multiple modes
|
|
||||||
│ ├── request-handler/ # Server request handlers (feeds, integrations)
|
|
||||||
│ ├── notifications/ # Mantine notifications wrapper
|
|
||||||
│ ├── docker/ # Dockerode-based Docker access
|
|
||||||
│ ├── icons/ # Icon DB/repo integration
|
|
||||||
│ ├── image-proxy/ # Image proxy + caching
|
|
||||||
│ ├── ping/ # Reachability / ping utilities
|
|
||||||
│ ├── analytics/ # Server-side analytics (Umami)
|
|
||||||
│ ├── server-settings/ # Server setting keys/types
|
|
||||||
│ ├── settings/ # User-facing settings UI context
|
|
||||||
│ ├── old-import/ # Legacy Homarr import
|
|
||||||
│ ├── old-schema/ # Legacy Homarr zod schemas
|
|
||||||
│ └── cli/ # Node CLI for ops (brocli)
|
|
||||||
├── tooling/
|
|
||||||
│ ├── eslint/ # Shared ESLint configs
|
|
||||||
│ ├── prettier/ # Shared Prettier config
|
|
||||||
│ ├── typescript/ # Base tsconfig
|
|
||||||
│ └── github/ # CI setup action
|
|
||||||
├── development/ # Dev docker-compose (Redis, MySQL, PostgreSQL)
|
|
||||||
├── e2e/ # E2E test specs
|
|
||||||
└── Dockerfile # Multi-stage production build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Three Runtime Services
|
|
||||||
|
|
||||||
| Service | Port | Role |
|
|
||||||
|---------|------|------|
|
|
||||||
| Next.js | 3000 | Main web app (SSR + API routes) |
|
|
||||||
| WebSocket | 3001 | tRPC subscriptions via `ws` |
|
|
||||||
| Tasks | 3002 | Cron job runner + management API via Fastify |
|
|
||||||
|
|
||||||
In Docker, nginx listens on **7575** and proxies to all three. The tasks service authenticates via `CRON_JOB_API_KEY` header.
|
|
||||||
|
|
||||||
## Package Dependency Layers
|
|
||||||
|
|
||||||
1. **Foundation**: `core` (env, DB drivers, Redis client, logging) → no `@homarr` deps
|
|
||||||
2. **Domain**: `definitions` → `common` → `core`
|
|
||||||
3. **Data**: `db` → `core`, `definitions`, `common`
|
|
||||||
4. **Auth**: `auth` → `db`, `definitions`, `core`, `validation`
|
|
||||||
5. **Cross-cutting**: `translation`, `validation`, `redis`, `server-settings`
|
|
||||||
6. **Feature backends**: `integrations`, `request-handler`, `cron-jobs`, `docker`, `ping`
|
|
||||||
7. **API surface**: `api` → pulls in auth, db, redis, integrations, etc.
|
|
||||||
8. **UI stack**: `ui`, `modals`, `form`, `notifications`, `boards`, `spotlight`
|
|
||||||
9. **Composed features**: `widgets`, `modals-collection`, `forms-collection`
|
|
||||||
|
|
||||||
## Key Patterns
|
|
||||||
|
|
||||||
### tRPC
|
|
||||||
|
|
||||||
- **Server caller** (RSC): `import { api } from "@homarr/api/server"` → cached caller with auth context
|
|
||||||
- **Client hooks**: `import { clientApi } from "@homarr/api/client"` → React Query hooks
|
|
||||||
- **Router structure**: `packages/api/src/root.ts` defines top-level namespaces (`user`, `board`, `widget`, `integration`, `docker`, `kubernetes`, etc.)
|
|
||||||
- **Procedures**: `publicProcedure`, `protectedProcedure`, `permissionRequiredProcedure`, `onboardingProcedure`
|
|
||||||
- **WebSocket subscriptions**: Client uses `wsLink` when `type === "subscription"`, connects to port 3001
|
|
||||||
|
|
||||||
### Multi-Database Support
|
|
||||||
|
|
||||||
Drizzle schemas exist in three parallel implementations:
|
|
||||||
- `packages/db/schema/sqlite.ts`
|
|
||||||
- `packages/db/schema/mysql.ts`
|
|
||||||
- `packages/db/schema/postgresql.ts`
|
|
||||||
|
|
||||||
Selected at runtime via `DB_DRIVER` env (`better-sqlite3` | `mysql2` | `node-postgres`). Migrations are per-engine in `packages/db/migrations/{sqlite,mysql,postgresql}/`.
|
|
||||||
|
|
||||||
### Widget System
|
|
||||||
|
|
||||||
Widgets are registered in `packages/widgets/src/index.tsx` as `widgetImports` (must satisfy `Record<WidgetKind, ...>`). Each widget:
|
|
||||||
- Has a `definition` created via `createWidgetDefinition(kind, { icon, createOptions, supportedIntegrations? })`
|
|
||||||
- Uses `optionsBuilder.from(factory => ({ ... }))` for typed options
|
|
||||||
- Loads dynamically via `next/dynamic`
|
|
||||||
- Fetches data via tRPC client hooks (backed by cron job caches)
|
|
||||||
|
|
||||||
### Integration System
|
|
||||||
|
|
||||||
Integrations are defined in `packages/definitions/src/integration.ts` (`integrationDefs`) and instantiated via `createIntegrationAsync` in `packages/integrations/src/base/creator.ts`. Each extends abstract `Integration` class with `testConnectionAsync` and typed methods.
|
|
||||||
|
|
||||||
### Cron Job System
|
|
||||||
|
|
||||||
Jobs defined in `packages/cron-jobs/src/jobs/`. Each job:
|
|
||||||
- Uses `createCronJob` with a cron expression
|
|
||||||
- Publishes results to Redis channels
|
|
||||||
- Widget subscriptions consume those channels via tRPC subscriptions
|
|
||||||
- Job management (start/stop/trigger) via `cronJobApi` HTTP client to port 3002
|
|
||||||
|
|
||||||
### Modals
|
|
||||||
|
|
||||||
Created with `createModal(component).withOptions({ defaultTitle })` from `@homarr/modals`. Opened via `useModalAction(SomeModal)`. Feature modals live in `packages/modals-collection/`.
|
|
||||||
|
|
||||||
### Forms
|
|
||||||
|
|
||||||
`useZodForm` from `@homarr/form` wraps Mantine `useForm` with zod validation. Shared form UIs in `packages/forms-collection/`.
|
|
||||||
|
|
||||||
### Routing (App Router)
|
|
||||||
|
|
||||||
- `apps/nextjs/src/app/[locale]/` — all UI routes under locale segment
|
|
||||||
- Route groups: `(home)`, `(content)`, `(board)` — don't affect URLs
|
|
||||||
- Key routes: `boards/[name]`, `manage/...` (admin), `auth/login`, `init` (onboarding), `widgets/[kind]`
|
|
||||||
- Locale driven by cookie (no URL prefix)
|
|
||||||
|
|
||||||
### Auth Providers
|
|
||||||
|
|
||||||
Configured via `AUTH_PROVIDERS` env. Supports: `credentials` (local), `ldap`, `oidc`. Database sessions with httpOnly cookies. API key auth for programmatic access.
|
|
||||||
|
|
||||||
## Environment Variables
|
|
||||||
|
|
||||||
Key env vars (from `.env.example`):
|
|
||||||
- `DB_DRIVER`: `better-sqlite3` | `mysql2` | `node-postgres`
|
|
||||||
- `DB_URL`: Database connection string
|
|
||||||
- `AUTH_SECRET`: NextAuth secret
|
|
||||||
- `SECRET_ENCRYPTION_KEY`: AES-256-CBC for integration secrets
|
|
||||||
- `AUTH_PROVIDERS`: Comma-separated (`credentials`, `ldap`, `oidc`)
|
|
||||||
- `CRON_JOB_API_KEY`: Shared key between Next.js and tasks service
|
|
||||||
- `REDIS_*`: Redis connection (host, port, password)
|
|
||||||
- `ENABLE_KUBERNETES`: Optional Kubernetes integration
|
|
||||||
|
|
||||||
## Development Commands
|
|
||||||
|
|
||||||
- `pnpm dev` — runs all three services in parallel via Turborepo
|
|
||||||
- `pnpm docker:dev` — starts Redis + MySQL + PostgreSQL containers
|
|
||||||
- `pnpm db:push` — push schema to SQLite (dev)
|
|
||||||
- `pnpm db:studio` — Drizzle Studio
|
|
||||||
- `pnpm test` — Vitest unit tests
|
|
||||||
- `pnpm test:e2e` — Playwright E2E
|
|
||||||
- `pnpm lint` / `pnpm format` — ESLint + Prettier
|
|
||||||
- `pnpm typecheck` — tsc --noEmit across all packages
|
|
||||||
|
|
||||||
## Conventions
|
|
||||||
|
|
||||||
- Workspace packages use `@homarr/` scope
|
|
||||||
- All versions managed via pnpm `catalog:` in workspace
|
|
||||||
- Path alias `~/*` → `./src/*` in Next.js app
|
|
||||||
- Mantine for all UI (no Tailwind) — primary color is red, `autoContrast: true`
|
|
||||||
- Icons from `@tabler/icons-react`
|
|
||||||
- Drag-and-drop via `@dnd-kit/*`
|
|
||||||
- `typescript.ignoreBuildErrors: true` in next.config (types checked separately via `typecheck`)
|
|
||||||
- `serverExternalPackages`: `dockerode`, `isomorphic-dompurify`, `jsdom`
|
|
||||||
@@ -10,7 +10,3 @@ README.md
|
|||||||
dev
|
dev
|
||||||
.build
|
.build
|
||||||
e2e
|
e2e
|
||||||
apps/nextjs/.next
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
!.env.example
|
|
||||||
+4
-14
@@ -12,6 +12,10 @@ AUTH_SECRET="supersecret"
|
|||||||
# or starting the project without any (which will show a randomly generated one).
|
# or starting the project without any (which will show a randomly generated one).
|
||||||
SECRET_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
SECRET_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
|
||||||
|
# Cron job API key is generated every time the container starts as it is required for communication between nextjs-api and tasks-api
|
||||||
|
# export CRON_JOB_API_KEY=$(openssl rand -base64 32)
|
||||||
|
# CRON_JOB_API_KEY="your-generated-api-key"
|
||||||
|
|
||||||
LOG_LEVEL='info'
|
LOG_LEVEL='info'
|
||||||
|
|
||||||
# This is how you can use the sqlite driver:
|
# This is how you can use the sqlite driver:
|
||||||
@@ -41,20 +45,6 @@ DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
|
|||||||
|
|
||||||
TURBO_TELEMETRY_DISABLED=1
|
TURBO_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
# Turborepo remote cache (optional, for faster CI/local builds)
|
|
||||||
# Uncomment and fill in to enable remote caching locally.
|
|
||||||
# CI uses GitHub secrets for these values automatically.
|
|
||||||
# TURBO_API=https://your-cache-worker.workers.dev
|
|
||||||
# TURBO_TEAM=team_your_team
|
|
||||||
# TURBO_TOKEN=your-turbo-token
|
|
||||||
# TURBO_REMOTE_CACHE_SIGNATURE_KEY=your-signature-key
|
|
||||||
|
|
||||||
# Comma-separated paths to Docker-compatible Unix sockets.
|
|
||||||
# Useful for connecting to multiple runtimes (Docker + Podman) simultaneously.
|
|
||||||
# When unset and no TCP hosts configured, defaults to /var/run/docker.sock.
|
|
||||||
# Example: DOCKER_SOCKET_PATHS=/var/run/docker.sock,/run/user/1000/podman/podman.sock
|
|
||||||
# DOCKER_SOCKET_PATHS=
|
|
||||||
|
|
||||||
# Enable kubernetes tool
|
# Enable kubernetes tool
|
||||||
# ENABLE_KUBERNETES=true
|
# ENABLE_KUBERNETES=true
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ body:
|
|||||||
options:
|
options:
|
||||||
# The below comment is used to insert a new version with on-release.yml
|
# The below comment is used to insert a new version with on-release.yml
|
||||||
#NEXT_VERSION#
|
#NEXT_VERSION#
|
||||||
- 1.61.0
|
|
||||||
- 1.60.1-beta.1
|
- 1.60.1-beta.1
|
||||||
- 1.60.0
|
- 1.60.0
|
||||||
- 1.59.3
|
- 1.59.3
|
||||||
|
|||||||
@@ -15,13 +15,6 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: 3
|
FORCE_COLOR: 3
|
||||||
SKIP_ENV_VALIDATION: true
|
|
||||||
TURBO_API: ${{ secrets.TURBO_API }}
|
|
||||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
||||||
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
|
|
||||||
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha || github.event.before || 'HEAD~1' }}
|
|
||||||
TURBO_SCM_HEAD: ${{ github.sha }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -29,8 +22,6 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./tooling/github/setup
|
uses: ./tooling/github/setup
|
||||||
@@ -40,35 +31,31 @@ jobs:
|
|||||||
run: cp .env.example .env
|
run: cp .env.example .env
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm turbo lint --affected && pnpm lint:ws
|
run: pnpm lint && pnpm lint:ws
|
||||||
|
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./tooling/github/setup
|
uses: ./tooling/github/setup
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
run: pnpm turbo format --affected --continue -- --cache --cache-location node_modules/.cache/.prettiercache
|
run: pnpm format
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./tooling/github/setup
|
uses: ./tooling/github/setup
|
||||||
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: pnpm turbo typecheck --affected
|
run: pnpm typecheck
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -91,12 +78,11 @@ jobs:
|
|||||||
e2e:
|
e2e:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./tooling/github/setup
|
uses: ./tooling/github/setup
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v4
|
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
id: build-docker-image
|
id: build-docker-image
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
@@ -104,11 +90,8 @@ jobs:
|
|||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
context: .
|
context: .
|
||||||
push: false
|
push: false
|
||||||
load: true
|
|
||||||
tags: homarr-e2e
|
tags: homarr-e2e
|
||||||
network: host
|
network: host
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
env:
|
env:
|
||||||
SKIP_ENV_VALIDATION: true
|
SKIP_ENV_VALIDATION: true
|
||||||
- name: Install playwright browsers
|
- name: Install playwright browsers
|
||||||
@@ -122,12 +105,10 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./tooling/github/setup
|
uses: ./tooling/github/setup
|
||||||
- name: Copy env
|
- name: Copy env
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cp .env.example .env
|
run: cp .env.example .env
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm turbo build --affected
|
run: pnpm build
|
||||||
@@ -5,7 +5,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- beta
|
- beta
|
||||||
- next
|
|
||||||
- dev
|
- dev
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -35,7 +34,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
env:
|
env:
|
||||||
SKIP_RELEASE: ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'dev' || github.ref_name == 'next' }}
|
SKIP_RELEASE: ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'dev' }}
|
||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.read-semver.outputs.version || steps.version-fallback.outputs.version }}
|
version: ${{ steps.read-semver.outputs.version || steps.version-fallback.outputs.version }}
|
||||||
git_ref: ${{ steps.read-git-ref.outputs.ref || github.ref }}
|
git_ref: ${{ steps.read-git-ref.outputs.ref || github.ref }}
|
||||||
@@ -55,7 +54,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
private-key: ${{ secrets.RENOVATE_MERGE_PRIVATE_KEY }}
|
private-key: ${{ secrets.RENOVATE_MERGE_PRIVATE_KEY }}
|
||||||
client-id: ${{ secrets.RENOVATE_MERGE_APP_ID }}
|
client-id: ${{ secrets.RENOVATE_MERGE_APP_ID }}
|
||||||
permission-contents: write # required to commit package.json & changelog changes, merge them to dev / next and publish the release
|
permission-contents: write # required to commit package.json & changelog changes, merge them to dev and publish the release
|
||||||
|
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
if: env.SKIP_RELEASE == 'false'
|
if: env.SKIP_RELEASE == 'false'
|
||||||
@@ -67,7 +66,7 @@ jobs:
|
|||||||
if: env.SKIP_RELEASE == 'false'
|
if: env.SKIP_RELEASE == 'false'
|
||||||
with:
|
with:
|
||||||
node-version: 24.15.0
|
node-version: 24.15.0
|
||||||
package-manager-cache: false
|
cache: "pnpm"
|
||||||
- run: npm i -g pnpm
|
- run: npm i -g pnpm
|
||||||
if: env.SKIP_RELEASE == 'false'
|
if: env.SKIP_RELEASE == 'false'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -96,21 +95,20 @@ jobs:
|
|||||||
id: read-git-ref
|
id: read-git-ref
|
||||||
run: |
|
run: |
|
||||||
echo "ref=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
echo "ref=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
- name: Update dev / next branch
|
- name: Update dev branch
|
||||||
if: env.SKIP_RELEASE == 'false'
|
if: env.SKIP_RELEASE == 'false'
|
||||||
continue-on-error: true # Prevent pipeline from failing when merge fails
|
continue-on-error: true # Prevent pipeline from failing when merge fails
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
|
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
|
||||||
UPSTREAM_BRANCH: ${{ github.ref_name == 'main' && 'dev' || 'next' }}
|
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Releases Homarr"
|
git config user.name "Releases Homarr"
|
||||||
git config user.email "175486441+homarr-releases[bot]@users.noreply.github.com"
|
git config user.email "175486441+homarr-releases[bot]@users.noreply.github.com"
|
||||||
git remote set-url origin https://x-access-token:${{ steps.obtainToken.outputs.token }}@github.com/${{ github.repository }}.git
|
git remote set-url origin https://x-access-token:${{ steps.obtainToken.outputs.token }}@github.com/${{ github.repository }}.git
|
||||||
git fetch origin ${{ env.UPSTREAM_BRANCH }}
|
git fetch origin dev
|
||||||
git checkout ${{ env.UPSTREAM_BRANCH }}
|
git checkout dev
|
||||||
git pull origin ${{ env.UPSTREAM_BRANCH }}
|
git pull origin dev
|
||||||
git rebase ${{ github.ref_name }}
|
git rebase ${{ github.ref_name }}
|
||||||
git push origin ${{ env.UPSTREAM_BRANCH }}
|
git push origin dev
|
||||||
build-amd64:
|
build-amd64:
|
||||||
name: Build docker image for amd64
|
name: Build docker image for amd64
|
||||||
needs: release
|
needs: release
|
||||||
@@ -193,7 +191,7 @@ jobs:
|
|||||||
name: Extract amd64 asset from docker image
|
name: Extract amd64 asset from docker image
|
||||||
needs: [release, build-amd64]
|
needs: [release, build-amd64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 5
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Extract amd64
|
- name: Extract amd64
|
||||||
if: needs.release.outputs.skipped == 'false'
|
if: needs.release.outputs.skipped == 'false'
|
||||||
@@ -209,7 +207,7 @@ jobs:
|
|||||||
name: Extract arm64 asset from docker image
|
name: Extract arm64 asset from docker image
|
||||||
needs: [release, build-arm64]
|
needs: [release, build-arm64]
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
timeout-minutes: 5
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Extract arm64
|
- name: Extract arm64
|
||||||
if: needs.release.outputs.skipped == 'false'
|
if: needs.release.outputs.skipped == 'false'
|
||||||
|
|||||||
+3825
-3869
File diff suppressed because it is too large.
Load diff
@@ -3,11 +3,7 @@
|
|||||||
|
|
||||||
# Exempt Renovate‑managed files (no owners)
|
# Exempt Renovate‑managed files (no owners)
|
||||||
package.json
|
package.json
|
||||||
**/package.json
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
**/package-lock.json
|
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
**/pnpm-lock.yaml
|
|
||||||
pnpm-workspace.yaml
|
|
||||||
Dockerfile
|
Dockerfile
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
@@ -43,6 +43,8 @@ RUN mkdir -p /var/cache/nginx && \
|
|||||||
COPY --from=builder /app/apps/nextjs/next.config.ts .
|
COPY --from=builder /app/apps/nextjs/next.config.ts .
|
||||||
COPY --from=builder /app/apps/nextjs/package.json .
|
COPY --from=builder /app/apps/nextjs/package.json .
|
||||||
|
|
||||||
|
COPY --from=builder /app/apps/tasks/tasks.cjs ./apps/tasks/tasks.cjs
|
||||||
|
COPY --from=builder /app/apps/websocket/wssServer.cjs ./apps/websocket/wssServer.cjs
|
||||||
COPY --from=builder /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/build/better_sqlite3.node
|
COPY --from=builder /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/build/better_sqlite3.node
|
||||||
|
|
||||||
COPY --from=builder /app/packages/db/migrations ./db/migrations
|
COPY --from=builder /app/packages/db/migrations ./db/migrations
|
||||||
|
|||||||
@@ -10,21 +10,4 @@ export default [
|
|||||||
...baseConfig,
|
...baseConfig,
|
||||||
...reactConfig,
|
...reactConfig,
|
||||||
...nextjsConfig,
|
...nextjsConfig,
|
||||||
{
|
|
||||||
files: ["public/sw.js"],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
self: "readonly",
|
|
||||||
clients: "readonly",
|
|
||||||
skipWaiting: "readonly",
|
|
||||||
importScripts: "readonly",
|
|
||||||
caches: "readonly",
|
|
||||||
fetch: "readonly",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"@typescript-eslint/no-unsafe-call": "off",
|
|
||||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
@@ -6,6 +6,7 @@ import "@homarr/core/infrastructure/logs/env";
|
|||||||
import "@homarr/docker/env";
|
import "@homarr/docker/env";
|
||||||
|
|
||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
import MillionLint from "@million/lint";
|
||||||
import createNextIntlPlugin from "next-intl/plugin";
|
import createNextIntlPlugin from "next-intl/plugin";
|
||||||
|
|
||||||
// Package path does not work... so we need to use relative path
|
// Package path does not work... so we need to use relative path
|
||||||
@@ -31,8 +32,6 @@ const nextConfig: NextConfig = {
|
|||||||
experimental: {
|
experimental: {
|
||||||
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
optimizePackageImports: ["@mantine/core", "@mantine/hooks", "@tabler/icons-react"],
|
||||||
turbopackFileSystemCacheForDev: true,
|
turbopackFileSystemCacheForDev: true,
|
||||||
preloadEntriesOnStart: false,
|
|
||||||
webpackMemoryOptimizations: true,
|
|
||||||
},
|
},
|
||||||
transpilePackages: ["@homarr/ui", "@homarr/notifications", "@homarr/modals", "@homarr/spotlight", "@homarr/widgets"],
|
transpilePackages: ["@homarr/ui", "@homarr/notifications", "@homarr/modals", "@homarr/spotlight", "@homarr/widgets"],
|
||||||
images: {
|
images: {
|
||||||
@@ -43,18 +42,9 @@ const nextConfig: NextConfig = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// skipcq: JS-0116
|
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await,no-restricted-syntax
|
// eslint-disable-next-line @typescript-eslint/require-await,no-restricted-syntax
|
||||||
async headers() {
|
async headers() {
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
source: "/sw.js",
|
|
||||||
headers: [
|
|
||||||
{ key: "Content-Type", value: "application/javascript; charset=utf-8" },
|
|
||||||
{ key: "Cache-Control", value: "no-cache, no-store, must-revalidate" },
|
|
||||||
{ key: "Content-Security-Policy", value: "default-src 'self'; script-src 'self'" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: "/(.*)", // Apply CSP to all routes
|
source: "/(.*)", // Apply CSP to all routes
|
||||||
headers: [
|
headers: [
|
||||||
@@ -84,4 +74,8 @@ const nextConfig: NextConfig = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Skip transform is used because of webpack loader, without it for example 'Tooltip.Floating' will not work and show an error
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
const withMillionLint = MillionLint.next({ rsc: true, skipTransform: true, telemetry: false });
|
||||||
|
|
||||||
export default withNextIntl(nextConfig);
|
export default withNextIntl(nextConfig);
|
||||||
@@ -44,11 +44,9 @@
|
|||||||
"@homarr/server-settings": "workspace:^0.1.0",
|
"@homarr/server-settings": "workspace:^0.1.0",
|
||||||
"@homarr/settings": "workspace:^0.1.0",
|
"@homarr/settings": "workspace:^0.1.0",
|
||||||
"@homarr/spotlight": "workspace:^0.1.0",
|
"@homarr/spotlight": "workspace:^0.1.0",
|
||||||
"@homarr/tasks": "workspace:^0.1.0",
|
|
||||||
"@homarr/translation": "workspace:^0.1.0",
|
"@homarr/translation": "workspace:^0.1.0",
|
||||||
"@homarr/ui": "workspace:^0.1.0",
|
"@homarr/ui": "workspace:^0.1.0",
|
||||||
"@homarr/validation": "workspace:^0.1.0",
|
"@homarr/validation": "workspace:^0.1.0",
|
||||||
"@homarr/websocket": "workspace:^0.1.0",
|
|
||||||
"@homarr/widgets": "workspace:^0.1.0",
|
"@homarr/widgets": "workspace:^0.1.0",
|
||||||
"@mantine/colors-generator": "catalog:",
|
"@mantine/colors-generator": "catalog:",
|
||||||
"@mantine/core": "catalog:",
|
"@mantine/core": "catalog:",
|
||||||
@@ -56,6 +54,7 @@
|
|||||||
"@mantine/hooks": "catalog:",
|
"@mantine/hooks": "catalog:",
|
||||||
"@mantine/modals": "catalog:",
|
"@mantine/modals": "catalog:",
|
||||||
"@mantine/tiptap": "catalog:",
|
"@mantine/tiptap": "catalog:",
|
||||||
|
"@million/lint": "catalog:",
|
||||||
"@tabler/icons-react": "catalog:",
|
"@tabler/icons-react": "catalog:",
|
||||||
"@tanstack/react-query": "catalog:",
|
"@tanstack/react-query": "catalog:",
|
||||||
"@tanstack/react-query-devtools": "catalog:",
|
"@tanstack/react-query-devtools": "catalog:",
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
self.addEventListener("install", () => {
|
|
||||||
self.skipWaiting();
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener("activate", (event) => {
|
|
||||||
event.waitUntil(self.clients.claim());
|
|
||||||
});
|
|
||||||
@@ -1,27 +1,70 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Box, Stack } from "@mantine/core";
|
import { useCallback, useRef } from "react";
|
||||||
|
import { Box, LoadingOverlay, Stack } from "@mantine/core";
|
||||||
|
|
||||||
|
import type { RouterOutputs } from "@homarr/api";
|
||||||
|
import { clientApi } from "@homarr/api/client";
|
||||||
import { useCurrentLayout, useRequiredBoard } from "@homarr/boards/context";
|
import { useCurrentLayout, useRequiredBoard } from "@homarr/boards/context";
|
||||||
|
|
||||||
import { BoardCategorySection } from "~/components/board/sections/category-section";
|
import { BoardCategorySection } from "~/components/board/sections/category-section";
|
||||||
import { BoardEmptySection } from "~/components/board/sections/empty-section";
|
import { BoardEmptySection } from "~/components/board/sections/empty-section";
|
||||||
import { BoardBackgroundVideo } from "~/components/layout/background";
|
import { BoardBackgroundVideo } from "~/components/layout/background";
|
||||||
|
import { fullHeightWithoutHeaderAndFooter } from "~/constants";
|
||||||
|
import { useIsBoardReady } from "./_ready-context";
|
||||||
|
|
||||||
|
let boardName: string | null = null;
|
||||||
|
|
||||||
|
export const updateBoardName = (name: string | null) => {
|
||||||
|
boardName = name;
|
||||||
|
};
|
||||||
|
|
||||||
|
type UpdateCallback = (prev: RouterOutputs["board"]["getHomeBoard"]) => RouterOutputs["board"]["getHomeBoard"];
|
||||||
|
|
||||||
|
export const useUpdateBoard = () => {
|
||||||
|
const utils = clientApi.useUtils();
|
||||||
|
|
||||||
|
const updateBoard = useCallback(
|
||||||
|
(updaterWithoutUndefined: UpdateCallback) => {
|
||||||
|
if (!boardName) {
|
||||||
|
throw new Error("Board name is not set");
|
||||||
|
}
|
||||||
|
utils.board.getBoardByName.setData({ name: boardName }, (previous) =>
|
||||||
|
previous ? updaterWithoutUndefined(previous) : previous,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
[utils],
|
||||||
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
updateBoard,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export const ClientBoard = () => {
|
export const ClientBoard = () => {
|
||||||
const board = useRequiredBoard();
|
const board = useRequiredBoard();
|
||||||
const currentLayoutId = useCurrentLayout();
|
const currentLayoutId = useCurrentLayout();
|
||||||
|
const isReady = useIsBoardReady();
|
||||||
|
|
||||||
const fullWidthSortedSections = board.sections
|
const fullWidthSortedSections = board.sections
|
||||||
.filter((section) => section.kind === "empty" || section.kind === "category")
|
.filter((section) => section.kind === "empty" || section.kind === "category")
|
||||||
.sort((sectionA, sectionB) => sectionA.yOffset - sectionB.yOffset);
|
.sort((sectionA, sectionB) => sectionA.yOffset - sectionB.yOffset);
|
||||||
|
|
||||||
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box h="100%" pos="relative">
|
<Box h="100%" pos="relative">
|
||||||
<BoardBackgroundVideo />
|
<BoardBackgroundVideo />
|
||||||
<Stack h="100%">
|
<LoadingOverlay
|
||||||
|
visible={!isReady}
|
||||||
|
transitionProps={{ duration: 500 }}
|
||||||
|
loaderProps={{ size: "lg" }}
|
||||||
|
h={fullHeightWithoutHeaderAndFooter}
|
||||||
|
/>
|
||||||
|
<Stack ref={ref} h="100%" style={{ visibility: isReady ? "visible" : "hidden" }}>
|
||||||
{fullWidthSortedSections.map((section) =>
|
{fullWidthSortedSections.map((section) =>
|
||||||
section.kind === "empty" ? (
|
section.kind === "empty" ? (
|
||||||
|
// Unique keys per layout to always reinitialize the gridstack
|
||||||
<BoardEmptySection key={`${currentLayoutId}-${section.id}`} section={section} />
|
<BoardEmptySection key={`${currentLayoutId}-${section.id}`} section={section} />
|
||||||
) : (
|
) : (
|
||||||
<BoardCategorySection key={`${currentLayoutId}-${section.id}`} section={section} />
|
<BoardCategorySection key={`${currentLayoutId}-${section.id}`} section={section} />
|
||||||
|
|||||||
@@ -1,19 +1,42 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import type { PropsWithChildren } from "react";
|
import type { PropsWithChildren } from "react";
|
||||||
import { createContext, useCallback, useContext } from "react";
|
import { createContext, useCallback, useContext, useEffect, useState } from "react";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
|
import { clientApi } from "@homarr/api/client";
|
||||||
|
import { useRequiredBoard } from "@homarr/boards/context";
|
||||||
|
|
||||||
const BoardReadyContext = createContext<{
|
const BoardReadyContext = createContext<{
|
||||||
|
isReady: boolean;
|
||||||
markAsReady: (id: string) => void;
|
markAsReady: (id: string) => void;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
|
|
||||||
export const BoardReadyProvider = ({ children }: PropsWithChildren) => {
|
export const BoardReadyProvider = ({ children }: PropsWithChildren) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
const pathname = usePathname();
|
||||||
const markAsReady = useCallback((_id: string) => {}, []);
|
const utils = clientApi.useUtils();
|
||||||
|
const board = useRequiredBoard();
|
||||||
|
const [readySections, setReadySections] = useState<string[]>([]);
|
||||||
|
|
||||||
|
// Reset sections required for ready state
|
||||||
|
useEffect(() => {
|
||||||
|
return () => {
|
||||||
|
setReadySections([]);
|
||||||
|
};
|
||||||
|
}, [pathname, utils]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setReadySections((previous) => previous.filter((id) => board.sections.some((section) => section.id === id)));
|
||||||
|
}, [board.sections.length, setReadySections]);
|
||||||
|
|
||||||
|
const markAsReady = useCallback((id: string) => {
|
||||||
|
setReadySections((previous) => (previous.includes(id) ? previous : [...previous, id]));
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BoardReadyContext.Provider
|
<BoardReadyContext.Provider
|
||||||
value={{
|
value={{
|
||||||
|
isReady: board.sections.length === readySections.length,
|
||||||
markAsReady,
|
markAsReady,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -31,3 +54,13 @@ export const useMarkSectionAsReady = () => {
|
|||||||
|
|
||||||
return context.markAsReady;
|
return context.markAsReady;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const useIsBoardReady = () => {
|
||||||
|
const context = useContext(BoardReadyContext);
|
||||||
|
|
||||||
|
if (!context) {
|
||||||
|
throw new Error("BoardReadyProvider is required");
|
||||||
|
}
|
||||||
|
|
||||||
|
return context.isReady;
|
||||||
|
};
|
||||||
@@ -26,7 +26,6 @@ import { isLocaleRTL, isLocaleSupported } from "@homarr/translation";
|
|||||||
import { Analytics } from "~/components/layout/analytics";
|
import { Analytics } from "~/components/layout/analytics";
|
||||||
import { CrowdinLiveTranslation } from "~/components/layout/crowdin-live-translation";
|
import { CrowdinLiveTranslation } from "~/components/layout/crowdin-live-translation";
|
||||||
import { SearchEngineOptimization } from "~/components/layout/search-engine-optimization";
|
import { SearchEngineOptimization } from "~/components/layout/search-engine-optimization";
|
||||||
import { ServiceWorkerRegistration } from "~/components/layout/service-worker-registration";
|
|
||||||
import { getCurrentColorSchemeAsync } from "~/theme/color-scheme";
|
import { getCurrentColorSchemeAsync } from "~/theme/color-scheme";
|
||||||
import { DayJsLoader } from "./_client-providers/dayjs-loader";
|
import { DayJsLoader } from "./_client-providers/dayjs-loader";
|
||||||
import { JotaiProvider } from "./_client-providers/jotai";
|
import { JotaiProvider } from "./_client-providers/jotai";
|
||||||
@@ -143,7 +142,6 @@ export default async function Layout(props: {
|
|||||||
<body className={["font-sans", fontSans.variable].join(" ")}>
|
<body className={["font-sans", fontSans.variable].join(" ")}>
|
||||||
<StackedProvider>
|
<StackedProvider>
|
||||||
<Notifications />
|
<Notifications />
|
||||||
<ServiceWorkerRegistration />
|
|
||||||
{props.children}
|
{props.children}
|
||||||
</StackedProvider>
|
</StackedProvider>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -58,18 +58,6 @@ const createColumns = (
|
|||||||
return <ContainerStateBadge state={cell.row.original.state} />;
|
return <ContainerStateBadge state={cell.row.original.state} />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
accessorKey: "host",
|
|
||||||
header: t("docker.field.host.label"),
|
|
||||||
size: 140,
|
|
||||||
Cell({ row }) {
|
|
||||||
return (
|
|
||||||
<Text truncate="end" title={row.original.host}>
|
|
||||||
{row.original.host}
|
|
||||||
</Text>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
accessorKey: "image",
|
accessorKey: "image",
|
||||||
header: t("docker.field.containerImage.label"),
|
header: t("docker.field.containerImage.label"),
|
||||||
|
|||||||
-6
@@ -26,7 +26,6 @@ export const ChangeSearchPreferencesForm = ({ user, searchEnginesData }: ChangeS
|
|||||||
form.setInitialValues({
|
form.setInitialValues({
|
||||||
defaultSearchEngineId: variables.defaultSearchEngineId,
|
defaultSearchEngineId: variables.defaultSearchEngineId,
|
||||||
openInNewTab: variables.openInNewTab,
|
openInNewTab: variables.openInNewTab,
|
||||||
ddgBangsEnabled: variables.ddgBangsEnabled,
|
|
||||||
});
|
});
|
||||||
showSuccessNotification({
|
showSuccessNotification({
|
||||||
message: t("user.action.changeSearchPreferences.notification.success.message"),
|
message: t("user.action.changeSearchPreferences.notification.success.message"),
|
||||||
@@ -42,7 +41,6 @@ export const ChangeSearchPreferencesForm = ({ user, searchEnginesData }: ChangeS
|
|||||||
initialValues: {
|
initialValues: {
|
||||||
defaultSearchEngineId: user.defaultSearchEngineId,
|
defaultSearchEngineId: user.defaultSearchEngineId,
|
||||||
openInNewTab: user.openSearchInNewTab,
|
openInNewTab: user.openSearchInNewTab,
|
||||||
ddgBangsEnabled: user.ddgBangs,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -66,10 +64,6 @@ export const ChangeSearchPreferencesForm = ({ user, searchEnginesData }: ChangeS
|
|||||||
label={t("user.field.openSearchInNewTab.label")}
|
label={t("user.field.openSearchInNewTab.label")}
|
||||||
{...form.getInputProps("openInNewTab", { type: "checkbox" })}
|
{...form.getInputProps("openInNewTab", { type: "checkbox" })}
|
||||||
/>
|
/>
|
||||||
<Switch
|
|
||||||
label={t("user.field.ddgBangs.label")}
|
|
||||||
{...form.getInputProps("ddgBangsEnabled", { type: "checkbox" })}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Group justify="end">
|
<Group justify="end">
|
||||||
<Button type="submit" loading={isPending}>
|
<Button type="submit" loading={isPending}>
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import { useEffect } from "react";
|
|
||||||
|
|
||||||
export const ServiceWorkerRegistration = () => {
|
|
||||||
useEffect(() => {
|
|
||||||
if (!("serviceWorker" in navigator)) return;
|
|
||||||
navigator.serviceWorker.register("/sw.js", { scope: "/", updateViaCache: "none" }).catch((error) => {
|
|
||||||
console.error("Service worker registration failed", error);
|
|
||||||
});
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
export async function register() {
|
|
||||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
|
||||||
await import("@homarr/tasks");
|
|
||||||
await import("@homarr/websocket");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,11 +5,12 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/main.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"main": "./src/main.ts",
|
"main": "./src/main.ts",
|
||||||
"types": "./src/main.ts",
|
"types": "./src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "esbuild src/main.ts --bundle --platform=node --loader:.scss=text --external:*.node --external:@opentelemetry/api --external:deasync --external:bcrypt --outfile=tasks.cjs",
|
||||||
"clean": "rm -rf .turbo node_modules",
|
"clean": "rm -rf .turbo node_modules",
|
||||||
"dev": "pnpm with-env tsx ./src/main.ts",
|
"dev": "pnpm with-env tsx ./src/main.ts",
|
||||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
"@homarr/auth": "workspace:^0.1.0",
|
"@homarr/auth": "workspace:^0.1.0",
|
||||||
"@homarr/common": "workspace:^0.1.0",
|
"@homarr/common": "workspace:^0.1.0",
|
||||||
"@homarr/core": "workspace:^",
|
"@homarr/core": "workspace:^",
|
||||||
|
"@homarr/cron-job-api": "workspace:^0.1.0",
|
||||||
"@homarr/cron-jobs": "workspace:^0.1.0",
|
"@homarr/cron-jobs": "workspace:^0.1.0",
|
||||||
"@homarr/cron-jobs-core": "workspace:^0.1.0",
|
"@homarr/cron-jobs-core": "workspace:^0.1.0",
|
||||||
"@homarr/db": "workspace:^0.1.0",
|
"@homarr/db": "workspace:^0.1.0",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Cron } from "croner";
|
import { Cron } from "croner";
|
||||||
|
|
||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
|
import type { IJobManager } from "@homarr/cron-job-api";
|
||||||
import type { jobGroup as cronJobGroup, JobGroupKeys } from "@homarr/cron-jobs";
|
import type { jobGroup as cronJobGroup, JobGroupKeys } from "@homarr/cron-jobs";
|
||||||
import type { Database, InferInsertModel } from "@homarr/db";
|
import type { Database, InferInsertModel } from "@homarr/db";
|
||||||
import { eq } from "@homarr/db";
|
import { eq } from "@homarr/db";
|
||||||
@@ -8,7 +9,7 @@ import { cronJobConfigurations } from "@homarr/db/schema";
|
|||||||
|
|
||||||
const logger = createLogger({ module: "jobManager" });
|
const logger = createLogger({ module: "jobManager" });
|
||||||
|
|
||||||
export class JobManager {
|
export class JobManager implements IJobManager {
|
||||||
constructor(
|
constructor(
|
||||||
private db: Database,
|
private db: Database,
|
||||||
private jobGroup: typeof cronJobGroup,
|
private jobGroup: typeof cronJobGroup,
|
||||||
+41
-1
@@ -1,12 +1,52 @@
|
|||||||
// This import has to be the first import in the file so that the agent is overridden before any other modules are imported.
|
// This import has to be the first import in the file so that the agent is overridden before any other modules are imported.
|
||||||
import "./overrides";
|
import "./overrides";
|
||||||
|
|
||||||
import { jobGroup } from "@homarr/cron-jobs";
|
import type { FastifyTRPCPluginOptions } from "@trpc/server/adapters/fastify";
|
||||||
|
import { fastifyTRPCPlugin } from "@trpc/server/adapters/fastify";
|
||||||
|
import fastify from "fastify";
|
||||||
|
|
||||||
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
|
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
|
||||||
|
import type { JobRouter } from "@homarr/cron-job-api";
|
||||||
|
import { jobRouter } from "@homarr/cron-job-api";
|
||||||
|
import { CRON_JOB_API_KEY_HEADER, CRON_JOB_API_PATH, CRON_JOB_API_PORT } from "@homarr/cron-job-api/constants";
|
||||||
|
import { jobGroup } from "@homarr/cron-jobs";
|
||||||
|
import { db } from "@homarr/db";
|
||||||
|
|
||||||
|
import { JobManager } from "./job-manager";
|
||||||
import { onStartAsync } from "./on-start";
|
import { onStartAsync } from "./on-start";
|
||||||
|
|
||||||
|
const logger = createLogger({ module: "tasksMain" });
|
||||||
|
|
||||||
|
const server = fastify({
|
||||||
|
maxParamLength: 5000,
|
||||||
|
});
|
||||||
|
server.register(fastifyTRPCPlugin, {
|
||||||
|
prefix: CRON_JOB_API_PATH,
|
||||||
|
trpcOptions: {
|
||||||
|
router: jobRouter,
|
||||||
|
createContext: ({ req }) => ({
|
||||||
|
manager: new JobManager(db, jobGroup),
|
||||||
|
apiKey: req.headers[CRON_JOB_API_KEY_HEADER] as string | undefined,
|
||||||
|
}),
|
||||||
|
onError({ path, error }) {
|
||||||
|
logger.error(new ErrorWithMetadata("Error in tasks tRPC handler", { path }, { cause: error }));
|
||||||
|
},
|
||||||
|
} satisfies FastifyTRPCPluginOptions<JobRouter>["trpcOptions"],
|
||||||
|
});
|
||||||
|
|
||||||
void (async () => {
|
void (async () => {
|
||||||
await onStartAsync();
|
await onStartAsync();
|
||||||
await jobGroup.initializeAsync();
|
await jobGroup.initializeAsync();
|
||||||
await jobGroup.startAllAsync();
|
await jobGroup.startAllAsync();
|
||||||
|
|
||||||
|
try {
|
||||||
|
await server.listen({ port: CRON_JOB_API_PORT });
|
||||||
|
logger.info("Tasks web server started successfully", { port: CRON_JOB_API_PORT });
|
||||||
|
} catch (err) {
|
||||||
|
logger.error(
|
||||||
|
new ErrorWithMetadata("Failed to start tasks web server", { port: CRON_JOB_API_PORT }, { cause: err }),
|
||||||
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
@@ -9,5 +9,5 @@
|
|||||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||||
},
|
},
|
||||||
"include": ["."],
|
"include": ["."],
|
||||||
"exclude": ["node_modules", "*.cjs", "*.css"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,10 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
|
||||||
".": "./src/main.ts"
|
|
||||||
},
|
|
||||||
"main": "./src/main.ts",
|
"main": "./src/main.ts",
|
||||||
"types": "./src/main.ts",
|
"types": "./src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "esbuild src/main.ts --bundle --platform=node --outfile=wssServer.cjs --external:bcrypt --external:@opentelemetry/api --external:deasync --external:cpu-features --loader:.html=text --loader:.scss=text --loader:.node=text",
|
||||||
"clean": "rm -rf .turbo node_modules",
|
"clean": "rm -rf .turbo node_modules",
|
||||||
"dev": "pnpm with-env tsx ./src/main.ts",
|
"dev": "pnpm with-env tsx ./src/main.ts",
|
||||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||||
},
|
},
|
||||||
"include": ["."],
|
"include": ["."],
|
||||||
"exclude": ["node_modules", "*.cjs", "*.css"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
"name": "homarr-prebuilt-debian",
|
"name": "homarr-prebuilt-debian",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "^12.10.0"
|
"better-sqlite3": "^12.9.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.33.4",
|
"packageManager": "pnpm@10.33.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.15.0",
|
"node": ">=24.15.0",
|
||||||
"pnpm": ">=10.33.4"
|
"pnpm": ">=10.33.2"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
|
|||||||
+6
-6
@@ -9,17 +9,17 @@ importers:
|
|||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
better-sqlite3:
|
better-sqlite3:
|
||||||
specifier: ^12.10.0
|
specifier: ^12.9.0
|
||||||
version: 12.10.0
|
version: 12.9.0
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
base64-js@1.5.1:
|
base64-js@1.5.1:
|
||||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||||
|
|
||||||
better-sqlite3@12.10.0:
|
better-sqlite3@12.9.0:
|
||||||
resolution: {integrity: sha512-CyzaZRQKyHkB2ZInfTTl2nvT33EbDpjkLEbE8/Zck3Ll6O0qqvuGdrJ45HgtH+HykRg88ITY3AdreBGN70aBSQ==}
|
resolution: {integrity: sha512-wqUv4Gm3toFpHDQmaKD4QhZm3g1DjUBI0yzS4UBl6lElUmXFYdTQmmEDpAFa5o8FiFiymURypEnfVHzILKaxqQ==}
|
||||||
engines: {node: 20.x || 22.x || 23.x || 24.x || 25.x || 26.x}
|
engines: {node: 20.x || 22.x || 23.x || 24.x || 25.x}
|
||||||
|
|
||||||
bindings@1.5.0:
|
bindings@1.5.0:
|
||||||
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
|
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
|
||||||
@@ -148,7 +148,7 @@ snapshots:
|
|||||||
|
|
||||||
base64-js@1.5.1: {}
|
base64-js@1.5.1: {}
|
||||||
|
|
||||||
better-sqlite3@12.10.0:
|
better-sqlite3@12.9.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
bindings: 1.5.0
|
bindings: 1.5.0
|
||||||
prebuild-install: 7.1.3
|
prebuild-install: 7.1.3
|
||||||
|
|||||||
@@ -372,13 +372,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://homarr.dev/docs/integrations/umami" target="_blank" rel="noreferrer noopener">
|
|
||||||
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/svg/umami.svg" alt="Umami" width="90" height="90" />
|
|
||||||
<br/>
|
|
||||||
<p align="center">Umami</p>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<a href="https://homarr.dev/docs/integrations/unifi-controller" target="_blank" rel="noreferrer noopener">
|
<a href="https://homarr.dev/docs/integrations/unifi-controller" target="_blank" rel="noreferrer noopener">
|
||||||
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png" alt="Unifi Controller" width="90" height="90" />
|
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/png/unifi.png" alt="Unifi Controller" width="90" height="90" />
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { chromium } from "@playwright/test";
|
import { chromium } from "playwright";
|
||||||
import { GenericContainer } from "testcontainers";
|
import { GenericContainer } from "testcontainers";
|
||||||
import { describe, expect, test } from "vitest";
|
import { describe, expect, test } from "vitest";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { chromium } from "@playwright/test";
|
import { chromium } from "playwright";
|
||||||
import { describe, test } from "vitest";
|
import { describe, test } from "vitest";
|
||||||
|
|
||||||
import { OnboardingActions } from "./shared/actions/onboarding-actions";
|
import { OnboardingActions } from "./shared/actions/onboarding-actions";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createId } from "@paralleldrive/cuid2";
|
import { createId } from "@paralleldrive/cuid2";
|
||||||
import type { Page } from "@playwright/test";
|
import type { Page } from "playwright";
|
||||||
|
|
||||||
import * as sqliteSchema from "../../../packages/db/schema/sqlite";
|
import * as sqliteSchema from "../../../packages/db/schema/sqlite";
|
||||||
import type { SqliteDatabase } from "../e2e-db";
|
import type { SqliteDatabase } from "../e2e-db";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Page } from "@playwright/test";
|
|
||||||
import { eq } from "drizzle-orm";
|
import { eq } from "drizzle-orm";
|
||||||
|
import type { Page } from "playwright";
|
||||||
import { expect } from "vitest";
|
import { expect } from "vitest";
|
||||||
|
|
||||||
import * as sqliteSchema from "../../../packages/db/schema/sqlite";
|
import * as sqliteSchema from "../../../packages/db/schema/sqlite";
|
||||||
|
|||||||
+12
-14
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homarr",
|
"name": "homarr",
|
||||||
"version": "1.61.1-beta.1",
|
"version": "1.60.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env CI=true turbo build",
|
"build": "cross-env CI=true turbo build",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"db:migration:sqlite:run": "pnpm -F db migration:sqlite:run",
|
"db:migration:sqlite:run": "pnpm -F db migration:sqlite:run",
|
||||||
"db:push": "pnpm -F db push:sqlite",
|
"db:push": "pnpm -F db push:sqlite",
|
||||||
"db:studio": "pnpm -F db studio",
|
"db:studio": "pnpm -F db studio",
|
||||||
"dev": "pnpm -F nextjs dev",
|
"dev": "turbo dev --parallel",
|
||||||
"docker:dev": "docker compose -f ./development/development.docker-compose.yml up",
|
"docker:dev": "docker compose -f ./development/development.docker-compose.yml up",
|
||||||
"format": "turbo format --continue -- --cache --cache-location node_modules/.cache/.prettiercache",
|
"format": "turbo format --continue -- --cache --cache-location node_modules/.cache/.prettiercache",
|
||||||
"format:fix": "turbo format --continue -- --write --cache --cache-location node_modules/.cache/.prettiercache",
|
"format:fix": "turbo format --continue -- --write --cache --cache-location node_modules/.cache/.prettiercache",
|
||||||
@@ -36,7 +36,6 @@
|
|||||||
"prettier": "@homarr/prettier-config",
|
"prettier": "@homarr/prettier-config",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||||
"@playwright/test": "catalog:",
|
|
||||||
"@semantic-release/changelog": "catalog:",
|
"@semantic-release/changelog": "catalog:",
|
||||||
"@semantic-release/commit-analyzer": "catalog:",
|
"@semantic-release/commit-analyzer": "catalog:",
|
||||||
"@semantic-release/git": "catalog:",
|
"@semantic-release/git": "catalog:",
|
||||||
@@ -60,10 +59,10 @@
|
|||||||
"vite-tsconfig-paths": "catalog:",
|
"vite-tsconfig-paths": "catalog:",
|
||||||
"vitest": "catalog:"
|
"vitest": "catalog:"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.33.4",
|
"packageManager": "pnpm@10.33.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.15.0",
|
"node": ">=24.15.0",
|
||||||
"pnpm": ">=10.33.4"
|
"pnpm": ">=10.33.2"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
@@ -80,23 +79,23 @@
|
|||||||
"overrides": {
|
"overrides": {
|
||||||
"@babel/helpers@<7.26.10": ">=7.29.2",
|
"@babel/helpers@<7.26.10": ">=7.29.2",
|
||||||
"@babel/runtime@<7.26.10": ">=7.29.2",
|
"@babel/runtime@<7.26.10": ">=7.29.2",
|
||||||
"axios@>=1.0.0 <1.8.2": ">=1.16.1",
|
"axios@>=1.0.0 <1.8.2": ">=1.15.2",
|
||||||
"brace-expansion@>=2.0.0 <=2.0.1": ">=5.0.6",
|
"brace-expansion@>=2.0.0 <=2.0.1": ">=5.0.5",
|
||||||
"brace-expansion@>=1.0.0 <=1.1.11": ">=5.0.6",
|
"brace-expansion@>=1.0.0 <=1.1.11": ">=5.0.5",
|
||||||
"esbuild@<=0.24.2": ">=0.28.0",
|
"esbuild@<=0.24.2": ">=0.28.0",
|
||||||
"form-data@>=4.0.0 <4.0.4": ">=4.0.5",
|
"form-data@>=4.0.0 <4.0.4": ">=4.0.5",
|
||||||
"hono@<4.6.5": ">=4.12.19",
|
"hono@<4.6.5": ">=4.12.16",
|
||||||
"linkifyjs@<4.3.2": ">=4.3.3",
|
"linkifyjs@<4.3.2": ">=4.3.2",
|
||||||
"nanoid@>=4.0.0 <5.0.9": ">=5.1.11",
|
"nanoid@>=4.0.0 <5.0.9": ">=5.1.11",
|
||||||
"prismjs@<1.30.0": ">=1.30.0",
|
"prismjs@<1.30.0": ">=1.30.0",
|
||||||
"proxmox-api>undici": "7.24.6",
|
"proxmox-api>undici": "7.24.6",
|
||||||
"react-is": "^19.2.6",
|
"react-is": "^19.2.5",
|
||||||
"rollup@>=4.0.0 <4.22.4": ">=4.60.4",
|
"rollup@>=4.0.0 <4.22.4": ">=4.60.2",
|
||||||
"sha.js@<=2.4.11": ">=2.4.12",
|
"sha.js@<=2.4.11": ">=2.4.12",
|
||||||
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.2",
|
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.2",
|
||||||
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.2",
|
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.2",
|
||||||
"tmp@<=0.2.3": ">=0.2.5",
|
"tmp@<=0.2.3": ">=0.2.5",
|
||||||
"vite@>=5.0.0 <=5.4.18": ">=8.0.13"
|
"vite@>=5.0.0 <=5.4.18": ">=8.0.10"
|
||||||
},
|
},
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@types/node-unifi": "patches/@types__node-unifi.patch",
|
"@types/node-unifi": "patches/@types__node-unifi.patch",
|
||||||
@@ -105,7 +104,6 @@
|
|||||||
"allowUnusedPatches": true,
|
"allowUnusedPatches": true,
|
||||||
"ignoredBuiltDependencies": [
|
"ignoredBuiltDependencies": [
|
||||||
"@scarf/scarf",
|
"@scarf/scarf",
|
||||||
"@swc/core",
|
|
||||||
"core-js-pure",
|
"core-js-pure",
|
||||||
"protobufjs"
|
"protobufjs"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
"@homarr/auth": "workspace:^0.1.0",
|
"@homarr/auth": "workspace:^0.1.0",
|
||||||
"@homarr/common": "workspace:^0.1.0",
|
"@homarr/common": "workspace:^0.1.0",
|
||||||
"@homarr/core": "workspace:^0.1.0",
|
"@homarr/core": "workspace:^0.1.0",
|
||||||
|
"@homarr/cron-job-api": "workspace:^0.1.0",
|
||||||
"@homarr/cron-job-status": "workspace:^0.1.0",
|
"@homarr/cron-job-status": "workspace:^0.1.0",
|
||||||
"@homarr/cron-jobs": "workspace:^0.1.0",
|
"@homarr/cron-jobs": "workspace:^0.1.0",
|
||||||
"@homarr/db": "workspace:^0.1.0",
|
"@homarr/db": "workspace:^0.1.0",
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export const appRouter = createTRPCRouter({
|
|||||||
media: lazy(() => import("./router/medias/media-router").then((mod) => mod.mediaRouter)),
|
media: lazy(() => import("./router/medias/media-router").then((mod) => mod.mediaRouter)),
|
||||||
updateChecker: lazy(() => import("./router/update-checker").then((mod) => mod.updateCheckerRouter)),
|
updateChecker: lazy(() => import("./router/update-checker").then((mod) => mod.updateCheckerRouter)),
|
||||||
certificates: lazy(() => import("./router/certificates/certificate-router").then((mod) => mod.certificateRouter)),
|
certificates: lazy(() => import("./router/certificates/certificate-router").then((mod) => mod.certificateRouter)),
|
||||||
bangs: lazy(() => import("./router/bangs/bangs-router").then((mod) => mod.bangsRouter)),
|
|
||||||
info: lazy(() => import("./router/info").then((mod) => mod.infoRouter)),
|
info: lazy(() => import("./router/info").then((mod) => mod.infoRouter)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
import { z } from "zod/v4";
|
|
||||||
|
|
||||||
import { searchDuckDuckGoBangsAsync } from "../../services/duckduckgo-bangs";
|
|
||||||
import { createTRPCRouter, publicProcedure } from "../../trpc";
|
|
||||||
|
|
||||||
export const bangsRouter = createTRPCRouter({
|
|
||||||
search: publicProcedure
|
|
||||||
.input(
|
|
||||||
z.object({
|
|
||||||
query: z.string(),
|
|
||||||
limit: z.number().int().min(1).max(50).default(20),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.query(async ({ input }) => {
|
|
||||||
return await searchDuckDuckGoBangsAsync({ query: input.query, limit: input.limit });
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
@@ -2,36 +2,33 @@ import { observable } from "@trpc/server/observable";
|
|||||||
import z from "zod/v4";
|
import z from "zod/v4";
|
||||||
|
|
||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||||
|
import { jobGroupKeys, jobNameSchema } from "@homarr/cron-job-api";
|
||||||
|
import { cronJobApi } from "@homarr/cron-job-api/client";
|
||||||
import type { TaskStatus } from "@homarr/cron-job-status";
|
import type { TaskStatus } from "@homarr/cron-job-status";
|
||||||
import { createCronJobStatusChannel } from "@homarr/cron-job-status";
|
import { createCronJobStatusChannel } from "@homarr/cron-job-status";
|
||||||
import { jobGroup } from "@homarr/cron-jobs";
|
|
||||||
import { JobManager } from "@homarr/cron-jobs/job-manager";
|
|
||||||
|
|
||||||
import { createTRPCRouter, permissionRequiredProcedure } from "../trpc";
|
import { createTRPCRouter, permissionRequiredProcedure } from "../trpc";
|
||||||
|
|
||||||
const jobGroupKeys = jobGroup.getKeys();
|
|
||||||
const jobNameSchema = z.enum(jobGroup.getKeys());
|
|
||||||
|
|
||||||
const logger = createLogger({ module: "cronJobsRouter" });
|
const logger = createLogger({ module: "cronJobsRouter" });
|
||||||
|
|
||||||
export const cronJobsRouter = createTRPCRouter({
|
export const cronJobsRouter = createTRPCRouter({
|
||||||
triggerJob: permissionRequiredProcedure
|
triggerJob: permissionRequiredProcedure
|
||||||
.requiresPermission("admin")
|
.requiresPermission("admin")
|
||||||
.input(jobNameSchema)
|
.input(jobNameSchema)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input }) => {
|
||||||
await new JobManager(ctx.db, jobGroup).triggerAsync(input);
|
await cronJobApi.trigger.mutate(input);
|
||||||
}),
|
}),
|
||||||
startJob: permissionRequiredProcedure
|
startJob: permissionRequiredProcedure
|
||||||
.requiresPermission("admin")
|
.requiresPermission("admin")
|
||||||
.input(jobNameSchema)
|
.input(jobNameSchema)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input }) => {
|
||||||
await new JobManager(ctx.db, jobGroup).startAsync(input);
|
await cronJobApi.start.mutate(input);
|
||||||
}),
|
}),
|
||||||
stopJob: permissionRequiredProcedure
|
stopJob: permissionRequiredProcedure
|
||||||
.requiresPermission("admin")
|
.requiresPermission("admin")
|
||||||
.input(jobNameSchema)
|
.input(jobNameSchema)
|
||||||
.mutation(({ input, ctx }) => {
|
.mutation(async ({ input }) => {
|
||||||
new JobManager(ctx.db, jobGroup).stop(input);
|
await cronJobApi.stop.mutate(input);
|
||||||
}),
|
}),
|
||||||
updateJobInterval: permissionRequiredProcedure
|
updateJobInterval: permissionRequiredProcedure
|
||||||
.requiresPermission("admin")
|
.requiresPermission("admin")
|
||||||
@@ -41,23 +38,23 @@ export const cronJobsRouter = createTRPCRouter({
|
|||||||
cron: z.string(),
|
cron: z.string(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input }) => {
|
||||||
await new JobManager(ctx.db, jobGroup).updateIntervalAsync(input.name, input.cron);
|
await cronJobApi.updateInterval.mutate(input);
|
||||||
}),
|
}),
|
||||||
disableJob: permissionRequiredProcedure
|
disableJob: permissionRequiredProcedure
|
||||||
.requiresPermission("admin")
|
.requiresPermission("admin")
|
||||||
.input(jobNameSchema)
|
.input(jobNameSchema)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input }) => {
|
||||||
await new JobManager(ctx.db, jobGroup).disableAsync(input);
|
await cronJobApi.disable.mutate(input);
|
||||||
}),
|
}),
|
||||||
enableJob: permissionRequiredProcedure
|
enableJob: permissionRequiredProcedure
|
||||||
.requiresPermission("admin")
|
.requiresPermission("admin")
|
||||||
.input(jobNameSchema)
|
.input(jobNameSchema)
|
||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input }) => {
|
||||||
await new JobManager(ctx.db, jobGroup).enableAsync(input);
|
await cronJobApi.enable.mutate(input);
|
||||||
}),
|
}),
|
||||||
getJobs: permissionRequiredProcedure.requiresPermission("admin").query(async ({ ctx }) => {
|
getJobs: permissionRequiredProcedure.requiresPermission("admin").query(async () => {
|
||||||
return await new JobManager(ctx.db, jobGroup).getAllAsync();
|
return await cronJobApi.getAll.query();
|
||||||
}),
|
}),
|
||||||
subscribeToStatusUpdates: permissionRequiredProcedure.requiresPermission("admin").subscription(() => {
|
subscribeToStatusUpdates: permissionRequiredProcedure.requiresPermission("admin").subscription(() => {
|
||||||
return observable<TaskStatus>((emit) => {
|
return observable<TaskStatus>((emit) => {
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ const getContainerOrThrowAsync = async (id: string) => {
|
|||||||
interface DockerContainer {
|
interface DockerContainer {
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
host: string;
|
|
||||||
state: ContainerState;
|
state: ContainerState;
|
||||||
image: string;
|
image: string;
|
||||||
ports: Port[] | undefined;
|
ports: Port[] | undefined;
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import {
|
|||||||
userChangePasswordApiSchema,
|
userChangePasswordApiSchema,
|
||||||
userChangeSearchPreferencesSchema,
|
userChangeSearchPreferencesSchema,
|
||||||
userCreateSchema,
|
userCreateSchema,
|
||||||
userDdgBangsSchema,
|
|
||||||
userEditProfileSchema,
|
userEditProfileSchema,
|
||||||
userFirstDayOfWeekSchema,
|
userFirstDayOfWeekSchema,
|
||||||
userInitSchema,
|
userInitSchema,
|
||||||
@@ -277,7 +276,6 @@ export const userRouter = createTRPCRouter({
|
|||||||
pingIconsEnabled: true,
|
pingIconsEnabled: true,
|
||||||
defaultSearchEngineId: true,
|
defaultSearchEngineId: true,
|
||||||
openSearchInNewTab: true,
|
openSearchInNewTab: true,
|
||||||
ddgBangs: true,
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.meta({ openapi: { method: "GET", path: "/api/users/{userId}", tags: ["users"], protect: true } })
|
.meta({ openapi: { method: "GET", path: "/api/users/{userId}", tags: ["users"], protect: true } })
|
||||||
@@ -303,7 +301,6 @@ export const userRouter = createTRPCRouter({
|
|||||||
pingIconsEnabled: true,
|
pingIconsEnabled: true,
|
||||||
defaultSearchEngineId: true,
|
defaultSearchEngineId: true,
|
||||||
openSearchInNewTab: true,
|
openSearchInNewTab: true,
|
||||||
ddgBangs: true,
|
|
||||||
},
|
},
|
||||||
where: eq(users.id, input.userId),
|
where: eq(users.id, input.userId),
|
||||||
});
|
});
|
||||||
@@ -544,33 +541,6 @@ export const userRouter = createTRPCRouter({
|
|||||||
})
|
})
|
||||||
.where(eq(users.id, ctx.session.user.id));
|
.where(eq(users.id, ctx.session.user.id));
|
||||||
}),
|
}),
|
||||||
changeDdgBangs: protectedProcedure
|
|
||||||
.input(convertIntersectionToZodObject(userDdgBangsSchema.and(byIdSchema)))
|
|
||||||
.output(z.void())
|
|
||||||
.meta({
|
|
||||||
openapi: {
|
|
||||||
method: "PATCH",
|
|
||||||
path: "/api/users/ddg-bangs",
|
|
||||||
tags: ["users"],
|
|
||||||
protect: true,
|
|
||||||
deprecated: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.mutation(async ({ input, ctx }) => {
|
|
||||||
if (!ctx.session.user.permissions.includes("admin") && ctx.session.user.id !== input.id) {
|
|
||||||
throw new TRPCError({
|
|
||||||
code: "NOT_FOUND",
|
|
||||||
message: "User not found",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
await ctx.db
|
|
||||||
.update(users)
|
|
||||||
.set({
|
|
||||||
ddgBangs: input.ddgBangs,
|
|
||||||
})
|
|
||||||
.where(eq(users.id, input.id));
|
|
||||||
}),
|
|
||||||
changeFirstDayOfWeek: protectedProcedure
|
changeFirstDayOfWeek: protectedProcedure
|
||||||
.input(convertIntersectionToZodObject(userFirstDayOfWeekSchema.and(byIdSchema)))
|
.input(convertIntersectionToZodObject(userFirstDayOfWeekSchema.and(byIdSchema)))
|
||||||
.output(z.void())
|
.output(z.void())
|
||||||
|
|||||||
@@ -15,13 +15,10 @@ export const changeSearchPreferencesInputSchema = userChangeSearchPreferencesSch
|
|||||||
export const changeSearchPreferencesAsync = async (
|
export const changeSearchPreferencesAsync = async (
|
||||||
db: Database,
|
db: Database,
|
||||||
session: Session,
|
session: Session,
|
||||||
input: Modify<
|
input: Modify<z.infer<typeof changeSearchPreferencesInputSchema>, { openInNewTab: boolean | undefined }>,
|
||||||
z.infer<typeof changeSearchPreferencesInputSchema>,
|
|
||||||
{ openInNewTab: boolean | undefined; ddgBangsEnabled: boolean | undefined }
|
|
||||||
>,
|
|
||||||
) => {
|
) => {
|
||||||
const user = session.user;
|
const user = session.user;
|
||||||
// Only admins can change other users search preferences
|
// Only admins can change other users passwords
|
||||||
if (!user.permissions.includes("admin") && user.id !== input.userId) {
|
if (!user.permissions.includes("admin") && user.id !== input.userId) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "NOT_FOUND",
|
code: "NOT_FOUND",
|
||||||
@@ -48,7 +45,6 @@ export const changeSearchPreferencesAsync = async (
|
|||||||
.set({
|
.set({
|
||||||
defaultSearchEngineId: input.defaultSearchEngineId,
|
defaultSearchEngineId: input.defaultSearchEngineId,
|
||||||
openSearchInNewTab: input.openInNewTab,
|
openSearchInNewTab: input.openInNewTab,
|
||||||
ddgBangs: input.ddgBangsEnabled,
|
|
||||||
})
|
})
|
||||||
.where(eq(users.id, input.userId));
|
.where(eq(users.id, input.userId));
|
||||||
};
|
};
|
||||||
@@ -2,8 +2,6 @@ import { observable } from "@trpc/server/observable";
|
|||||||
import { z } from "zod/v4";
|
import { z } from "zod/v4";
|
||||||
|
|
||||||
import type { Modify } from "@homarr/common/types";
|
import type { Modify } from "@homarr/common/types";
|
||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
|
||||||
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
|
|
||||||
import type { Integration } from "@homarr/db/schema";
|
import type { Integration } from "@homarr/db/schema";
|
||||||
import type { IntegrationKindByCategory } from "@homarr/definitions";
|
import type { IntegrationKindByCategory } from "@homarr/definitions";
|
||||||
import { getIntegrationKindsByCategory } from "@homarr/definitions";
|
import { getIntegrationKindsByCategory } from "@homarr/definitions";
|
||||||
@@ -14,8 +12,6 @@ import { calendarMonthRequestHandler } from "@homarr/request-handler/calendar";
|
|||||||
import { createManyIntegrationMiddleware } from "../../middlewares/integration";
|
import { createManyIntegrationMiddleware } from "../../middlewares/integration";
|
||||||
import { createTRPCRouter, publicProcedure } from "../../trpc";
|
import { createTRPCRouter, publicProcedure } from "../../trpc";
|
||||||
|
|
||||||
const logger = createLogger({ module: "calendarRouter" });
|
|
||||||
|
|
||||||
export const calendarRouter = createTRPCRouter({
|
export const calendarRouter = createTRPCRouter({
|
||||||
findAllEvents: publicProcedure
|
findAllEvents: publicProcedure
|
||||||
.input(
|
.input(
|
||||||
@@ -28,7 +24,7 @@ export const calendarRouter = createTRPCRouter({
|
|||||||
)
|
)
|
||||||
.concat(createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("calendar")))
|
.concat(createManyIntegrationMiddleware("query", ...getIntegrationKindsByCategory("calendar")))
|
||||||
.query(async ({ ctx, input }) => {
|
.query(async ({ ctx, input }) => {
|
||||||
const settled = await Promise.allSettled(
|
return await Promise.all(
|
||||||
ctx.integrations.map(async (integration) => {
|
ctx.integrations.map(async (integration) => {
|
||||||
const { integrationIds: _integrationIds, ...handlerInput } = input;
|
const { integrationIds: _integrationIds, ...handlerInput } = input;
|
||||||
const innerHandler = calendarMonthRequestHandler.handler(integration, handlerInput);
|
const innerHandler = calendarMonthRequestHandler.handler(integration, handlerInput);
|
||||||
@@ -44,24 +40,6 @@ export const calendarRouter = createTRPCRouter({
|
|||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
return settled.flatMap((result, index) => {
|
|
||||||
if (result.status === "fulfilled") {
|
|
||||||
return [result.value];
|
|
||||||
}
|
|
||||||
const integration = ctx.integrations[index];
|
|
||||||
logger.warn(
|
|
||||||
new ErrorWithMetadata(
|
|
||||||
"Calendar integration request failed; skipping events for this integration",
|
|
||||||
{
|
|
||||||
integrationId: integration?.id,
|
|
||||||
integrationKind: integration?.kind,
|
|
||||||
},
|
|
||||||
{ cause: result.reason },
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return [];
|
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
subscribeToEvents: publicProcedure
|
subscribeToEvents: publicProcedure
|
||||||
.input(
|
.input(
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
import { duckDuckGoBangsRequestHandler } from "@homarr/request-handler/duckduckgo-bangs";
|
|
||||||
import type { DuckDuckGoBang } from "@homarr/request-handler/duckduckgo-bangs";
|
|
||||||
|
|
||||||
// DuckDuckGo bang keys are intentionally short:
|
|
||||||
// - `t`: token (e.g. "yt"), `s`: display name, `u`: URL template (contains `{{{s}}}`)
|
|
||||||
// - `d`: domain, `c`: category, `sc`: subcategory, `r`: rank (optional)
|
|
||||||
|
|
||||||
const normalizeBangToken = (token: string) => token.toLowerCase().trim();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Binary search to find the first index where bang.t >= tokenPrefix.
|
|
||||||
* This is O(log n) vs O(n) for findIndex, which matters because DuckDuckGo
|
|
||||||
* has ~13,000+ bangs. Combined with the pre-sorted data, this allows
|
|
||||||
* efficient prefix matching by finding the start position and iterating
|
|
||||||
* only through consecutive matches.
|
|
||||||
*/
|
|
||||||
const lowerBound = (arr: DuckDuckGoBang[], tokenPrefix: string) => {
|
|
||||||
let low = 0;
|
|
||||||
let high = arr.length;
|
|
||||||
while (low < high) {
|
|
||||||
const mid = (low + high) >> 1;
|
|
||||||
const midBang = arr[mid];
|
|
||||||
// Must use the same ordering as the source list sort (localeCompare),
|
|
||||||
// otherwise binary search can miss tokens with symbols like "&" or "_".
|
|
||||||
if (!midBang || midBang.t.localeCompare(tokenPrefix) >= 0) {
|
|
||||||
high = mid;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
low = mid + 1;
|
|
||||||
}
|
|
||||||
return low;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const searchDuckDuckGoBangsAsync = async (input: {
|
|
||||||
query: string;
|
|
||||||
limit: number;
|
|
||||||
}): Promise<DuckDuckGoBang[]> => {
|
|
||||||
const queryTokenPrefix = normalizeBangToken(input.query);
|
|
||||||
if (!queryTokenPrefix) return [];
|
|
||||||
|
|
||||||
const { data: allBangs } = await duckDuckGoBangsRequestHandler.handler({}).getCachedOrUpdatedDataAsync({});
|
|
||||||
const startIndex = lowerBound(allBangs, queryTokenPrefix);
|
|
||||||
const matches: DuckDuckGoBang[] = [];
|
|
||||||
|
|
||||||
for (let index = startIndex; index < allBangs.length; index++) {
|
|
||||||
const bang = allBangs[index];
|
|
||||||
if (!bang) break;
|
|
||||||
if (!bang.t.startsWith(queryTokenPrefix)) break;
|
|
||||||
matches.push(bang);
|
|
||||||
if (matches.length >= input.limit) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return matches;
|
|
||||||
};
|
|
||||||
@@ -5,26 +5,3 @@ export const capitalize = <T extends string>(str: T) => {
|
|||||||
export const isNullOrWhitespace = (value: string | null): value is null => {
|
export const isNullOrWhitespace = (value: string | null): value is null => {
|
||||||
return value == null || value.trim() === "";
|
return value == null || value.trim() === "";
|
||||||
};
|
};
|
||||||
|
|
||||||
export const bestMatch = <TItem extends Record<string, unknown>>(
|
|
||||||
search: string,
|
|
||||||
options: TItem[],
|
|
||||||
by: (item: TItem) => string,
|
|
||||||
) => {
|
|
||||||
if (options.length === 0) return null;
|
|
||||||
|
|
||||||
const normalizedSearch = search.toLowerCase().trim();
|
|
||||||
|
|
||||||
return options.reduce<TItem | null>((best, current) => {
|
|
||||||
const currentMatchIndex = by(current).toLowerCase().indexOf(normalizedSearch);
|
|
||||||
|
|
||||||
if (currentMatchIndex === -1) return best;
|
|
||||||
if (best === null) return current;
|
|
||||||
|
|
||||||
const bestMatchIndex = by(best).toLowerCase().indexOf(normalizedSearch);
|
|
||||||
|
|
||||||
if (currentMatchIndex < bestMatchIndex) return current;
|
|
||||||
if (by(current).length < by(best).length && currentMatchIndex === bestMatchIndex) return current;
|
|
||||||
return best;
|
|
||||||
}, null);
|
|
||||||
};
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, expect, test } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
import { bestMatch, capitalize } from "../string";
|
import { capitalize } from "../string";
|
||||||
|
|
||||||
const capitalizeTestCases = [
|
const capitalizeTestCases = [
|
||||||
["hello", "Hello"],
|
["hello", "Hello"],
|
||||||
@@ -12,45 +12,8 @@ const capitalizeTestCases = [
|
|||||||
|
|
||||||
describe("capitalize should capitalize the first letter of a string", () => {
|
describe("capitalize should capitalize the first letter of a string", () => {
|
||||||
capitalizeTestCases.forEach(([input, expected]) => {
|
capitalizeTestCases.forEach(([input, expected]) => {
|
||||||
test(`should capitalize ${input} to ${expected}`, () => {
|
it(`should capitalize ${input} to ${expected}`, () => {
|
||||||
expect(capitalize(input)).toEqual(expected);
|
expect(capitalize(input)).toEqual(expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("bestMatch should find the best match in an array of options", () => {
|
|
||||||
test("should find exact match for 'nginx'", () => {
|
|
||||||
const options = [
|
|
||||||
{ name: "my-nginx" },
|
|
||||||
{ name: "nginx-proxy" },
|
|
||||||
{ name: "nginx" },
|
|
||||||
{ name: "redis" },
|
|
||||||
{ name: "postgres" },
|
|
||||||
];
|
|
||||||
|
|
||||||
const result = bestMatch("nginx", options, ({ name }) => name);
|
|
||||||
|
|
||||||
expect(result).toEqual({ name: "nginx" });
|
|
||||||
});
|
|
||||||
test("should find closest match for 'nginx' when exact match is not available", () => {
|
|
||||||
const options = [{ name: "redis" }, { name: "nginx-proxy" }, { name: "my-nginx" }, { name: "postgres" }];
|
|
||||||
|
|
||||||
const result = bestMatch("nginx", options, ({ name }) => name);
|
|
||||||
|
|
||||||
expect(result).toEqual({ name: "nginx-proxy" });
|
|
||||||
});
|
|
||||||
test("should return null if no match is found", () => {
|
|
||||||
const options = [{ name: "redis" }, { name: "postgres" }];
|
|
||||||
|
|
||||||
const result = bestMatch("nginx", options, ({ name }) => name);
|
|
||||||
|
|
||||||
expect(result).toBeNull();
|
|
||||||
});
|
|
||||||
test("should return null if options array is empty", () => {
|
|
||||||
const options: { name: string }[] = [];
|
|
||||||
|
|
||||||
const result = bestMatch("nginx", options, ({ name }) => name);
|
|
||||||
|
|
||||||
expect(result).toBeNull();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, expect, test } from "vitest";
|
import { describe, expect, test } from "vitest";
|
||||||
|
|
||||||
import { getPortFromUrl, isAbsoluteUrl } from "../url.js";
|
import { getPortFromUrl } from "../url";
|
||||||
|
|
||||||
describe("getPortFromUrl", () => {
|
describe("getPortFromUrl", () => {
|
||||||
test.each([
|
test.each([
|
||||||
@@ -38,21 +38,3 @@ describe("getPortFromUrl", () => {
|
|||||||
expect(act).toThrowError("Unsupported protocol: ftp:");
|
expect(act).toThrowError("Unsupported protocol: ftp:");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("isAbsoluteUrl", () => {
|
|
||||||
test.each([
|
|
||||||
["http://example.com", true],
|
|
||||||
["https://example.com", true],
|
|
||||||
["ftp://example.com", true],
|
|
||||||
["file:///path/to/file", true],
|
|
||||||
["mailto:johndoe@example.com", true],
|
|
||||||
["/relative/path", false],
|
|
||||||
["relative/path", false],
|
|
||||||
])("should return %s for URL: %s", (urlString, expected) => {
|
|
||||||
// Act
|
|
||||||
const result = isAbsoluteUrl(urlString);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(result).toBe(expected);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -38,9 +38,3 @@ export const getPortFromUrl = (url: URL): number => {
|
|||||||
|
|
||||||
throw new Error(`Unsupported protocol: ${url.protocol}`);
|
throw new Error(`Unsupported protocol: ${url.protocol}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const absoluteUrlRegex = /^[a-z]+:(\/\/)?/;
|
|
||||||
|
|
||||||
export const isAbsoluteUrl = (urlOrPath: string): boolean => {
|
|
||||||
return absoluteUrlRegex.test(urlOrPath.toLowerCase());
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import baseConfig from "@homarr/eslint-config/base";
|
||||||
|
|
||||||
|
/** @type {import('typescript-eslint').Config} */
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: [],
|
||||||
|
},
|
||||||
|
...baseConfig,
|
||||||
|
];
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"name": "@homarr/cron-job-api",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./src/index.ts",
|
||||||
|
"./env": "./src/env.ts",
|
||||||
|
"./constants": "./src/constants.ts",
|
||||||
|
"./client": "./src/client.ts"
|
||||||
|
},
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
"*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"clean": "rm -rf .turbo node_modules",
|
||||||
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||||
|
"lint": "eslint",
|
||||||
|
"typecheck": "tsc --noEmit"
|
||||||
|
},
|
||||||
|
"prettier": "@homarr/prettier-config",
|
||||||
|
"dependencies": {
|
||||||
|
"@homarr/common": "workspace:^0.1.0",
|
||||||
|
"@homarr/core": "workspace:^0.1.0",
|
||||||
|
"@homarr/cron-jobs": "workspace:^0.1.0",
|
||||||
|
"@tanstack/react-query": "catalog:",
|
||||||
|
"@trpc/client": "catalog:",
|
||||||
|
"@trpc/server": "catalog:",
|
||||||
|
"@trpc/tanstack-react-query": "catalog:",
|
||||||
|
"react": "catalog:",
|
||||||
|
"zod": "catalog:"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||||
|
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||||
|
"@types/react": "catalog:",
|
||||||
|
"eslint": "catalog:",
|
||||||
|
"typescript": "catalog:"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { createTRPCClient, httpLink } from "@trpc/client";
|
||||||
|
|
||||||
|
import type { JobRouter } from ".";
|
||||||
|
import { CRON_JOB_API_KEY_HEADER, CRON_JOB_API_PATH, CRON_JOB_API_PORT } from "./constants";
|
||||||
|
import { env } from "./env";
|
||||||
|
|
||||||
|
export const cronJobApi = createTRPCClient<JobRouter>({
|
||||||
|
links: [
|
||||||
|
httpLink({
|
||||||
|
url: `${getBaseUrl()}${CRON_JOB_API_PATH}`,
|
||||||
|
headers: {
|
||||||
|
[CRON_JOB_API_KEY_HEADER]: env.CRON_JOB_API_KEY,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
function getBaseUrl() {
|
||||||
|
return `http://localhost:${CRON_JOB_API_PORT}`;
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export const CRON_JOB_API_PORT = 3002;
|
||||||
|
export const CRON_JOB_API_PATH = "/trpc";
|
||||||
|
export const CRON_JOB_API_KEY_HEADER = "cron-job-api-key";
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { z } from "zod/v4";
|
||||||
|
|
||||||
|
import { env as commonEnv } from "@homarr/common/env";
|
||||||
|
import { createEnv } from "@homarr/core/infrastructure/env";
|
||||||
|
|
||||||
|
export const env = createEnv({
|
||||||
|
server: {
|
||||||
|
CRON_JOB_API_KEY: commonEnv.NODE_ENV === "development" ? z.string().default("test") : z.string(),
|
||||||
|
},
|
||||||
|
experimental__runtimeEnv: process.env,
|
||||||
|
});
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
import { initTRPC, TRPCError } from "@trpc/server";
|
||||||
|
import { z } from "zod/v4";
|
||||||
|
|
||||||
|
import type { JobGroupKeys } from "@homarr/cron-jobs";
|
||||||
|
import { jobGroup } from "@homarr/cron-jobs";
|
||||||
|
|
||||||
|
import { env } from "./env";
|
||||||
|
|
||||||
|
export const jobGroupKeys = jobGroup.getKeys();
|
||||||
|
export const jobNameSchema = z.enum(jobGroup.getKeys());
|
||||||
|
|
||||||
|
export interface IJobManager {
|
||||||
|
startAsync(name: JobGroupKeys): Promise<void>;
|
||||||
|
triggerAsync(name: JobGroupKeys): Promise<void>;
|
||||||
|
stop(name: JobGroupKeys): void;
|
||||||
|
updateIntervalAsync(name: JobGroupKeys, cron: string): Promise<void>;
|
||||||
|
disableAsync(name: JobGroupKeys): Promise<void>;
|
||||||
|
enableAsync(name: JobGroupKeys): Promise<void>;
|
||||||
|
getAllAsync(): Promise<
|
||||||
|
{
|
||||||
|
name: JobGroupKeys;
|
||||||
|
cron: string;
|
||||||
|
preventManualExecution: boolean;
|
||||||
|
preventCustomInterval: boolean;
|
||||||
|
isEnabled: boolean;
|
||||||
|
}[]
|
||||||
|
>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const t = initTRPC
|
||||||
|
.context<{
|
||||||
|
manager: IJobManager;
|
||||||
|
apiKey?: string;
|
||||||
|
}>()
|
||||||
|
.create();
|
||||||
|
|
||||||
|
const createTrpcRouter = t.router;
|
||||||
|
const apiKeyProcedure = t.procedure.use(({ ctx, next }) => {
|
||||||
|
if (ctx.apiKey !== env.CRON_JOB_API_KEY) {
|
||||||
|
throw new TRPCError({
|
||||||
|
code: "FORBIDDEN",
|
||||||
|
message: "Missing or invalid API key",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return next({
|
||||||
|
ctx: {
|
||||||
|
...ctx,
|
||||||
|
apiKey: undefined, // Clear the API key after checking
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
export const jobRouter = createTrpcRouter({
|
||||||
|
start: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
||||||
|
await ctx.manager.startAsync(input);
|
||||||
|
}),
|
||||||
|
trigger: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
||||||
|
await ctx.manager.triggerAsync(input);
|
||||||
|
}),
|
||||||
|
stop: apiKeyProcedure.input(jobNameSchema).mutation(({ input, ctx }) => {
|
||||||
|
ctx.manager.stop(input);
|
||||||
|
}),
|
||||||
|
updateInterval: apiKeyProcedure
|
||||||
|
.input(
|
||||||
|
z.object({
|
||||||
|
name: jobNameSchema,
|
||||||
|
cron: z.string(),
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.mutation(async ({ input, ctx }) => {
|
||||||
|
await ctx.manager.updateIntervalAsync(input.name, input.cron);
|
||||||
|
}),
|
||||||
|
disable: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
||||||
|
await ctx.manager.disableAsync(input);
|
||||||
|
}),
|
||||||
|
enable: apiKeyProcedure.input(jobNameSchema).mutation(async ({ input, ctx }) => {
|
||||||
|
await ctx.manager.enableAsync(input);
|
||||||
|
}),
|
||||||
|
getAll: apiKeyProcedure.query(({ ctx }) => {
|
||||||
|
return ctx.manager.getAllAsync();
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
export type JobRouter = typeof jobRouter;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": "@homarr/tsconfig/base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
|
||||||
|
},
|
||||||
|
"include": ["*.ts", "src"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
@@ -5,8 +5,7 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.ts",
|
".": "./index.ts"
|
||||||
"./job-manager": "./src/job-manager.ts"
|
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
@@ -39,8 +38,7 @@
|
|||||||
"@homarr/server-settings": "workspace:^0.1.0",
|
"@homarr/server-settings": "workspace:^0.1.0",
|
||||||
"@homarr/translation": "workspace:^0.1.0",
|
"@homarr/translation": "workspace:^0.1.0",
|
||||||
"@homarr/validation": "workspace:^0.1.0",
|
"@homarr/validation": "workspace:^0.1.0",
|
||||||
"semver-parser": "catalog:",
|
"semver-parser": "catalog:"
|
||||||
"zod": "catalog:"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
|
|||||||
@@ -28,45 +28,34 @@ import { updateCheckerJob } from "./jobs/update-checker";
|
|||||||
import { weatherJob } from "./jobs/weather";
|
import { weatherJob } from "./jobs/weather";
|
||||||
import { createCronJobGroup } from "./lib";
|
import { createCronJobGroup } from "./lib";
|
||||||
|
|
||||||
const getJobGroup = () => {
|
export const jobGroup = createCronJobGroup({
|
||||||
return createCronJobGroup({
|
analytics: analyticsJob,
|
||||||
analytics: analyticsJob,
|
iconsUpdater: iconsUpdaterJob,
|
||||||
iconsUpdater: iconsUpdaterJob,
|
ping: pingJob,
|
||||||
ping: pingJob,
|
smartHomeEntityState: smartHomeEntityStateJob,
|
||||||
smartHomeEntityState: smartHomeEntityStateJob,
|
mediaServer: mediaServerJob,
|
||||||
mediaServer: mediaServerJob,
|
mediaOrganizer: mediaOrganizerJob,
|
||||||
mediaOrganizer: mediaOrganizerJob,
|
downloads: downloadsJob,
|
||||||
downloads: downloadsJob,
|
dnsHole: dnsHoleJob,
|
||||||
dnsHole: dnsHoleJob,
|
mediaRequestStats: mediaRequestStatsJob,
|
||||||
mediaRequestStats: mediaRequestStatsJob,
|
mediaRequestList: mediaRequestListJob,
|
||||||
mediaRequestList: mediaRequestListJob,
|
rssFeeds: rssFeedsJob,
|
||||||
rssFeeds: rssFeedsJob,
|
indexerManager: indexerManagerJob,
|
||||||
indexerManager: indexerManagerJob,
|
healthMonitoring: healthMonitoringJob,
|
||||||
healthMonitoring: healthMonitoringJob,
|
updateChecker: updateCheckerJob,
|
||||||
updateChecker: updateCheckerJob,
|
mediaTranscoding: mediaTranscodingJob,
|
||||||
mediaTranscoding: mediaTranscodingJob,
|
minecraftServerStatus: minecraftServerStatusJob,
|
||||||
minecraftServerStatus: minecraftServerStatusJob,
|
dockerContainers: dockerContainersJob,
|
||||||
dockerContainers: dockerContainersJob,
|
networkController: networkControllerJob,
|
||||||
networkController: networkControllerJob,
|
firewallCpu: firewallCpuJob,
|
||||||
firewallCpu: firewallCpuJob,
|
firewallMemory: firewallMemoryJob,
|
||||||
firewallMemory: firewallMemoryJob,
|
firewallVersion: firewallVersionJob,
|
||||||
firewallVersion: firewallVersionJob,
|
firewallInterfaces: firewallInterfacesJob,
|
||||||
firewallInterfaces: firewallInterfacesJob,
|
refreshNotifications: refreshNotificationsJob,
|
||||||
refreshNotifications: refreshNotificationsJob,
|
weather: weatherJob,
|
||||||
weather: weatherJob,
|
timetable: timetableJob,
|
||||||
timetable: timetableJob,
|
tracearr: tracearrJob,
|
||||||
tracearr: tracearrJob,
|
umamiActiveVisitors: umamiActiveVisitorsJob,
|
||||||
umamiActiveVisitors: umamiActiveVisitorsJob,
|
});
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Add global type augmentation for homarr
|
|
||||||
declare global {
|
|
||||||
var cronJobs: ReturnType<typeof getJobGroup> | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
global.cronJobs ??= getJobGroup();
|
|
||||||
|
|
||||||
export const jobGroup = global.cronJobs;
|
|
||||||
|
|
||||||
export type JobGroupKeys = ReturnType<(typeof jobGroup)["getKeys"]>[number];
|
export type JobGroupKeys = ReturnType<(typeof jobGroup)["getKeys"]>[number];
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE `user` ADD `ddg_bangs` boolean DEFAULT true NOT NULL;
|
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -267,13 +267,6 @@
|
|||||||
"when": 1775399941430,
|
"when": 1775399941430,
|
||||||
"tag": "0037_remove_salt",
|
"tag": "0037_remove_salt",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 38,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1775400000000,
|
|
||||||
"tag": "0038_add_user_ddg_bangs",
|
|
||||||
"breakpoints": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE "user" ADD COLUMN "ddg_bangs" boolean DEFAULT true NOT NULL;
|
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -29,13 +29,6 @@
|
|||||||
"when": 1775399963041,
|
"when": 1775399963041,
|
||||||
"tag": "0003_remove_salt",
|
"tag": "0003_remove_salt",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 4,
|
|
||||||
"version": "7",
|
|
||||||
"when": 1775400000000,
|
|
||||||
"tag": "0004_add_user_ddg_bangs",
|
|
||||||
"breakpoints": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import { createId, objectKeys } from "@homarr/common";
|
import { createId, objectKeys } from "@homarr/common";
|
||||||
import {
|
import {
|
||||||
createDocumentationLink,
|
createDocumentationLink,
|
||||||
credentialsAdminGroup,
|
|
||||||
everyoneGroup,
|
everyoneGroup,
|
||||||
getIntegrationDefaultUrl,
|
getIntegrationDefaultUrl,
|
||||||
getIntegrationName,
|
getIntegrationName,
|
||||||
@@ -12,24 +11,12 @@ import { defaultServerSettings, defaultServerSettingsKeys } from "@homarr/server
|
|||||||
|
|
||||||
import type { Database } from "..";
|
import type { Database } from "..";
|
||||||
import { eq } from "..";
|
import { eq } from "..";
|
||||||
import { getMaxGroupPositionAsync } from "../queries";
|
|
||||||
import {
|
import {
|
||||||
getServerSettingByKeyAsync,
|
getServerSettingByKeyAsync,
|
||||||
insertServerSettingByKeyAsync,
|
insertServerSettingByKeyAsync,
|
||||||
updateServerSettingByKeyAsync,
|
updateServerSettingByKeyAsync,
|
||||||
} from "../queries/server-setting";
|
} from "../queries/server-setting";
|
||||||
import {
|
import { groups, integrations, onboarding, searchEngines } from "../schema";
|
||||||
boards,
|
|
||||||
groupMembers,
|
|
||||||
groupPermissions,
|
|
||||||
groups,
|
|
||||||
integrations,
|
|
||||||
layouts,
|
|
||||||
onboarding,
|
|
||||||
searchEngines,
|
|
||||||
sections,
|
|
||||||
users,
|
|
||||||
} from "../schema";
|
|
||||||
import type { Integration } from "../schema";
|
import type { Integration } from "../schema";
|
||||||
|
|
||||||
export const seedDataAsync = async (db: Database) => {
|
export const seedDataAsync = async (db: Database) => {
|
||||||
@@ -38,10 +25,6 @@ export const seedDataAsync = async (db: Database) => {
|
|||||||
await seedServerSettingsAsync(db);
|
await seedServerSettingsAsync(db);
|
||||||
await seedDefaultSearchEnginesAsync(db);
|
await seedDefaultSearchEnginesAsync(db);
|
||||||
await seedDefaultIntegrationsAsync(db);
|
await seedDefaultIntegrationsAsync(db);
|
||||||
|
|
||||||
if (process.env.DEMO_MODE === "true") {
|
|
||||||
await seedDemoUserAsync(db);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const seedEveryoneGroupAsync = async (db: Database) => {
|
const seedEveryoneGroupAsync = async (db: Database) => {
|
||||||
@@ -208,72 +191,3 @@ const seedDefaultIntegrationsAsync = async (db: Database) => {
|
|||||||
|
|
||||||
console.log(`Created ${createdCount} default integrations through seeding process`);
|
console.log(`Created ${createdCount} default integrations through seeding process`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const seedDemoUserAsync = async (db: Database) => {
|
|
||||||
const existingUser = await db.query.users.findFirst({
|
|
||||||
where: eq(users.name, "demo"),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (existingUser) {
|
|
||||||
console.log("Skipping seeding of demo user as it already exists");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const userId = createId();
|
|
||||||
|
|
||||||
await db.insert(users).values({
|
|
||||||
id: userId,
|
|
||||||
name: "demo",
|
|
||||||
email: "demo@example.com",
|
|
||||||
password: "$2b$10$c5AaQb0oj32/bui5Z55PyOb7pY.iEkXYqgdD8MjS9LjSjLMeOkZu2",
|
|
||||||
});
|
|
||||||
|
|
||||||
const maxPosition = await getMaxGroupPositionAsync(db);
|
|
||||||
const groupId = createId();
|
|
||||||
await db.insert(groups).values({
|
|
||||||
id: groupId,
|
|
||||||
name: credentialsAdminGroup,
|
|
||||||
ownerId: userId,
|
|
||||||
position: maxPosition + 1,
|
|
||||||
});
|
|
||||||
await db.insert(groupPermissions).values({
|
|
||||||
groupId,
|
|
||||||
permission: "admin",
|
|
||||||
});
|
|
||||||
await db.insert(groupMembers).values({
|
|
||||||
groupId,
|
|
||||||
userId,
|
|
||||||
});
|
|
||||||
|
|
||||||
await db.update(onboarding).set({
|
|
||||||
step: "finish",
|
|
||||||
previousStep: "settings",
|
|
||||||
});
|
|
||||||
|
|
||||||
const boardId = createId();
|
|
||||||
await db.insert(boards).values({
|
|
||||||
id: boardId,
|
|
||||||
name: "default",
|
|
||||||
isPublic: false,
|
|
||||||
creatorId: userId,
|
|
||||||
});
|
|
||||||
await db.insert(sections).values({
|
|
||||||
id: createId(),
|
|
||||||
kind: "empty",
|
|
||||||
xOffset: 0,
|
|
||||||
yOffset: 0,
|
|
||||||
boardId,
|
|
||||||
});
|
|
||||||
await db.insert(layouts).values({
|
|
||||||
id: createId(),
|
|
||||||
name: "Base",
|
|
||||||
columnCount: 12,
|
|
||||||
breakpoint: 0,
|
|
||||||
boardId,
|
|
||||||
});
|
|
||||||
await db.update(users).set({ homeBoardId: boardId }).where(eq(users.id, userId));
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
"Your instance has enabled demo mode. Homarr therefore created example data for your demo. You can disable demo mode anytime by setting the env 'DEMO_MODE' to 'false' or unset it.",
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE `user` ADD `ddg_bangs` integer DEFAULT true NOT NULL;
|
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -253,13 +253,6 @@
|
|||||||
"when": 1775399918831,
|
"when": 1775399918831,
|
||||||
"tag": "0035_remove_salt",
|
"tag": "0035_remove_salt",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 36,
|
|
||||||
"version": "6",
|
|
||||||
"when": 1775400000000,
|
|
||||||
"tag": "0036_add_user_ddg_bangs",
|
|
||||||
"breakpoints": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,6 @@ export const users = mysqlTable("user", {
|
|||||||
onDelete: "set null",
|
onDelete: "set null",
|
||||||
}),
|
}),
|
||||||
openSearchInNewTab: boolean().default(false).notNull(),
|
openSearchInNewTab: boolean().default(false).notNull(),
|
||||||
ddgBangs: boolean().default(true).notNull(),
|
|
||||||
colorScheme: varchar({ length: 5 }).$type<ColorScheme>().default("dark").notNull(),
|
colorScheme: varchar({ length: 5 }).$type<ColorScheme>().default("dark").notNull(),
|
||||||
firstDayOfWeek: tinyint().$type<DayOfWeek>().default(1).notNull(), // Defaults to Monday
|
firstDayOfWeek: tinyint().$type<DayOfWeek>().default(1).notNull(), // Defaults to Monday
|
||||||
pingIconsEnabled: boolean().default(false).notNull(),
|
pingIconsEnabled: boolean().default(false).notNull(),
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ export const users = pgTable("user", {
|
|||||||
onDelete: "set null",
|
onDelete: "set null",
|
||||||
}),
|
}),
|
||||||
openSearchInNewTab: boolean().default(false).notNull(),
|
openSearchInNewTab: boolean().default(false).notNull(),
|
||||||
ddgBangs: boolean().default(true).notNull(),
|
|
||||||
colorScheme: varchar({ length: 5 }).$type<ColorScheme>().default("dark").notNull(),
|
colorScheme: varchar({ length: 5 }).$type<ColorScheme>().default("dark").notNull(),
|
||||||
firstDayOfWeek: smallint().$type<DayOfWeek>().default(1).notNull(), // Defaults to Monday
|
firstDayOfWeek: smallint().$type<DayOfWeek>().default(1).notNull(), // Defaults to Monday
|
||||||
pingIconsEnabled: boolean().default(false).notNull(),
|
pingIconsEnabled: boolean().default(false).notNull(),
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ export const users = sqliteTable("user", {
|
|||||||
onDelete: "set null",
|
onDelete: "set null",
|
||||||
}),
|
}),
|
||||||
openSearchInNewTab: int({ mode: "boolean" }).default(true).notNull(),
|
openSearchInNewTab: int({ mode: "boolean" }).default(true).notNull(),
|
||||||
ddgBangs: int({ mode: "boolean" }).default(true).notNull(),
|
|
||||||
colorScheme: text().$type<ColorScheme>().default("dark").notNull(),
|
colorScheme: text().$type<ColorScheme>().default("dark").notNull(),
|
||||||
firstDayOfWeek: int().$type<DayOfWeek>().default(1).notNull(), // Defaults to Monday
|
firstDayOfWeek: int().$type<DayOfWeek>().default(1).notNull(), // Defaults to Monday
|
||||||
pingIconsEnabled: int({ mode: "boolean" }).default(false).notNull(),
|
pingIconsEnabled: int({ mode: "boolean" }).default(false).notNull(),
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ export type HomarrDocumentationPath =
|
|||||||
| "/docs/tags/roles"
|
| "/docs/tags/roles"
|
||||||
| "/docs/tags/search"
|
| "/docs/tags/search"
|
||||||
| "/docs/tags/search-engines"
|
| "/docs/tags/search-engines"
|
||||||
| "/docs/tags/secrets"
|
|
||||||
| "/docs/tags/security"
|
| "/docs/tags/security"
|
||||||
| "/docs/tags/self-signed"
|
| "/docs/tags/self-signed"
|
||||||
| "/docs/tags/seo"
|
| "/docs/tags/seo"
|
||||||
@@ -199,7 +198,6 @@ export type HomarrDocumentationPath =
|
|||||||
| "/docs/integrations/tracearr"
|
| "/docs/integrations/tracearr"
|
||||||
| "/docs/integrations/transmission"
|
| "/docs/integrations/transmission"
|
||||||
| "/docs/integrations/truenas"
|
| "/docs/integrations/truenas"
|
||||||
| "/docs/integrations/umami"
|
|
||||||
| "/docs/integrations/unifi-controller"
|
| "/docs/integrations/unifi-controller"
|
||||||
| "/docs/integrations/unraid"
|
| "/docs/integrations/unraid"
|
||||||
| "/docs/management/api"
|
| "/docs/management/api"
|
||||||
@@ -246,7 +244,6 @@ export type HomarrDocumentationPath =
|
|||||||
| "/docs/widgets/system-resources"
|
| "/docs/widgets/system-resources"
|
||||||
| "/docs/widgets/timetable"
|
| "/docs/widgets/timetable"
|
||||||
| "/docs/widgets/tracearr"
|
| "/docs/widgets/tracearr"
|
||||||
| "/docs/widgets/umami"
|
|
||||||
| "/docs/widgets/video"
|
| "/docs/widgets/video"
|
||||||
| "/docs/widgets/weather"
|
| "/docs/widgets/weather"
|
||||||
| ""
|
| ""
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export const integrationDefs = {
|
|||||||
},
|
},
|
||||||
qBittorrent: {
|
qBittorrent: {
|
||||||
name: "qBittorrent",
|
name: "qBittorrent",
|
||||||
secretKinds: [["apiKey"], ["username", "password"]],
|
secretKinds: [["username", "password"]],
|
||||||
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/svg/qbittorrent.svg",
|
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/svg/qbittorrent.svg",
|
||||||
category: ["downloadClient", "torrent"],
|
category: ["downloadClient", "torrent"],
|
||||||
documentationUrl: createDocumentationLink("/docs/integrations/q-bittorent"),
|
documentationUrl: createDocumentationLink("/docs/integrations/q-bittorent"),
|
||||||
@@ -376,6 +376,7 @@ export const integrationDefs = {
|
|||||||
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/svg/umami.svg",
|
iconUrl: "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons@master/svg/umami.svg",
|
||||||
category: ["analytics"],
|
category: ["analytics"],
|
||||||
defaultUrl: "https://api.umami.is/v1",
|
defaultUrl: "https://api.umami.is/v1",
|
||||||
|
// @ts-expect-error - docs page will be created when integration is merged
|
||||||
documentationUrl: createDocumentationLink("/docs/integrations/umami"),
|
documentationUrl: createDocumentationLink("/docs/integrations/umami"),
|
||||||
},
|
},
|
||||||
// This integration only returns mock data, it is used during development (but can also be used in production by directly going to the create page)
|
// This integration only returns mock data, it is used during development (but can also be used in production by directly going to the create page)
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ import { createBooleanSchema, createEnv } from "@homarr/core/infrastructure/env"
|
|||||||
|
|
||||||
export const env = createEnv({
|
export const env = createEnv({
|
||||||
server: {
|
server: {
|
||||||
// Comma separated list of docker hostnames that can be used to connect to query the docker endpoints (localhost,host.docker.internal, ...)
|
// Comma separated list of docker hostnames that can be used to connect to query the docker endpoints (localhost:2375,host.docker.internal:2375, ...)
|
||||||
DOCKER_HOSTNAMES: z.string().optional(),
|
DOCKER_HOSTNAMES: z.string().optional(),
|
||||||
DOCKER_PORTS: z.string().optional(),
|
DOCKER_PORTS: z.string().optional(),
|
||||||
// Comma separated paths to Docker-compatible Unix sockets (e.g., /var/run/docker.sock,/run/user/1000/podman/podman.sock)
|
|
||||||
DOCKER_SOCKET_PATHS: z.string().optional(),
|
|
||||||
ENABLE_DOCKER: createBooleanSchema(true),
|
ENABLE_DOCKER: createBooleanSchema(true),
|
||||||
ENABLE_KUBERNETES: createBooleanSchema(false),
|
ENABLE_KUBERNETES: createBooleanSchema(false),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,43 +11,31 @@ export class DockerSingleton {
|
|||||||
private static instances: DockerInstance[] | null = null;
|
private static instances: DockerInstance[] | null = null;
|
||||||
|
|
||||||
private createInstances() {
|
private createInstances() {
|
||||||
const socketPaths = env.DOCKER_SOCKET_PATHS;
|
|
||||||
const hostVariable = env.DOCKER_HOSTNAMES;
|
const hostVariable = env.DOCKER_HOSTNAMES;
|
||||||
const portVariable = env.DOCKER_PORTS;
|
const portVariable = env.DOCKER_PORTS;
|
||||||
|
if (hostVariable === undefined || portVariable === undefined) {
|
||||||
// Socket instances from DOCKER_SOCKET_PATHS
|
|
||||||
const socketInstances: DockerInstance[] = socketPaths
|
|
||||||
? socketPaths.split(",").map((socketPath) => ({
|
|
||||||
host: socketPath,
|
|
||||||
instance: new Docker({ socketPath }),
|
|
||||||
}))
|
|
||||||
: [];
|
|
||||||
|
|
||||||
// TCP instances from existing DOCKER_HOSTNAMES/DOCKER_PORTS
|
|
||||||
let tcpInstances: DockerInstance[] = [];
|
|
||||||
if (hostVariable !== undefined && portVariable !== undefined) {
|
|
||||||
const hostnames = hostVariable.split(",");
|
|
||||||
const ports = portVariable.split(",");
|
|
||||||
|
|
||||||
if (hostnames.length !== ports.length) {
|
|
||||||
throw new Error("The number of hosts and ports must match");
|
|
||||||
}
|
|
||||||
|
|
||||||
tcpInstances = hostnames.map((host, i) => ({
|
|
||||||
host: `${host}:${ports[i]}`,
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
||||||
instance: new Docker({ host, port: parseInt(ports[i]!, 10) }),
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
const instances = [...socketInstances, ...tcpInstances];
|
|
||||||
|
|
||||||
// Default: local socket if nothing else configured
|
|
||||||
if (instances.length === 0) {
|
|
||||||
return [{ host: "socket", instance: new Docker() }];
|
return [{ host: "socket", instance: new Docker() }];
|
||||||
}
|
}
|
||||||
|
const hostnames = hostVariable.split(",");
|
||||||
|
const ports = portVariable.split(",");
|
||||||
|
|
||||||
return instances;
|
if (hostnames.length !== ports.length) {
|
||||||
|
throw new Error("The number of hosts and ports must match");
|
||||||
|
}
|
||||||
|
|
||||||
|
return hostnames.map((host, i) => {
|
||||||
|
// Check above ensures that ports[i] is not undefined
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
|
const port = ports[i]!;
|
||||||
|
|
||||||
|
return {
|
||||||
|
host: `${host}:${port}`,
|
||||||
|
instance: new Docker({
|
||||||
|
host,
|
||||||
|
port: parseInt(port, 10),
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static findInstance(host: string): DockerInstance | undefined {
|
public static findInstance(host: string): DockerInstance | undefined {
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
||||||
|
|
||||||
import { DockerSingleton } from "../singleton";
|
|
||||||
|
|
||||||
const mockEnv = vi.hoisted(() => ({
|
|
||||||
DOCKER_SOCKET_PATHS: undefined as string | undefined,
|
|
||||||
DOCKER_HOSTNAMES: undefined as string | undefined,
|
|
||||||
DOCKER_PORTS: undefined as string | undefined,
|
|
||||||
ENABLE_DOCKER: true,
|
|
||||||
ENABLE_KUBERNETES: false,
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("dockerode", () => {
|
|
||||||
return {
|
|
||||||
default: class MockDocker {
|
|
||||||
constructor(public opts?: Record<string, unknown>) {}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
vi.mock("../env", () => ({
|
|
||||||
env: mockEnv,
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe("DockerSingleton", () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
// Reset singleton cache between tests
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
|
||||||
(DockerSingleton as any).instances = null;
|
|
||||||
|
|
||||||
// Reset env to defaults
|
|
||||||
mockEnv.DOCKER_SOCKET_PATHS = undefined;
|
|
||||||
mockEnv.DOCKER_HOSTNAMES = undefined;
|
|
||||||
mockEnv.DOCKER_PORTS = undefined;
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return default socket when no env vars set", () => {
|
|
||||||
const instances = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(instances).toHaveLength(1);
|
|
||||||
expect(instances[0]?.host).toBe("socket");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return TCP instances only when DOCKER_HOSTNAMES and DOCKER_PORTS set", () => {
|
|
||||||
mockEnv.DOCKER_HOSTNAMES = "remote-host";
|
|
||||||
mockEnv.DOCKER_PORTS = "2375";
|
|
||||||
|
|
||||||
const instances = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(instances).toHaveLength(1);
|
|
||||||
expect(instances[0]?.host).toBe("remote-host:2375");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return multiple TCP instances", () => {
|
|
||||||
mockEnv.DOCKER_HOSTNAMES = "host1,host2";
|
|
||||||
mockEnv.DOCKER_PORTS = "2375,2376";
|
|
||||||
|
|
||||||
const instances = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(instances).toHaveLength(2);
|
|
||||||
expect(instances[0]?.host).toBe("host1:2375");
|
|
||||||
expect(instances[1]?.host).toBe("host2:2376");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should throw when hostname and port counts do not match", () => {
|
|
||||||
mockEnv.DOCKER_HOSTNAMES = "host1,host2";
|
|
||||||
mockEnv.DOCKER_PORTS = "2375";
|
|
||||||
|
|
||||||
expect(() => DockerSingleton.getInstances()).toThrow("The number of hosts and ports must match");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return socket instances when DOCKER_SOCKET_PATHS set", () => {
|
|
||||||
mockEnv.DOCKER_SOCKET_PATHS = "/var/run/docker.sock";
|
|
||||||
|
|
||||||
const instances = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(instances).toHaveLength(1);
|
|
||||||
expect(instances[0]?.host).toBe("/var/run/docker.sock");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return multiple socket instances", () => {
|
|
||||||
mockEnv.DOCKER_SOCKET_PATHS = "/var/run/docker.sock,/run/user/1000/podman/podman.sock";
|
|
||||||
|
|
||||||
const instances = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(instances).toHaveLength(2);
|
|
||||||
expect(instances[0]?.host).toBe("/var/run/docker.sock");
|
|
||||||
expect(instances[1]?.host).toBe("/run/user/1000/podman/podman.sock");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should combine socket and TCP instances", () => {
|
|
||||||
mockEnv.DOCKER_SOCKET_PATHS = "/var/run/docker.sock,/run/user/1000/podman/podman.sock";
|
|
||||||
mockEnv.DOCKER_HOSTNAMES = "remote-host";
|
|
||||||
mockEnv.DOCKER_PORTS = "2375";
|
|
||||||
|
|
||||||
const instances = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(instances).toHaveLength(3);
|
|
||||||
expect(instances[0]?.host).toBe("/var/run/docker.sock");
|
|
||||||
expect(instances[1]?.host).toBe("/run/user/1000/podman/podman.sock");
|
|
||||||
expect(instances[2]?.host).toBe("remote-host:2375");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should cache instances on subsequent calls", () => {
|
|
||||||
const first = DockerSingleton.getInstances();
|
|
||||||
const second = DockerSingleton.getInstances();
|
|
||||||
|
|
||||||
expect(first).toBe(second);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -90,18 +90,10 @@ export class QBitTorrentIntegration extends Integration implements IDownloadClie
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async getClientAsync(dispatcher?: Dispatcher) {
|
private async getClientAsync(dispatcher?: Dispatcher) {
|
||||||
const credentials = this.hasSecretValue("apiKey")
|
|
||||||
? {
|
|
||||||
apiKey: this.getSecretValue("apiKey"),
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
username: this.getSecretValue("username"),
|
|
||||||
password: this.getSecretValue("password"),
|
|
||||||
};
|
|
||||||
|
|
||||||
return new QBittorrent({
|
return new QBittorrent({
|
||||||
...credentials,
|
|
||||||
baseUrl: this.url("/").toString(),
|
baseUrl: this.url("/").toString(),
|
||||||
|
username: this.getSecretValue("username"),
|
||||||
|
password: this.getSecretValue("password"),
|
||||||
dispatcher: dispatcher ?? (await createCertificateAgentAsync()),
|
dispatcher: dispatcher ?? (await createCertificateAgentAsync()),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { isAbsoluteUrl } from "@homarr/common";
|
|
||||||
import { ResponseError } from "@homarr/common/server";
|
import { ResponseError } from "@homarr/common/server";
|
||||||
import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/http";
|
import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/http";
|
||||||
import { ImageProxy } from "@homarr/image-proxy";
|
import { ImageProxy } from "@homarr/image-proxy";
|
||||||
@@ -86,10 +85,10 @@ export class TracearrIntegration extends Integration {
|
|||||||
data: await Promise.all(
|
data: await Promise.all(
|
||||||
json.data.map(async (stream) => {
|
json.data.map(async (stream) => {
|
||||||
if (stream.userAvatarUrl) {
|
if (stream.userAvatarUrl) {
|
||||||
stream.userAvatarUrl = await this.proxyImageAsync(imageProxy, stream.userAvatarUrl);
|
stream.userAvatarUrl = await this.proxyImageAsync(imageProxy, stream.userAvatarUrl, stream.id, "avatar");
|
||||||
}
|
}
|
||||||
if (stream.posterUrl) {
|
if (stream.posterUrl) {
|
||||||
stream.posterUrl = await this.proxyImageAsync(imageProxy, stream.posterUrl);
|
stream.posterUrl = await this.proxyImageAsync(imageProxy, stream.posterUrl, stream.id, "poster");
|
||||||
}
|
}
|
||||||
return stream;
|
return stream;
|
||||||
}),
|
}),
|
||||||
@@ -121,7 +120,12 @@ export class TracearrIntegration extends Integration {
|
|||||||
...json,
|
...json,
|
||||||
data: await Promise.all(
|
data: await Promise.all(
|
||||||
json.data.map(async (violation) => {
|
json.data.map(async (violation) => {
|
||||||
violation.user.avatarUrl = await this.proxyImageAsync(imageProxy, violation.user.avatarUrl);
|
violation.user.avatarUrl = await this.proxyImageAsync(
|
||||||
|
imageProxy,
|
||||||
|
violation.user.avatarUrl,
|
||||||
|
violation.user.id,
|
||||||
|
"avatar",
|
||||||
|
);
|
||||||
return violation;
|
return violation;
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@@ -152,7 +156,12 @@ export class TracearrIntegration extends Integration {
|
|||||||
...json,
|
...json,
|
||||||
data: await Promise.all(
|
data: await Promise.all(
|
||||||
json.data.map(async (session) => {
|
json.data.map(async (session) => {
|
||||||
session.user.avatarUrl = await this.proxyImageAsync(imageProxy, session.user.avatarUrl);
|
session.user.avatarUrl = await this.proxyImageAsync(
|
||||||
|
imageProxy,
|
||||||
|
session.user.avatarUrl,
|
||||||
|
session.user.id,
|
||||||
|
"avatar",
|
||||||
|
);
|
||||||
return session;
|
return session;
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
@@ -185,12 +194,23 @@ export class TracearrIntegration extends Integration {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private async proxyImageAsync(imageProxy: ImageProxy, urlOrPath: string | null | undefined): Promise<string | null> {
|
private async proxyImageAsync(
|
||||||
if (!urlOrPath) return null;
|
imageProxy: ImageProxy,
|
||||||
|
url: string | null | undefined,
|
||||||
|
uniqueId: string,
|
||||||
|
discriminator: string,
|
||||||
|
): Promise<string | null> {
|
||||||
|
if (!url) return null;
|
||||||
try {
|
try {
|
||||||
// ImageProxy doesn't support fallback urls so we need to remove them
|
// ImageProxy doesn't support fallback urls so we need to remove them
|
||||||
const cleanUrl = urlOrPath.replace(/&fallback=[^&]+/, "").replace(/\?fallback=[^&]+&?/, "?");
|
const cleanUrl = url.replace(/&fallback=[^&]+/, "").replace(/\?fallback=[^&]+&?/, "?");
|
||||||
const fullUrl = isAbsoluteUrl(urlOrPath) ? cleanUrl : this.url(cleanUrl as `/${string}`).toString();
|
// Build the full URL, then inject _uid as the FIRST query param.
|
||||||
|
// This is critical because ImageProxy uses bcrypt which truncates at 72 bytes.
|
||||||
|
// Without this, all long avatar/poster URLs from the same session hash identically
|
||||||
|
// since they share the same first 72+ bytes.
|
||||||
|
const baseUrl = this.url(cleanUrl as `/${string}`).toString();
|
||||||
|
const prefix = `_uid=${discriminator}_${uniqueId}&`;
|
||||||
|
const fullUrl = baseUrl.includes("?") ? baseUrl.replace("?", `?${prefix}`) : `${baseUrl}?${prefix}`;
|
||||||
|
|
||||||
return await imageProxy.createImageAsync(fullUrl, this.getAuthHeaders());
|
return await imageProxy.createImageAsync(fullUrl, this.getAuthHeaders());
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ import dayjs from "dayjs";
|
|||||||
import type { ContainerInfo, ContainerStats } from "dockerode";
|
import type { ContainerInfo, ContainerStats } from "dockerode";
|
||||||
import type Dockerode from "dockerode";
|
import type Dockerode from "dockerode";
|
||||||
|
|
||||||
import { bestMatch } from "@homarr/common";
|
|
||||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
|
||||||
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
|
|
||||||
import { db, like, or } from "@homarr/db";
|
import { db, like, or } from "@homarr/db";
|
||||||
import { icons } from "@homarr/db/schema";
|
import { icons } from "@homarr/db/schema";
|
||||||
import type { ContainerState } from "@homarr/docker";
|
import type { ContainerState } from "@homarr/docker";
|
||||||
@@ -12,8 +9,6 @@ import { dockerLabels, DockerSingleton } from "@homarr/docker";
|
|||||||
|
|
||||||
import { createCachedWidgetRequestHandler } from "./lib/cached-widget-request-handler";
|
import { createCachedWidgetRequestHandler } from "./lib/cached-widget-request-handler";
|
||||||
|
|
||||||
const logger = createLogger({ module: "dockerRequestHandler" });
|
|
||||||
|
|
||||||
export const dockerContainersRequestHandler = createCachedWidgetRequestHandler({
|
export const dockerContainersRequestHandler = createCachedWidgetRequestHandler({
|
||||||
queryKey: "dockerContainersResult",
|
queryKey: "dockerContainersResult",
|
||||||
widgetKind: "dockerContainers",
|
widgetKind: "dockerContainers",
|
||||||
@@ -23,34 +18,19 @@ export const dockerContainersRequestHandler = createCachedWidgetRequestHandler({
|
|||||||
cacheDuration: dayjs.duration(20, "seconds"),
|
cacheDuration: dayjs.duration(20, "seconds"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const dockerInstances = DockerSingleton.getInstances();
|
||||||
|
|
||||||
const extractImage = (container: ContainerInfo) => container.Image.split("/").at(-1)?.split(":").at(0) ?? "";
|
const extractImage = (container: ContainerInfo) => container.Image.split("/").at(-1)?.split(":").at(0) ?? "";
|
||||||
|
|
||||||
async function getContainersWithStatsAsync() {
|
async function getContainersWithStatsAsync() {
|
||||||
const dockerInstances = DockerSingleton.getInstances();
|
const containers = await Promise.all(
|
||||||
const results = await Promise.allSettled(
|
|
||||||
dockerInstances.map(async ({ instance, host }) => {
|
dockerInstances.map(async ({ instance, host }) => {
|
||||||
const instanceContainers = await instance.listContainers({ all: true });
|
const instanceContainers = await instance.listContainers({ all: true });
|
||||||
return instanceContainers
|
return instanceContainers
|
||||||
.filter((container) => !(dockerLabels.hide in container.Labels))
|
.filter((container) => !(dockerLabels.hide in container.Labels))
|
||||||
.map((container) => ({ ...container, instance: host }));
|
.map((container) => ({ ...container, instance: host }));
|
||||||
}),
|
}),
|
||||||
);
|
).then((res) => res.flat());
|
||||||
|
|
||||||
const containers = results.flatMap((result, index) => {
|
|
||||||
if (result.status === "fulfilled") return result.value;
|
|
||||||
logger.warn(
|
|
||||||
new ErrorWithMetadata(
|
|
||||||
"Failed to list containers from Docker host",
|
|
||||||
{
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
||||||
host: dockerInstances[index]!.host,
|
|
||||||
},
|
|
||||||
{ cause: result.reason },
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return [];
|
|
||||||
});
|
|
||||||
const likeQueries = containers.map((container) => like(icons.name, `%${extractImage(container)}%`));
|
const likeQueries = containers.map((container) => like(icons.name, `%${extractImage(container)}%`));
|
||||||
|
|
||||||
const dbIcons =
|
const dbIcons =
|
||||||
@@ -64,6 +44,8 @@ async function getContainersWithStatsAsync() {
|
|||||||
const instance = dockerInstances.find(({ host }) => host === container.instance)?.instance;
|
const instance = dockerInstances.find(({ host }) => host === container.instance)?.instance;
|
||||||
if (!instance) return null;
|
if (!instance) return null;
|
||||||
|
|
||||||
|
// Get stats, falling back to an empty stats object if fetch fails
|
||||||
|
// calculateCpuUsage and calculateMemoryUsage will return 0 for invalid/missing stats
|
||||||
const stats = await instance
|
const stats = await instance
|
||||||
.getContainer(container.Id)
|
.getContainer(container.Id)
|
||||||
.stats({ stream: false, "one-shot": true })
|
.stats({ stream: false, "one-shot": true })
|
||||||
@@ -81,9 +63,13 @@ async function getContainersWithStatsAsync() {
|
|||||||
return {
|
return {
|
||||||
id: container.Id,
|
id: container.Id,
|
||||||
name: container.Names[0]?.split("/")[1] ?? "Unknown",
|
name: container.Names[0]?.split("/")[1] ?? "Unknown",
|
||||||
host: container.instance,
|
|
||||||
state: container.State as ContainerState,
|
state: container.State as ContainerState,
|
||||||
iconUrl: bestMatch(extractImage(container), dbIcons, (icon) => icon.name)?.url ?? null,
|
iconUrl:
|
||||||
|
dbIcons.find((icon) => {
|
||||||
|
const extractedImage = extractImage(container);
|
||||||
|
if (!extractedImage) return false;
|
||||||
|
return icon.name.toLowerCase().includes(extractedImage.toLowerCase());
|
||||||
|
})?.url ?? null,
|
||||||
cpuUsage,
|
cpuUsage,
|
||||||
memoryUsage,
|
memoryUsage,
|
||||||
image: container.Image,
|
image: container.Image,
|
||||||
@@ -94,10 +80,9 @@ async function getContainersWithStatsAsync() {
|
|||||||
return (await Promise.all(containerStatsPromises)).filter((container) => container !== null);
|
return (await Promise.all(containerStatsPromises)).filter((container) => container !== null);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calculateCpuUsage(stats: ContainerStats): number {
|
function calculateCpuUsage(stats: ContainerStats): number {
|
||||||
// Handle containers with missing or invalid stats (e.g., exited, dead containers, Podman responses)
|
// Handle containers with missing or invalid stats (e.g., exited, dead containers)
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
if (!stats.cpu_stats.online_cpus || stats.cpu_stats.online_cpus === 0 || !stats.cpu_stats.cpu_usage.total_usage) {
|
||||||
if (!stats.cpu_stats?.online_cpus || stats.cpu_stats.online_cpus === 0 || !stats.cpu_stats.cpu_usage?.total_usage) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,10 +95,9 @@ export function calculateCpuUsage(stats: ContainerStats): number {
|
|||||||
return (stats.cpu_stats.cpu_usage.total_usage / usage) * numberOfCpus * 100;
|
return (stats.cpu_stats.cpu_usage.total_usage / usage) * numberOfCpus * 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calculateMemoryUsage(stats: ContainerStats): number {
|
function calculateMemoryUsage(stats: ContainerStats): number {
|
||||||
// Handle containers with missing or invalid stats (e.g., exited, dead containers, Podman responses)
|
// Handle containers with missing or invalid stats (e.g., exited, dead containers)
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
if (!stats.memory_stats.usage) {
|
||||||
if (!stats.memory_stats?.usage) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
import dayjs from "dayjs";
|
|
||||||
import { z } from "zod";
|
|
||||||
|
|
||||||
import { env } from "@homarr/common/env";
|
|
||||||
import { ResponseError } from "@homarr/common/server";
|
|
||||||
import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/http";
|
|
||||||
import { withTimeoutAsync } from "@homarr/core/infrastructure/http/timeout";
|
|
||||||
import { createChannelWithLatestAndEvents } from "@homarr/redis";
|
|
||||||
import { createCachedRequestHandler } from "@homarr/request-handler/lib/cached-request-handler";
|
|
||||||
|
|
||||||
export type DuckDuckGoBang = z.infer<typeof duckDuckGoBangSchema>;
|
|
||||||
|
|
||||||
const DUCKDUCKGO_BANGS_URL = "https://duckduckgo.com/bang.js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DuckDuckGo `bang.js` uses short keys (to reduce the payload size):
|
|
||||||
* - `t`: bang token (e.g. `"yt"`)
|
|
||||||
* - `s`: display name
|
|
||||||
* - `d`: domain (optional)
|
|
||||||
* - `u`: URL template (contains `{{{s}}}`)
|
|
||||||
* - `c`: category (optional)
|
|
||||||
* - `sc`: subcategory (optional)
|
|
||||||
* - `r`: rank (optional)
|
|
||||||
*/
|
|
||||||
export const duckDuckGoBangSchema = z.object({
|
|
||||||
t: z.string(),
|
|
||||||
s: z.string(),
|
|
||||||
d: z.string().optional(),
|
|
||||||
u: z.string(),
|
|
||||||
c: z.string().optional(),
|
|
||||||
sc: z.string().optional(),
|
|
||||||
r: z.number().optional(),
|
|
||||||
});
|
|
||||||
|
|
||||||
const duckDuckGoBangsResponseSchema = z.array(duckDuckGoBangSchema);
|
|
||||||
|
|
||||||
const normalizeBangToken = (token: string) => token.toLowerCase().trim();
|
|
||||||
|
|
||||||
const compareBangTokenAsc = (left: DuckDuckGoBang, right: DuckDuckGoBang) => left.t.localeCompare(right.t);
|
|
||||||
|
|
||||||
export const duckDuckGoBangsRequestHandler = createCachedRequestHandler({
|
|
||||||
queryKey: "duckduckgo-bangs",
|
|
||||||
cacheDuration: dayjs.duration(1, "day"),
|
|
||||||
async requestAsync(_) {
|
|
||||||
if (env.NO_EXTERNAL_CONNECTION) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await withTimeoutAsync(async (signal) => {
|
|
||||||
return await fetchWithTrustedCertificatesAsync(DUCKDUCKGO_BANGS_URL, {
|
|
||||||
signal,
|
|
||||||
headers: {
|
|
||||||
accept: "application/json,text/plain,*/*",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!res.ok) {
|
|
||||||
throw new ResponseError(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
const json: unknown = await res.json();
|
|
||||||
const bangs = await duckDuckGoBangsResponseSchema.parseAsync(json);
|
|
||||||
|
|
||||||
const normalized = bangs
|
|
||||||
.map((bang) => ({
|
|
||||||
...bang,
|
|
||||||
t: normalizeBangToken(bang.t),
|
|
||||||
}))
|
|
||||||
.filter((bang) => bang.t.length > 0);
|
|
||||||
|
|
||||||
normalized.sort(compareBangTokenAsc);
|
|
||||||
|
|
||||||
return normalized;
|
|
||||||
},
|
|
||||||
createRedisChannel() {
|
|
||||||
return createChannelWithLatestAndEvents<DuckDuckGoBang[]>("homarr:duckduckgo-bangs");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
import type { ContainerStats } from "dockerode";
|
|
||||||
import { describe, expect, test, vi } from "vitest";
|
|
||||||
|
|
||||||
import { createDb } from "@homarr/db/test";
|
|
||||||
|
|
||||||
import { calculateCpuUsage, calculateMemoryUsage } from "../docker";
|
|
||||||
|
|
||||||
vi.mock("@homarr/db", async (importActual) => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
||||||
const actual = await importActual<typeof import("@homarr/db")>();
|
|
||||||
return {
|
|
||||||
...actual,
|
|
||||||
db: createDb(),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// Helper to create a partial stats object, cast to ContainerStats.
|
|
||||||
// This mirrors what Podman and other Docker-compatible runtimes may return
|
|
||||||
// at runtime, even though @types/dockerode declares all fields as required.
|
|
||||||
const createStats = (overrides: Record<string, unknown> = {}) => overrides as unknown as ContainerStats;
|
|
||||||
|
|
||||||
describe("calculateCpuUsage", () => {
|
|
||||||
test("should return 0 when cpu_stats is undefined (Podman)", () => {
|
|
||||||
const stats = createStats({ cpu_stats: undefined });
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when online_cpus is 0", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { online_cpus: 0, cpu_usage: { total_usage: 1000 }, system_cpu_usage: 5000 },
|
|
||||||
});
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when online_cpus is undefined", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { cpu_usage: { total_usage: 1000 }, system_cpu_usage: 5000 },
|
|
||||||
});
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when cpu_usage is undefined", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { online_cpus: 4, system_cpu_usage: 5000 },
|
|
||||||
});
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when total_usage is 0", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { online_cpus: 4, cpu_usage: { total_usage: 0 }, system_cpu_usage: 5000 },
|
|
||||||
});
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when system_cpu_usage is 0", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { online_cpus: 4, cpu_usage: { total_usage: 1000 }, system_cpu_usage: 0 },
|
|
||||||
});
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should calculate correct CPU percentage for valid stats", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { online_cpus: 4, cpu_usage: { total_usage: 2000 }, system_cpu_usage: 10000 },
|
|
||||||
});
|
|
||||||
// (2000 / 10000) * 4 * 100 = 80
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(80);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should handle fractional CPU usage", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
cpu_stats: { online_cpus: 2, cpu_usage: { total_usage: 500 }, system_cpu_usage: 100000 },
|
|
||||||
});
|
|
||||||
// (500 / 100000) * 2 * 100 = 1
|
|
||||||
expect(calculateCpuUsage(stats)).toBe(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("calculateMemoryUsage", () => {
|
|
||||||
test("should return 0 when memory_stats is undefined (Podman)", () => {
|
|
||||||
const stats = createStats({ memory_stats: undefined });
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when memory_stats.usage is 0", () => {
|
|
||||||
const stats = createStats({ memory_stats: { usage: 0 } });
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return 0 when memory_stats.usage is undefined", () => {
|
|
||||||
const stats = createStats({ memory_stats: {} });
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should subtract cache from usage", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
memory_stats: { usage: 1000, stats: { cache: 200 } },
|
|
||||||
});
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(800);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should use total_inactive_file when cache is absent", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
memory_stats: { usage: 1000, stats: { total_inactive_file: 300 } },
|
|
||||||
});
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(700);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should use inactive_file as last fallback", () => {
|
|
||||||
const stats = createStats({
|
|
||||||
memory_stats: { usage: 1000, stats: { inactive_file: 150 } },
|
|
||||||
});
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(850);
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should return raw usage when memory_stats.stats is undefined", () => {
|
|
||||||
const stats = createStats({ memory_stats: { usage: 512 } });
|
|
||||||
expect(calculateMemoryUsage(stats)).toBe(512);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -8,7 +8,6 @@ export type SettingsContextProps = Pick<
|
|||||||
| "homeBoardId"
|
| "homeBoardId"
|
||||||
| "mobileHomeBoardId"
|
| "mobileHomeBoardId"
|
||||||
| "openSearchInNewTab"
|
| "openSearchInNewTab"
|
||||||
| "ddgBangs"
|
|
||||||
| "pingIconsEnabled"
|
| "pingIconsEnabled"
|
||||||
> &
|
> &
|
||||||
Pick<ServerSettings["board"], "enableStatusByDefault" | "forceDisableStatus"> &
|
Pick<ServerSettings["board"], "enableStatusByDefault" | "forceDisableStatus"> &
|
||||||
@@ -30,7 +29,6 @@ export type UserSettings = Pick<
|
|||||||
| "homeBoardId"
|
| "homeBoardId"
|
||||||
| "mobileHomeBoardId"
|
| "mobileHomeBoardId"
|
||||||
| "openSearchInNewTab"
|
| "openSearchInNewTab"
|
||||||
| "ddgBangs"
|
|
||||||
| "pingIconsEnabled"
|
| "pingIconsEnabled"
|
||||||
>;
|
>;
|
||||||
|
|
||||||
@@ -43,7 +41,6 @@ export const createSettings = ({
|
|||||||
}) => ({
|
}) => ({
|
||||||
defaultSearchEngineId: user?.defaultSearchEngineId ?? serverSettings.search.defaultSearchEngineId,
|
defaultSearchEngineId: user?.defaultSearchEngineId ?? serverSettings.search.defaultSearchEngineId,
|
||||||
openSearchInNewTab: user?.openSearchInNewTab ?? true,
|
openSearchInNewTab: user?.openSearchInNewTab ?? true,
|
||||||
ddgBangs: user?.ddgBangs ?? true,
|
|
||||||
firstDayOfWeek: user?.firstDayOfWeek ?? (1 as const),
|
firstDayOfWeek: user?.firstDayOfWeek ?? (1 as const),
|
||||||
homeBoardId: user?.homeBoardId ?? serverSettings.board.homeBoardId,
|
homeBoardId: user?.homeBoardId ?? serverSettings.board.homeBoardId,
|
||||||
mobileHomeBoardId: user?.mobileHomeBoardId ?? serverSettings.board.mobileHomeBoardId,
|
mobileHomeBoardId: user?.mobileHomeBoardId ?? serverSettings.board.mobileHomeBoardId,
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import { SpotlightGroupActionItem } from "./items/group-action-item";
|
|||||||
interface GroupActionsProps<TOption extends Record<string, unknown>> {
|
interface GroupActionsProps<TOption extends Record<string, unknown>> {
|
||||||
group: SearchGroup<TOption>;
|
group: SearchGroup<TOption>;
|
||||||
query: string;
|
query: string;
|
||||||
setQuery: (query: string) => void;
|
|
||||||
setMode: (mode: keyof TranslationObject["search"]["mode"]) => void;
|
setMode: (mode: keyof TranslationObject["search"]["mode"]) => void;
|
||||||
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
||||||
}
|
}
|
||||||
@@ -20,7 +19,6 @@ interface GroupActionsProps<TOption extends Record<string, unknown>> {
|
|||||||
export const SpotlightGroupActions = <TOption extends Record<string, unknown>>({
|
export const SpotlightGroupActions = <TOption extends Record<string, unknown>>({
|
||||||
group,
|
group,
|
||||||
query,
|
query,
|
||||||
setQuery,
|
|
||||||
setMode,
|
setMode,
|
||||||
setChildrenOptions,
|
setChildrenOptions,
|
||||||
}: GroupActionsProps<TOption>) => {
|
}: GroupActionsProps<TOption>) => {
|
||||||
@@ -60,7 +58,6 @@ export const SpotlightGroupActions = <TOption extends Record<string, unknown>>({
|
|||||||
option={option}
|
option={option}
|
||||||
group={group}
|
group={group}
|
||||||
query={query}
|
query={query}
|
||||||
setQuery={setQuery}
|
|
||||||
setMode={setMode}
|
setMode={setMode}
|
||||||
setChildrenOptions={setChildrenOptions}
|
setChildrenOptions={setChildrenOptions}
|
||||||
/>
|
/>
|
||||||
@@ -93,7 +90,6 @@ export const SpotlightGroupActions = <TOption extends Record<string, unknown>>({
|
|||||||
option={option}
|
option={option}
|
||||||
group={group}
|
group={group}
|
||||||
query={query}
|
query={query}
|
||||||
setQuery={setQuery}
|
|
||||||
setMode={setMode}
|
setMode={setMode}
|
||||||
setChildrenOptions={setChildrenOptions}
|
setChildrenOptions={setChildrenOptions}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { SpotlightGroupActions } from "../group-actions";
|
|||||||
interface SpotlightActionGroupsProps {
|
interface SpotlightActionGroupsProps {
|
||||||
groups: SearchGroup[];
|
groups: SearchGroup[];
|
||||||
query: string;
|
query: string;
|
||||||
setQuery: (query: string) => void;
|
|
||||||
setMode: (mode: keyof TranslationObject["search"]["mode"]) => void;
|
setMode: (mode: keyof TranslationObject["search"]["mode"]) => void;
|
||||||
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
||||||
}
|
}
|
||||||
@@ -20,10 +19,7 @@ export const SpotlightActionGroups = ({ groups, ...others }: SpotlightActionGrou
|
|||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
|
|
||||||
return groups.map((group) => (
|
return groups.map((group) => (
|
||||||
<Spotlight.ActionsGroup
|
<Spotlight.ActionsGroup key={translateIfNecessary(t, group.title)} label={translateIfNecessary(t, group.title)}>
|
||||||
key={`${translateIfNecessary(t, group.title)}::${String(group.keyPath)}`}
|
|
||||||
label={translateIfNecessary(t, group.title)}
|
|
||||||
>
|
|
||||||
{/*eslint-disable-next-line @typescript-eslint/no-explicit-any */}
|
{/*eslint-disable-next-line @typescript-eslint/no-explicit-any */}
|
||||||
<SpotlightGroupActions<any> group={group} {...others} />
|
<SpotlightGroupActions<any> group={group} {...others} />
|
||||||
</Spotlight.ActionsGroup>
|
</Spotlight.ActionsGroup>
|
||||||
|
|||||||
@@ -5,13 +5,11 @@ import { Link } from "@homarr/ui";
|
|||||||
|
|
||||||
import type { SearchGroup } from "../../../lib/group";
|
import type { SearchGroup } from "../../../lib/group";
|
||||||
import type { inferSearchInteractionOptions } from "../../../lib/interaction";
|
import type { inferSearchInteractionOptions } from "../../../lib/interaction";
|
||||||
import { selectAction, spotlightStore } from "../../../spotlight-store";
|
|
||||||
import classes from "./action-item.module.css";
|
import classes from "./action-item.module.css";
|
||||||
|
|
||||||
interface SpotlightGroupActionItemProps<TOption extends Record<string, unknown>> {
|
interface SpotlightGroupActionItemProps<TOption extends Record<string, unknown>> {
|
||||||
option: TOption;
|
option: TOption;
|
||||||
query: string;
|
query: string;
|
||||||
setQuery: (query: string) => void;
|
|
||||||
setMode: (mode: keyof TranslationObject["search"]["mode"]) => void;
|
setMode: (mode: keyof TranslationObject["search"]["mode"]) => void;
|
||||||
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
||||||
group: SearchGroup<TOption>;
|
group: SearchGroup<TOption>;
|
||||||
@@ -20,15 +18,11 @@ interface SpotlightGroupActionItemProps<TOption extends Record<string, unknown>>
|
|||||||
export const SpotlightGroupActionItem = <TOption extends Record<string, unknown>>({
|
export const SpotlightGroupActionItem = <TOption extends Record<string, unknown>>({
|
||||||
group,
|
group,
|
||||||
query,
|
query,
|
||||||
setQuery,
|
|
||||||
setMode,
|
setMode,
|
||||||
setChildrenOptions,
|
setChildrenOptions,
|
||||||
option,
|
option,
|
||||||
}: SpotlightGroupActionItemProps<TOption>) => {
|
}: SpotlightGroupActionItemProps<TOption>) => {
|
||||||
const interaction = group.useInteraction(option, query);
|
const interaction = group.useInteraction(option, query);
|
||||||
// Avoid passing React's special `key` prop via spread
|
|
||||||
|
|
||||||
const { key: _reactKey, ...optionProps } = option as unknown as { key?: unknown } & Record<string, unknown>;
|
|
||||||
|
|
||||||
const renderRoot =
|
const renderRoot =
|
||||||
interaction.type === "link"
|
interaction.type === "link"
|
||||||
@@ -40,9 +34,6 @@ export const SpotlightGroupActionItem = <TOption extends Record<string, unknown>
|
|||||||
const handleClickAsync = async () => {
|
const handleClickAsync = async () => {
|
||||||
if (interaction.type === "javaScript") {
|
if (interaction.type === "javaScript") {
|
||||||
await interaction.onSelect();
|
await interaction.onSelect();
|
||||||
} else if (interaction.type === "setQuery") {
|
|
||||||
setQuery(interaction.query);
|
|
||||||
setTimeout(() => selectAction(0, spotlightStore));
|
|
||||||
} else if (interaction.type === "mode") {
|
} else if (interaction.type === "mode") {
|
||||||
setMode(interaction.mode);
|
setMode(interaction.mode);
|
||||||
} else if (interaction.type === "children") {
|
} else if (interaction.type === "children") {
|
||||||
@@ -55,14 +46,11 @@ export const SpotlightGroupActionItem = <TOption extends Record<string, unknown>
|
|||||||
renderRoot={renderRoot}
|
renderRoot={renderRoot}
|
||||||
onClick={handleClickAsync}
|
onClick={handleClickAsync}
|
||||||
closeSpotlightOnTrigger={
|
closeSpotlightOnTrigger={
|
||||||
interaction.type !== "mode" &&
|
interaction.type !== "mode" && interaction.type !== "children" && interaction.type !== "none"
|
||||||
interaction.type !== "children" &&
|
|
||||||
interaction.type !== "none" &&
|
|
||||||
interaction.type !== "setQuery"
|
|
||||||
}
|
}
|
||||||
className={classes.spotlightAction}
|
className={classes.spotlightAction}
|
||||||
>
|
>
|
||||||
<group.Component {...(optionProps as TOption)} />
|
<group.Component {...option} />
|
||||||
</Spotlight.Action>
|
</Spotlight.Action>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -4,7 +4,7 @@ import type { Dispatch, SetStateAction } from "react";
|
|||||||
import { useMemo, useRef, useState } from "react";
|
import { useMemo, useRef, useState } from "react";
|
||||||
import { ActionIcon, Center, Group, Kbd } from "@mantine/core";
|
import { ActionIcon, Center, Group, Kbd } from "@mantine/core";
|
||||||
import { Spotlight as MantineSpotlight } from "@mantine/spotlight";
|
import { Spotlight as MantineSpotlight } from "@mantine/spotlight";
|
||||||
import { IconSearch, IconX } from "@tabler/icons-react";
|
import { IconQuestionMark, IconSearch, IconX } from "@tabler/icons-react";
|
||||||
|
|
||||||
import { hotkeys } from "@homarr/definitions";
|
import { hotkeys } from "@homarr/definitions";
|
||||||
import type { TranslationObject } from "@homarr/translation";
|
import type { TranslationObject } from "@homarr/translation";
|
||||||
@@ -13,7 +13,6 @@ import { useI18n } from "@homarr/translation/client";
|
|||||||
import type { inferSearchInteractionOptions } from "../lib/interaction";
|
import type { inferSearchInteractionOptions } from "../lib/interaction";
|
||||||
import type { SearchMode } from "../lib/mode";
|
import type { SearchMode } from "../lib/mode";
|
||||||
import { searchModes } from "../modes";
|
import { searchModes } from "../modes";
|
||||||
import { useHomeEmptyGroups } from "../modes/help/home-empty-groups";
|
|
||||||
import { selectAction, spotlightStore } from "../spotlight-store";
|
import { selectAction, spotlightStore } from "../spotlight-store";
|
||||||
import { SpotlightChildrenActions } from "./actions/children-actions";
|
import { SpotlightChildrenActions } from "./actions/children-actions";
|
||||||
import { SpotlightActionGroups } from "./actions/groups/action-group";
|
import { SpotlightActionGroups } from "./actions/groups/action-group";
|
||||||
@@ -23,7 +22,6 @@ type SearchModeKey = keyof TranslationObject["search"]["mode"];
|
|||||||
const defaultMode = "home";
|
const defaultMode = "home";
|
||||||
export const Spotlight = () => {
|
export const Spotlight = () => {
|
||||||
const searchModeState = useState<SearchModeKey>(defaultMode);
|
const searchModeState = useState<SearchModeKey>(defaultMode);
|
||||||
const queryState = useState("");
|
|
||||||
const mode = searchModeState[0];
|
const mode = searchModeState[0];
|
||||||
const activeMode = useMemo(() => searchModes.find((searchMode) => searchMode.modeKey === mode), [mode]);
|
const activeMode = useMemo(() => searchModes.find((searchMode) => searchMode.modeKey === mode), [mode]);
|
||||||
|
|
||||||
@@ -32,19 +30,16 @@ export const Spotlight = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We use the "key" below to prevent the 'Different amounts of hooks' error
|
// We use the "key" below to prevent the 'Different amounts of hooks' error
|
||||||
return (
|
return <SpotlightWithActiveMode key={mode} modeState={searchModeState} activeMode={activeMode} />;
|
||||||
<SpotlightWithActiveMode key={mode} modeState={searchModeState} queryState={queryState} activeMode={activeMode} />
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
interface SpotlightWithActiveModeProps {
|
interface SpotlightWithActiveModeProps {
|
||||||
modeState: [SearchModeKey, Dispatch<SetStateAction<SearchModeKey>>];
|
modeState: [SearchModeKey, Dispatch<SetStateAction<SearchModeKey>>];
|
||||||
queryState: [string, Dispatch<SetStateAction<string>>];
|
|
||||||
activeMode: SearchMode;
|
activeMode: SearchMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SpotlightWithActiveMode = ({ modeState, queryState, activeMode }: SpotlightWithActiveModeProps) => {
|
const SpotlightWithActiveMode = ({ modeState, activeMode }: SpotlightWithActiveModeProps) => {
|
||||||
const [query, setQuery] = queryState;
|
const [query, setQuery] = useState("");
|
||||||
const [mode, setMode] = modeState;
|
const [mode, setMode] = modeState;
|
||||||
const [childrenOptions, setChildrenOptions] = useState<inferSearchInteractionOptions<"children"> | null>(null);
|
const [childrenOptions, setChildrenOptions] = useState<inferSearchInteractionOptions<"children"> | null>(null);
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
@@ -52,34 +47,28 @@ const SpotlightWithActiveMode = ({ modeState, queryState, activeMode }: Spotligh
|
|||||||
// Works as always the same amount of hooks are executed
|
// Works as always the same amount of hooks are executed
|
||||||
const useGroups = "groups" in activeMode ? () => activeMode.groups : activeMode.useGroups;
|
const useGroups = "groups" in activeMode ? () => activeMode.groups : activeMode.useGroups;
|
||||||
const groups = useGroups();
|
const groups = useGroups();
|
||||||
const homeEmptyGroups = useHomeEmptyGroups();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MantineSpotlight.Root
|
<MantineSpotlight.Root
|
||||||
shortcut={hotkeys.openSpotlight}
|
shortcut={hotkeys.openSpotlight}
|
||||||
yOffset={8}
|
yOffset={8}
|
||||||
overlayProps={{ blur: 2, backgroundOpacity: 0.2 }}
|
|
||||||
onSpotlightClose={() => {
|
onSpotlightClose={() => {
|
||||||
setMode(defaultMode);
|
setMode(defaultMode);
|
||||||
setChildrenOptions(null);
|
setChildrenOptions(null);
|
||||||
setQuery("");
|
|
||||||
}}
|
}}
|
||||||
query={query}
|
query={query}
|
||||||
onQueryChange={(nextQuery) => {
|
onQueryChange={(query) => {
|
||||||
const sanitizedQuery = mode === "external" && nextQuery.startsWith("!") ? nextQuery.slice(1) : nextQuery;
|
if (mode !== "help" || query.length !== 1) {
|
||||||
setQuery(sanitizedQuery);
|
setQuery(query);
|
||||||
|
}
|
||||||
|
|
||||||
// Only switch modes when a single trigger character is typed
|
const modeToActivate = searchModes.find((mode) => mode.character === query);
|
||||||
if (sanitizedQuery.length !== 1) return;
|
if (!modeToActivate) {
|
||||||
|
return;
|
||||||
const modeToActivate = searchModes.find((mode) => mode.character === sanitizedQuery);
|
}
|
||||||
if (!modeToActivate) return;
|
|
||||||
|
|
||||||
setMode(modeToActivate.modeKey);
|
setMode(modeToActivate.modeKey);
|
||||||
setChildrenOptions(null);
|
|
||||||
|
|
||||||
setQuery("");
|
setQuery("");
|
||||||
|
|
||||||
setTimeout(() => selectAction(0, spotlightStore));
|
setTimeout(() => selectAction(0, spotlightStore));
|
||||||
}}
|
}}
|
||||||
store={spotlightStore}
|
store={spotlightStore}
|
||||||
@@ -102,7 +91,17 @@ const SpotlightWithActiveMode = ({ modeState, queryState, activeMode }: Spotligh
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
rightSection={
|
rightSection={
|
||||||
mode === defaultMode ? null : (
|
mode === defaultMode ? (
|
||||||
|
<ActionIcon
|
||||||
|
onClick={() => {
|
||||||
|
setMode("help");
|
||||||
|
inputRef.current?.focus();
|
||||||
|
}}
|
||||||
|
variant="subtle"
|
||||||
|
>
|
||||||
|
<IconQuestionMark stroke={1.5} />
|
||||||
|
</ActionIcon>
|
||||||
|
) : (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setMode(defaultMode);
|
setMode(defaultMode);
|
||||||
@@ -139,7 +138,6 @@ const SpotlightWithActiveMode = ({ modeState, queryState, activeMode }: Spotligh
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<SpotlightActionGroups
|
<SpotlightActionGroups
|
||||||
setQuery={setQuery}
|
|
||||||
setMode={(mode) => {
|
setMode={(mode) => {
|
||||||
setMode(mode);
|
setMode(mode);
|
||||||
setChildrenOptions(null);
|
setChildrenOptions(null);
|
||||||
@@ -154,7 +152,7 @@ const SpotlightWithActiveMode = ({ modeState, queryState, activeMode }: Spotligh
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
query={query}
|
query={query}
|
||||||
groups={mode === defaultMode && query.length === 0 ? [...homeEmptyGroups] : groups}
|
groups={groups}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</MantineSpotlight.ActionsList>
|
</MantineSpotlight.ActionsList>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ const createSearchInteraction = <TType extends string>(type: TType) => ({
|
|||||||
const searchInteractions = [
|
const searchInteractions = [
|
||||||
createSearchInteraction("link").optionsType<{ href: string; newTab?: boolean }>(),
|
createSearchInteraction("link").optionsType<{ href: string; newTab?: boolean }>(),
|
||||||
createSearchInteraction("javaScript").optionsType<{ onSelect: () => MaybePromise<void> }>(),
|
createSearchInteraction("javaScript").optionsType<{ onSelect: () => MaybePromise<void> }>(),
|
||||||
createSearchInteraction("setQuery").optionsType<{ query: string }>(),
|
|
||||||
createSearchInteraction("mode").optionsType<{ mode: keyof TranslationObject["search"]["mode"] }>(),
|
createSearchInteraction("mode").optionsType<{ mode: keyof TranslationObject["search"]["mode"] }>(),
|
||||||
createSearchInteraction("children").optionsType<{
|
createSearchInteraction("children").optionsType<{
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { Group, Image, Kbd, Stack, Text } from "@mantine/core";
|
import { Group, Image, Kbd, Stack, Text } from "@mantine/core";
|
||||||
import { useDebouncedValue } from "@mantine/hooks";
|
|
||||||
import { IconDownload, IconSearch } from "@tabler/icons-react";
|
import { IconDownload, IconSearch } from "@tabler/icons-react";
|
||||||
import { keepPreviousData } from "@tanstack/react-query";
|
|
||||||
|
|
||||||
import type { RouterOutputs } from "@homarr/api";
|
import type { RouterOutputs } from "@homarr/api";
|
||||||
import { clientApi } from "@homarr/api/client";
|
import { clientApi } from "@homarr/api/client";
|
||||||
@@ -19,35 +17,6 @@ import { interaction } from "../../lib/interaction";
|
|||||||
|
|
||||||
type SearchEngine = RouterOutputs["searchEngine"]["search"][number];
|
type SearchEngine = RouterOutputs["searchEngine"]["search"][number];
|
||||||
type FromIntegrationSearchResult = RouterOutputs["integration"]["searchInIntegration"][number];
|
type FromIntegrationSearchResult = RouterOutputs["integration"]["searchInIntegration"][number];
|
||||||
type DuckDuckGoBang = RouterOutputs["bangs"]["search"][number];
|
|
||||||
|
|
||||||
type ExternalOption =
|
|
||||||
| {
|
|
||||||
key: string;
|
|
||||||
kind: "hint";
|
|
||||||
label: string;
|
|
||||||
description?: string;
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
key: string;
|
|
||||||
kind: "search";
|
|
||||||
label: string;
|
|
||||||
description?: string;
|
|
||||||
iconUrl?: string;
|
|
||||||
bang: string;
|
|
||||||
urlTemplate: string;
|
|
||||||
searchText: string;
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
key: string;
|
|
||||||
kind: "engine";
|
|
||||||
engine: SearchEngine;
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
key: string;
|
|
||||||
kind: "ddg";
|
|
||||||
bang: DuckDuckGoBang;
|
|
||||||
};
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||||
type MediaRequestChildrenProps = {
|
type MediaRequestChildrenProps = {
|
||||||
@@ -266,217 +235,57 @@ export const searchEnginesChildrenOptions = createChildrenOptions<SearchEngine>(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const parseBangQuery = (query: string) => {
|
export const searchEnginesSearchGroups = createGroup<SearchEngine>({
|
||||||
const withBangPrefix = query.startsWith("!") ? query.slice(1) : query;
|
keyPath: "short",
|
||||||
const bangIdx = withBangPrefix.indexOf(" ");
|
|
||||||
const bangToken = (bangIdx === -1 ? withBangPrefix : withBangPrefix.slice(0, bangIdx)).toLowerCase().trim();
|
|
||||||
const searchText = bangIdx === -1 ? "" : withBangPrefix.slice(bangIdx + 1);
|
|
||||||
const locked = bangIdx !== -1;
|
|
||||||
return { bangToken, searchText, locked };
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildSearchUrl = (template: string, query: string) => {
|
|
||||||
const encoded = encodeURIComponent(query);
|
|
||||||
if (template.includes("{{{s}}}")) {
|
|
||||||
return template.replaceAll("{{{s}}}", encoded);
|
|
||||||
}
|
|
||||||
|
|
||||||
return template.replaceAll("%s", encoded);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const searchEnginesSearchGroups = createGroup<ExternalOption>({
|
|
||||||
keyPath: "key",
|
|
||||||
title: (t) => t("search.mode.external.group.searchEngine.title"),
|
title: (t) => t("search.mode.external.group.searchEngine.title"),
|
||||||
Component: (option) => {
|
Component: ({ iconUrl, name, short, description }) => {
|
||||||
if (option.kind === "hint") {
|
|
||||||
return (
|
|
||||||
<Group w="100%" wrap="nowrap" align="center" px="md" py="xs">
|
|
||||||
<IconSearch stroke={1.5} />
|
|
||||||
<Stack gap={0}>
|
|
||||||
<Text size="sm">{option.label}</Text>
|
|
||||||
{option.description ? (
|
|
||||||
<Text size="xs" c="gray.6">
|
|
||||||
{option.description}
|
|
||||||
</Text>
|
|
||||||
) : null}
|
|
||||||
</Stack>
|
|
||||||
</Group>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option.kind === "search") {
|
|
||||||
return (
|
|
||||||
<Group w="100%" wrap="nowrap" justify="space-between" align="center" px="md" py="xs">
|
|
||||||
<Group wrap="nowrap">
|
|
||||||
{option.iconUrl ? (
|
|
||||||
<img height={24} width={24} src={option.iconUrl} alt={option.label} />
|
|
||||||
) : (
|
|
||||||
<IconSearch stroke={1.5} />
|
|
||||||
)}
|
|
||||||
<Stack gap={0} justify="center">
|
|
||||||
<Text size="sm">{option.label}</Text>
|
|
||||||
{option.description ? (
|
|
||||||
<Text size="xs" c="gray.6">
|
|
||||||
{option.description}
|
|
||||||
</Text>
|
|
||||||
) : null}
|
|
||||||
</Stack>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Kbd size="sm">!{option.bang}</Kbd>
|
|
||||||
</Group>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option.kind === "engine") {
|
|
||||||
const { iconUrl, name, short, description } = option.engine;
|
|
||||||
return (
|
|
||||||
<Group w="100%" wrap="nowrap" justify="space-between" align="center" px="md" py="xs">
|
|
||||||
<Group wrap="nowrap">
|
|
||||||
<img height={24} width={24} src={iconUrl} alt={name} />
|
|
||||||
<Stack gap={0} justify="center">
|
|
||||||
<Text size="sm">{name}</Text>
|
|
||||||
<Text size="xs" c="gray.6">
|
|
||||||
{description}
|
|
||||||
</Text>
|
|
||||||
</Stack>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Kbd size="sm">!{short}</Kbd>
|
|
||||||
</Group>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const { s: name, t: short, d: domain } = option.bang;
|
|
||||||
return (
|
return (
|
||||||
<Group w="100%" wrap="nowrap" justify="space-between" align="center" px="md" py="xs">
|
<Group w="100%" wrap="nowrap" justify="space-between" align="center" px="md" py="xs">
|
||||||
<Group wrap="nowrap">
|
<Group wrap="nowrap">
|
||||||
<IconSearch stroke={1.5} />
|
<img height={24} width={24} src={iconUrl} alt={name} />
|
||||||
<Stack gap={0} justify="center">
|
<Stack gap={0} justify="center">
|
||||||
<Text size="sm">{name}</Text>
|
<Text size="sm">{name}</Text>
|
||||||
<Text size="xs" c="gray.6">
|
<Text size="xs" c="gray.6">
|
||||||
{domain ?? "DuckDuckGo bang"}
|
{description}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Kbd size="sm">!{short}</Kbd>
|
<Kbd size="sm">{short}</Kbd>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
useInteraction(option, query) {
|
onKeyDown(event, options, query, { setChildrenOptions }) {
|
||||||
const { openSearchInNewTab } = useSettings();
|
if (event.code !== "Space") return;
|
||||||
const { bangToken, searchText } = parseBangQuery(query);
|
|
||||||
|
|
||||||
if (option.kind === "search") {
|
const engine = options.find((option) => option.short === query);
|
||||||
|
if (!engine) return;
|
||||||
|
|
||||||
|
setChildrenOptions(searchEnginesChildrenOptions(engine));
|
||||||
|
},
|
||||||
|
useInteraction: (searchEngine, query) => {
|
||||||
|
const { openSearchInNewTab } = useSettings();
|
||||||
|
if (searchEngine.type === "generic" && searchEngine.urlTemplate) {
|
||||||
return {
|
return {
|
||||||
type: "link",
|
type: "link" as const,
|
||||||
href: buildSearchUrl(option.urlTemplate, option.searchText),
|
href: searchEngine.urlTemplate.replace("%s", query),
|
||||||
newTab: openSearchInNewTab,
|
newTab: openSearchInNewTab,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (option.kind === "engine") {
|
if (searchEngine.type === "fromIntegration" && searchEngine.integrationId !== null) {
|
||||||
const nextBang = option.engine.short;
|
return {
|
||||||
const nextQuery = `${`${nextBang} ${searchText}`.trimEnd()} `;
|
type: "children",
|
||||||
return { type: "setQuery", query: bangToken === nextBang && query.endsWith(" ") ? query : nextQuery };
|
...searchEnginesChildrenOptions(searchEngine),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (option.kind === "ddg") {
|
throw new Error(`Unable to process search engine with type ${searchEngine.type}`);
|
||||||
const nextBang = option.bang.t;
|
|
||||||
const nextQuery = `${`${nextBang} ${searchText}`.trimEnd()} `;
|
|
||||||
return { type: "setQuery", query: bangToken === nextBang && query.endsWith(" ") ? query : nextQuery };
|
|
||||||
}
|
|
||||||
|
|
||||||
return { type: "none" };
|
|
||||||
},
|
},
|
||||||
useQueryOptions(query) {
|
useQueryOptions(query) {
|
||||||
const tExternal = useScopedI18n("search.mode.external.group.searchEngine");
|
return clientApi.searchEngine.search.useQuery({
|
||||||
const { ddgBangs } = useSettings();
|
query: query.trim(),
|
||||||
const { bangToken, searchText, locked } = parseBangQuery(query);
|
limit: 5,
|
||||||
const [debouncedBangToken] = useDebouncedValue(bangToken, 150);
|
});
|
||||||
|
|
||||||
const enginesQuery = clientApi.searchEngine.search.useQuery(
|
|
||||||
{ query: debouncedBangToken, limit: 10 },
|
|
||||||
{ placeholderData: keepPreviousData },
|
|
||||||
);
|
|
||||||
|
|
||||||
const ddgQuery = clientApi.bangs.search.useQuery(
|
|
||||||
{ query: debouncedBangToken, limit: 10 },
|
|
||||||
{
|
|
||||||
enabled: ddgBangs && debouncedBangToken.length >= 1,
|
|
||||||
placeholderData: keepPreviousData,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
const isLoading = enginesQuery.isLoading || ddgQuery.isLoading;
|
|
||||||
const isError = enginesQuery.isError || ddgQuery.isError;
|
|
||||||
|
|
||||||
const engineOptions = (enginesQuery.data ?? []).map(
|
|
||||||
(engine): ExternalOption => ({
|
|
||||||
key: `engine-${engine.short}`,
|
|
||||||
kind: "engine",
|
|
||||||
engine,
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
const ddgOptions = (ddgQuery.data ?? [])
|
|
||||||
.filter((bang) => !engineOptions.some((option) => option.kind === "engine" && option.engine.short === bang.t))
|
|
||||||
.map(
|
|
||||||
(bang): ExternalOption => ({
|
|
||||||
key: `ddg-${bang.t}`,
|
|
||||||
kind: "ddg",
|
|
||||||
bang,
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
const searchActions: ExternalOption[] = [];
|
|
||||||
if (locked && bangToken.length > 0) {
|
|
||||||
const matchedEngine = (enginesQuery.data ?? []).find((engine) => engine.short === bangToken);
|
|
||||||
const matchedDdg = (ddgQuery.data ?? []).find((bang) => bang.t === bangToken);
|
|
||||||
|
|
||||||
const label = matchedEngine?.name ?? matchedDdg?.s;
|
|
||||||
const iconUrl = matchedEngine?.iconUrl;
|
|
||||||
const urlTemplate = matchedEngine?.type === "generic" ? matchedEngine.urlTemplate : matchedDdg?.u;
|
|
||||||
|
|
||||||
if (label && urlTemplate) {
|
|
||||||
if (searchText.trim().length > 0) {
|
|
||||||
searchActions.push({
|
|
||||||
key: "search-action",
|
|
||||||
kind: "search",
|
|
||||||
label: tExternal("bang.searchWithQuery", {
|
|
||||||
query: searchText.trim(),
|
|
||||||
label,
|
|
||||||
}),
|
|
||||||
description: tExternal("bang.pressEnterToOpen"),
|
|
||||||
bang: bangToken,
|
|
||||||
iconUrl,
|
|
||||||
urlTemplate,
|
|
||||||
searchText: searchText.trim(),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
searchActions.push({
|
|
||||||
key: "search-hint",
|
|
||||||
kind: "hint",
|
|
||||||
label: tExternal("bang.engineSelected", { label, bang: bangToken }),
|
|
||||||
description: tExternal("bang.typeQueryToContinue"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (query.length === 0) {
|
|
||||||
searchActions.push({
|
|
||||||
key: "hint",
|
|
||||||
kind: "hint",
|
|
||||||
label: tExternal("bang.emptyBangHint"),
|
|
||||||
description: ddgBangs ? tExternal("tipDdgBangs") : undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
isLoading,
|
|
||||||
isError,
|
|
||||||
data: [...searchActions, ...engineOptions, ...ddgOptions].slice(0, 10),
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
import { Group, Kbd, Text } from "@mantine/core";
|
|
||||||
import {
|
|
||||||
IconBook2,
|
|
||||||
IconBrandDiscord,
|
|
||||||
IconBrandGithub,
|
|
||||||
IconLayoutDashboard,
|
|
||||||
IconSearch,
|
|
||||||
IconSettings,
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
|
|
||||||
import { useSession } from "@homarr/auth/client";
|
|
||||||
import { createDocumentationLink } from "@homarr/definitions";
|
|
||||||
import { useScopedI18n } from "@homarr/translation/client";
|
|
||||||
import type { TablerIcon } from "@homarr/ui";
|
|
||||||
|
|
||||||
import { createGroup } from "../../lib/group";
|
|
||||||
import { interaction } from "../../lib/interaction";
|
|
||||||
import type { SearchMode } from "../../lib/mode";
|
|
||||||
import { appIntegrationBoardMode } from "../app-integration-board";
|
|
||||||
import { commandMode } from "../command";
|
|
||||||
import { externalMode } from "../external";
|
|
||||||
import { pageMode } from "../page";
|
|
||||||
import { userGroupMode } from "../user-group";
|
|
||||||
|
|
||||||
// We need type to allow it as generic type for Record<string, unknown>
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
||||||
type QuickLinkOption = {
|
|
||||||
icon: TablerIcon;
|
|
||||||
name: string;
|
|
||||||
path: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useHomeEmptyGroups = () => {
|
|
||||||
const { data: session } = useSession();
|
|
||||||
const tPages = useScopedI18n("search.mode.page.group.page.option");
|
|
||||||
const visibleSearchModes: SearchMode[] = [appIntegrationBoardMode, externalMode, commandMode, pageMode];
|
|
||||||
|
|
||||||
if (session?.user.permissions.includes("admin")) {
|
|
||||||
visibleSearchModes.unshift(userGroupMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
createGroup({
|
|
||||||
keyPath: "path",
|
|
||||||
title: () => "Quick links",
|
|
||||||
options: (() => {
|
|
||||||
const quickLinks: QuickLinkOption[] = [];
|
|
||||||
if (session?.user) {
|
|
||||||
quickLinks.push({
|
|
||||||
icon: IconSettings,
|
|
||||||
path: `/manage/users/${session.user.id}/general`,
|
|
||||||
name: tPages("preferences.label"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
quickLinks.push({
|
|
||||||
icon: IconLayoutDashboard,
|
|
||||||
path: "/manage/boards",
|
|
||||||
name: tPages("manageBoard.label"),
|
|
||||||
});
|
|
||||||
|
|
||||||
if (session?.user.permissions.includes("admin")) {
|
|
||||||
quickLinks.push({
|
|
||||||
icon: IconSettings,
|
|
||||||
path: "/manage/settings",
|
|
||||||
name: tPages("manageSettings.label"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (session) {
|
|
||||||
quickLinks.push({
|
|
||||||
icon: IconSearch,
|
|
||||||
path: "/manage/search-engines",
|
|
||||||
name: tPages("manageSearchEngine.label"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return quickLinks;
|
|
||||||
})(),
|
|
||||||
Component: ({ name, icon: Icon }) => (
|
|
||||||
<Group px="md" py="xs" w="100%" wrap="nowrap" align="center">
|
|
||||||
<Icon stroke={1.5} />
|
|
||||||
<Text>{name}</Text>
|
|
||||||
</Group>
|
|
||||||
),
|
|
||||||
filter: () => true,
|
|
||||||
useInteraction: interaction.link(({ path }) => ({ href: path })),
|
|
||||||
}),
|
|
||||||
createGroup({
|
|
||||||
keyPath: "character",
|
|
||||||
title: (t) => t("search.mode.help.group.mode.title"),
|
|
||||||
options: visibleSearchModes.map(({ character, modeKey }) => ({ character, modeKey })),
|
|
||||||
Component: ({ modeKey, character }) => {
|
|
||||||
const t = useScopedI18n(`search.mode.${modeKey}`);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Group px="md" py="xs" w="100%" wrap="nowrap" align="center" justify="space-between">
|
|
||||||
<Text>{t("help")}</Text>
|
|
||||||
<Kbd size="sm">{character}</Kbd>
|
|
||||||
</Group>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
filter: () => true,
|
|
||||||
useInteraction: interaction.mode(({ modeKey }) => ({ mode: modeKey })),
|
|
||||||
}),
|
|
||||||
createGroup({
|
|
||||||
keyPath: "href",
|
|
||||||
title: (t) => t("search.mode.help.group.help.title"),
|
|
||||||
useOptions() {
|
|
||||||
const t = useScopedI18n("search.mode.help.group.help.option");
|
|
||||||
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
href: createDocumentationLink("/docs/getting-started"),
|
|
||||||
icon: IconBook2,
|
|
||||||
label: t("documentation.label"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
href: "https://github.com/homarr-labs/homarr/issues/new/choose",
|
|
||||||
icon: IconBrandGithub,
|
|
||||||
label: t("submitIssue.label"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
href: "https://discord.com/invite/aCsmEV5RgA",
|
|
||||||
icon: IconBrandDiscord,
|
|
||||||
label: t("discord.label"),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
Component: (props) => (
|
|
||||||
<Group px="md" py="xs" w="100%" wrap="nowrap" align="center">
|
|
||||||
<props.icon stroke={1.5} />
|
|
||||||
<Text>{props.label}</Text>
|
|
||||||
</Group>
|
|
||||||
),
|
|
||||||
filter: () => true,
|
|
||||||
useInteraction: interaction.link(({ href }) => ({ href, newTab: true })),
|
|
||||||
}),
|
|
||||||
] as const;
|
|
||||||
};
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Box, Group, Stack, Text } from "@mantine/core";
|
import { Box, Group, Stack, Text } from "@mantine/core";
|
||||||
import { IconSearch, IconSearchOff } from "@tabler/icons-react";
|
import { IconCaretUpDown, IconSearch, IconSearchOff } from "@tabler/icons-react";
|
||||||
|
|
||||||
import type { RouterOutputs } from "@homarr/api";
|
import type { RouterOutputs } from "@homarr/api";
|
||||||
import { clientApi } from "@homarr/api/client";
|
import { clientApi } from "@homarr/api/client";
|
||||||
@@ -79,7 +79,20 @@ export const homeSearchEngineGroup = createGroup<GroupItem>({
|
|||||||
isLoading:
|
isLoading:
|
||||||
defaultSearchEngineQuery.isLoading || (resultQuery.isLoading && fromIntegrationEnabled) || status === "loading",
|
defaultSearchEngineQuery.isLoading || (resultQuery.isLoading && fromIntegrationEnabled) || status === "loading",
|
||||||
isError: defaultSearchEngineQuery.isError || (resultQuery.isError && fromIntegrationEnabled),
|
isError: defaultSearchEngineQuery.isError || (resultQuery.isError && fromIntegrationEnabled),
|
||||||
data: createDefaultSearchEntries(defaultSearchEngine, results, session, query, t),
|
data: [
|
||||||
|
...createDefaultSearchEntries(defaultSearchEngine, results, session, query, t),
|
||||||
|
{
|
||||||
|
id: "other",
|
||||||
|
name: t("search.mode.home.group.search.option.other.label"),
|
||||||
|
icon: IconCaretUpDown,
|
||||||
|
useInteraction() {
|
||||||
|
return {
|
||||||
|
type: "mode",
|
||||||
|
mode: "external",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
import { Group, Kbd, Text } from "@mantine/core";
|
||||||
|
import { IconBook2, IconBrandDiscord, IconBrandGithub } from "@tabler/icons-react";
|
||||||
|
|
||||||
|
import { useSession } from "@homarr/auth/client";
|
||||||
|
import { createDocumentationLink } from "@homarr/definitions";
|
||||||
|
import { useScopedI18n } from "@homarr/translation/client";
|
||||||
|
|
||||||
|
import { createGroup } from "../lib/group";
|
||||||
|
import { interaction } from "../lib/interaction";
|
||||||
|
import type { SearchMode } from "../lib/mode";
|
||||||
import { appIntegrationBoardMode } from "./app-integration-board";
|
import { appIntegrationBoardMode } from "./app-integration-board";
|
||||||
import { commandMode } from "./command";
|
import { commandMode } from "./command";
|
||||||
import { externalMode } from "./external";
|
import { externalMode } from "./external";
|
||||||
@@ -5,11 +15,72 @@ import { homeMode } from "./home";
|
|||||||
import { pageMode } from "./page";
|
import { pageMode } from "./page";
|
||||||
import { userGroupMode } from "./user-group";
|
import { userGroupMode } from "./user-group";
|
||||||
|
|
||||||
export const searchModes = [
|
const searchModesForHelp = [userGroupMode, appIntegrationBoardMode, externalMode, commandMode, pageMode] as const;
|
||||||
userGroupMode,
|
|
||||||
appIntegrationBoardMode,
|
const helpMode = {
|
||||||
externalMode,
|
modeKey: "help",
|
||||||
commandMode,
|
character: "?",
|
||||||
pageMode,
|
useGroups() {
|
||||||
homeMode,
|
const { data: session } = useSession();
|
||||||
] as const;
|
const visibleSearchModes: SearchMode[] = [appIntegrationBoardMode, externalMode, commandMode, pageMode];
|
||||||
|
|
||||||
|
if (session?.user.permissions.includes("admin")) {
|
||||||
|
visibleSearchModes.unshift(userGroupMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
createGroup({
|
||||||
|
keyPath: "character",
|
||||||
|
title: (t) => t("search.mode.help.group.mode.title"),
|
||||||
|
options: visibleSearchModes.map(({ character, modeKey }) => ({ character, modeKey })),
|
||||||
|
Component: ({ modeKey, character }) => {
|
||||||
|
const t = useScopedI18n(`search.mode.${modeKey}`);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Group px="md" py="xs" w="100%" wrap="nowrap" align="center" justify="space-between">
|
||||||
|
<Text>{t("help")}</Text>
|
||||||
|
<Kbd size="sm">{character}</Kbd>
|
||||||
|
</Group>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
filter: () => true,
|
||||||
|
useInteraction: interaction.mode(({ modeKey }) => ({ mode: modeKey })),
|
||||||
|
}),
|
||||||
|
createGroup({
|
||||||
|
keyPath: "href",
|
||||||
|
title: (t) => t("search.mode.help.group.help.title"),
|
||||||
|
useOptions() {
|
||||||
|
const t = useScopedI18n("search.mode.help.group.help.option");
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: t("documentation.label"),
|
||||||
|
icon: IconBook2,
|
||||||
|
href: createDocumentationLink("/docs/getting-started"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t("submitIssue.label"),
|
||||||
|
icon: IconBrandGithub,
|
||||||
|
href: "https://github.com/homarr-labs/homarr/issues/new/choose",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t("discord.label"),
|
||||||
|
icon: IconBrandDiscord,
|
||||||
|
href: "https://discord.com/invite/aCsmEV5RgA",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
Component: (props) => (
|
||||||
|
<Group px="md" py="xs" w="100%" wrap="nowrap" align="center">
|
||||||
|
<props.icon />
|
||||||
|
<Text>{props.label}</Text>
|
||||||
|
</Group>
|
||||||
|
),
|
||||||
|
filter: () => true,
|
||||||
|
useInteraction: interaction.link(({ href }) => ({ href, newTab: true })),
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
},
|
||||||
|
} satisfies SearchMode;
|
||||||
|
|
||||||
|
export const searchModes = [...searchModesForHelp, helpMode, homeMode] as const;
|
||||||
@@ -284,17 +284,6 @@ export const localeConfigurations = {
|
|||||||
return import("dayjs/locale/pt").then((module) => module.default);
|
return import("dayjs/locale/pt").then((module) => module.default);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"pt-br": {
|
|
||||||
name: "Português (Brasil)",
|
|
||||||
translatedName: "Portuguese (Brazil)",
|
|
||||||
icon: flagIcon("br"),
|
|
||||||
importMrtLocalization() {
|
|
||||||
return import("mantine-react-table/locales/pt-BR/index.esm.mjs").then((module) => module.MRT_Localization_PT_BR);
|
|
||||||
},
|
|
||||||
importDayJsLocale() {
|
|
||||||
return import("dayjs/locale/pt-br").then((module) => module.default);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ro: {
|
ro: {
|
||||||
name: "Românesc",
|
name: "Românesc",
|
||||||
translatedName: "Romanian",
|
translatedName: "Romanian",
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "Obre els resultats de la cerca en una pestanya nova"
|
"label": "Obre els resultats de la cerca en una pestanya nova"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Canvia la imatge",
|
"label": "Canvia la imatge",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": ""
|
"internalServerError": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "",
|
|
||||||
"description": "",
|
|
||||||
"visitors": "",
|
|
||||||
"active": "",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "",
|
"query": "",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "",
|
"label": "",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "",
|
"title": "",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "在新标签页中打开搜索结果"
|
"label": "在新标签页中打开搜索结果"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": "启用 DuckDuckGo bangs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": "DuckDuckGo bangs 切换成功"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": "无法切换 DuckDuckGo bangs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "更改头像",
|
"label": "更改头像",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "自动",
|
|
||||||
"light": "日间",
|
"light": "日间",
|
||||||
"dark": "暗黑"
|
"dark": "暗黑"
|
||||||
}
|
}
|
||||||
@@ -1540,13 +1526,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"timetable": {
|
"timetable": {
|
||||||
"name": "时刻表",
|
"name": "",
|
||||||
"description": "显示车站的出发时间",
|
"description": "",
|
||||||
"title": "出发时间 {station}",
|
"title": "",
|
||||||
"noStation": "未选择车站",
|
"noStation": "",
|
||||||
"option": {
|
"option": {
|
||||||
"station": {
|
"station": {
|
||||||
"label": "车站"
|
"label": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1621,11 +1607,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"anchorNote": {
|
"anchorNote": {
|
||||||
"name": "锚点笔记",
|
"name": "",
|
||||||
"description": "显示来自锚点的所选笔记",
|
"description": "",
|
||||||
"option": {
|
"option": {
|
||||||
"noteId": {
|
"noteId": {
|
||||||
"label": "笔记"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showTitle": {
|
"showTitle": {
|
||||||
"label": "显示标题"
|
"label": "显示标题"
|
||||||
@@ -1637,16 +1623,16 @@
|
|||||||
"empty": "选择要显示的笔记",
|
"empty": "选择要显示的笔记",
|
||||||
"emptyContent": "此笔记没有内容",
|
"emptyContent": "此笔记没有内容",
|
||||||
"notFound": "未找到笔记",
|
"notFound": "未找到笔记",
|
||||||
"noNotes": "未找到笔记",
|
"noNotes": "",
|
||||||
"integrationRequired": "请先选择锚点集成",
|
"integrationRequired": "",
|
||||||
"updatedAt": "更新时间:{date}",
|
"updatedAt": "更新时间:{date}",
|
||||||
"untitled": "未命名",
|
"untitled": "未命名",
|
||||||
"edit": "编辑",
|
"edit": "编辑",
|
||||||
"save": "保存",
|
"save": "保存",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
"readOnlyViewer": "您对该笔记只有查看权限,编辑已禁用。",
|
"readOnlyViewer": "",
|
||||||
"saveForbidden": "您没有编辑此笔记的权限。",
|
"saveForbidden": "",
|
||||||
"saveFailed": "保存此笔记失败,请重试。"
|
"saveFailed": ""
|
||||||
},
|
},
|
||||||
"iframe": {
|
"iframe": {
|
||||||
"name": "iFrame",
|
"name": "iFrame",
|
||||||
@@ -1680,7 +1666,7 @@
|
|||||||
"label": "允许地理位置"
|
"label": "允许地理位置"
|
||||||
},
|
},
|
||||||
"allowModals": {
|
"allowModals": {
|
||||||
"label": "允许弹窗"
|
"label": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -2056,156 +2042,58 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"name": "Tracearr",
|
"name": "",
|
||||||
"description": "增强型媒体服务器监控,提供详细的流与转码数据",
|
"description": "",
|
||||||
"option": {
|
"option": {
|
||||||
"showStreams": {
|
"showStreams": {
|
||||||
"label": "显示活跃流"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showStats": {
|
"showStats": {
|
||||||
"label": "显示统计摘要"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showRecentActivity": {
|
"showRecentActivity": {
|
||||||
"label": "显示近期活动"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showViolations": {
|
"showViolations": {
|
||||||
"label": "显示违规记录"
|
"label": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stats": {
|
"stats": {
|
||||||
"activeStreams": "活跃流",
|
"activeStreams": "",
|
||||||
"totalUsers": "总用户数",
|
"totalUsers": "",
|
||||||
"transcodes": "转码数",
|
"transcodes": "",
|
||||||
"bandwidth": "带宽"
|
"bandwidth": ""
|
||||||
},
|
},
|
||||||
"streams": {
|
"streams": {
|
||||||
"empty": "无活跃流",
|
"empty": "",
|
||||||
"user": "用户",
|
"user": "",
|
||||||
"media": "媒体",
|
"media": "",
|
||||||
"state": "状态",
|
"state": "",
|
||||||
"quality": "画质",
|
"quality": "",
|
||||||
"device": "设备",
|
"device": "",
|
||||||
"progress": "进度",
|
"progress": "",
|
||||||
"videoDecision": {
|
"videoDecision": {
|
||||||
"directPlay": "直接播放",
|
"directPlay": "",
|
||||||
"transcode": "转码",
|
"transcode": "",
|
||||||
"directStream": "直接串流"
|
"directStream": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"recentActivity": {
|
"recentActivity": {
|
||||||
"title": "近期活动",
|
"title": "",
|
||||||
"empty": "暂无近期活动",
|
"empty": "",
|
||||||
"watched": "已观看",
|
"watched": "",
|
||||||
"partial": "部分观看"
|
"partial": ""
|
||||||
},
|
},
|
||||||
"violations": {
|
"violations": {
|
||||||
"title": "违规记录",
|
"title": "",
|
||||||
"empty": "暂无近期违规",
|
"empty": "",
|
||||||
"rule": "规则",
|
"rule": "",
|
||||||
"user": "用户"
|
"user": ""
|
||||||
},
|
},
|
||||||
"noSectionsEnabled": "未启用任何分区",
|
"noSectionsEnabled": "",
|
||||||
"error": {
|
"error": {
|
||||||
"noIntegration": "未配置 Tracearr 集成",
|
"noIntegration": "",
|
||||||
"internalServerError": "获取 Tracearr 数据失败"
|
"internalServerError": ""
|
||||||
}
|
|
||||||
},
|
|
||||||
"umami": {
|
|
||||||
"name": "Umami 分析",
|
|
||||||
"description": "显示来自 Umami 分析实例的访客统计",
|
|
||||||
"visitors": "访客",
|
|
||||||
"active": "活跃",
|
|
||||||
"pageviews": "浏览量",
|
|
||||||
"visits": "访问数",
|
|
||||||
"bounceRate": "跳出率",
|
|
||||||
"avgDuration": "平均",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "网站",
|
|
||||||
"description": "选择您的 Umami 实例所追踪的网站",
|
|
||||||
"placeholder": "选择一个网站",
|
|
||||||
"loading": "正在加载网站……",
|
|
||||||
"noWebsites": "未找到网站",
|
|
||||||
"configureIntegrationFirst": "请先添加 Umami 集成"
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "时间范围",
|
|
||||||
"description": "用于展示访客数据的时间段",
|
|
||||||
"option": {
|
|
||||||
"today": "今天",
|
|
||||||
"24h": "过去 24 小时",
|
|
||||||
"7d": "过去 7 天",
|
|
||||||
"30d": "过去 30 天",
|
|
||||||
"month": "本月",
|
|
||||||
"lastMonth": "上月"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "事件",
|
|
||||||
"description": "显示特定事件的总发生次数",
|
|
||||||
"placeholder": "选择一个事件",
|
|
||||||
"loading": "正在加载事件……",
|
|
||||||
"noEvents": "未找到事件",
|
|
||||||
"none": "无事件",
|
|
||||||
"configureWebsiteFirst": "请先选择网站以加载事件"
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "图表类型",
|
|
||||||
"description": "图表的显示样式",
|
|
||||||
"option": {
|
|
||||||
"bar": "条形图",
|
|
||||||
"sparkline": "迷你趋势图"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "图表样式",
|
|
||||||
"description": "如何在图表中显示事件序列",
|
|
||||||
"option": {
|
|
||||||
"grouped": "并排",
|
|
||||||
"overlay": "叠加(子集)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "视图",
|
|
||||||
"description": "组件主体中要显示的内容",
|
|
||||||
"option": {
|
|
||||||
"chart": "图表",
|
|
||||||
"events": "事件图表",
|
|
||||||
"topPages": "热门页面",
|
|
||||||
"topReferrers": "热门来源"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "事件",
|
|
||||||
"description": "选择一个或多个要图表化的事件",
|
|
||||||
"placeholder": "选择事件……",
|
|
||||||
"loading": "正在加载事件……",
|
|
||||||
"noEvents": "未找到事件",
|
|
||||||
"configureWebsiteFirst": "请先选择网站以加载事件"
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "显示数量",
|
|
||||||
"description": "要显示的热门项目数量(最大 500)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "事件",
|
|
||||||
"label": "事件"
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": "直接"
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": "直接"
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": "选择要图表化的事件"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "未配置 Umami 集成",
|
|
||||||
"noWebsite": "未配置网站",
|
|
||||||
"noData": "无可用数据",
|
|
||||||
"internalServerError": "获取 Umami 数据失败"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
@@ -2304,50 +2192,50 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"immich-serverStats": {
|
"immich-serverStats": {
|
||||||
"name": "Immich 服务器统计",
|
"name": "",
|
||||||
"description": "有关您的 Immich 实例的信息",
|
"description": "",
|
||||||
"option": {
|
"option": {
|
||||||
"showUsers": {
|
"showUsers": {
|
||||||
"label": "显示用户",
|
"label": "",
|
||||||
"description": "显示实例上的用户数量"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showPhotos": {
|
"showPhotos": {
|
||||||
"label": "显示图片",
|
"label": "显示图片",
|
||||||
"description": "显示实例上的照片数量"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showVideos": {
|
"showVideos": {
|
||||||
"label": "显示视频",
|
"label": "显示视频",
|
||||||
"description": "显示实例上的视频数量"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showStorage": {
|
"showStorage": {
|
||||||
"label": "显示存储",
|
"label": "显示存储",
|
||||||
"description": "显示已使用的总存储空间"
|
"description": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"users": "用户",
|
"users": "",
|
||||||
"photos": "照片",
|
"photos": "",
|
||||||
"videos": "视频",
|
"videos": "",
|
||||||
"storage": "已用存储"
|
"storage": ""
|
||||||
},
|
},
|
||||||
"immich-albumCarousel": {
|
"immich-albumCarousel": {
|
||||||
"name": "Immich 相册",
|
"name": "",
|
||||||
"option": {
|
"option": {
|
||||||
"albumId": {
|
"albumId": {
|
||||||
"label": "相册ID",
|
"label": "",
|
||||||
"description": "这是一个唯一标识符,用于指向您的 Immich 相册。您可以通过打开相册并从 URL 中复制那段唯一字符串来找到该 ID,例如:'a21aca09-9f05-47dc-b1a1-7b53c547226e'"
|
"description": ""
|
||||||
},
|
},
|
||||||
"rotationIntervalSeconds": {
|
"rotationIntervalSeconds": {
|
||||||
"label": "间隔(秒)",
|
"label": "",
|
||||||
"description": "每 X 秒切换一次相册中的图片。最小为 1,最大不得超过 3600。"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showPhotoInfo": {
|
"showPhotoInfo": {
|
||||||
"label": "显示图片信息",
|
"label": "显示图片信息",
|
||||||
"description": "在幻灯片底部显示图片日期和当前索引"
|
"description": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "Immich 相册图片幻灯片",
|
"description": "",
|
||||||
"noAlbumSelected": "未选择相册,请编辑组件并选择一个相册",
|
"noAlbumSelected": "",
|
||||||
"noPhotos": "此相册中没有照片"
|
"noPhotos": ""
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "下载客户端",
|
"name": "下载客户端",
|
||||||
@@ -2658,7 +2546,7 @@
|
|||||||
"label": "隐藏描述"
|
"label": "隐藏描述"
|
||||||
},
|
},
|
||||||
"showPosterImage": {
|
"showPosterImage": {
|
||||||
"label": "显示封面图"
|
"label": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2873,28 +2761,28 @@
|
|||||||
"option": {}
|
"option": {}
|
||||||
},
|
},
|
||||||
"speedtestTracker": {
|
"speedtestTracker": {
|
||||||
"name": "网速测试追踪器",
|
"name": "",
|
||||||
"description": "显示 网速测试追踪器 实例中的测速结果。",
|
"description": "",
|
||||||
"option": {
|
"option": {
|
||||||
"showLatestResult": {
|
"showLatestResult": {
|
||||||
"label": "显示最新结果"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showStats": {
|
"showStats": {
|
||||||
"label": "显示平均值"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showRecentResults": {
|
"showRecentResults": {
|
||||||
"label": "显示近期结果"
|
"label": ""
|
||||||
},
|
},
|
||||||
"showPingGraph": {
|
"showPingGraph": {
|
||||||
"label": "显示 Ping 图表"
|
"label": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latestResult": "最新结果",
|
"latestResult": "",
|
||||||
"averages": "平均值",
|
"averages": "",
|
||||||
"tests": "{count}次测试",
|
"tests": "",
|
||||||
"recentResults": "近期结果",
|
"recentResults": "",
|
||||||
"recentResultsSpeed": "速度",
|
"recentResultsSpeed": "",
|
||||||
"recentResultsPing": "Ping",
|
"recentResultsPing": "",
|
||||||
"download": "下载",
|
"download": "下载",
|
||||||
"upload": "上传",
|
"upload": "上传",
|
||||||
"ping": "Ping",
|
"ping": "Ping",
|
||||||
@@ -2902,13 +2790,13 @@
|
|||||||
"avgDownload": "平均下载",
|
"avgDownload": "平均下载",
|
||||||
"avgUpload": "平均上传",
|
"avgUpload": "平均上传",
|
||||||
"avgPing": "平均Ping",
|
"avgPing": "平均Ping",
|
||||||
"healthy": "健康",
|
"healthy": "",
|
||||||
"unhealthy": "不健康",
|
"unhealthy": "",
|
||||||
"ok": "正常",
|
"ok": "",
|
||||||
"fail": "失败",
|
"fail": "失败",
|
||||||
"noSectionsEnabled": "请在组件选项中至少启用一个模块。",
|
"noSectionsEnabled": "",
|
||||||
"error": {
|
"error": {
|
||||||
"internalServerError": "获取测速数据失败"
|
"internalServerError": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systemResources": {
|
"systemResources": {
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "默认配色方案",
|
"label": "默认配色方案",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "自动",
|
|
||||||
"light": "日间",
|
"light": "日间",
|
||||||
"dark": "暗黑"
|
"dark": "暗黑"
|
||||||
}
|
}
|
||||||
@@ -3708,7 +3595,7 @@
|
|||||||
"label": "Minecraft 服务状态"
|
"label": "Minecraft 服务状态"
|
||||||
},
|
},
|
||||||
"timetable": {
|
"timetable": {
|
||||||
"label": "时刻表"
|
"label": ""
|
||||||
},
|
},
|
||||||
"iconsUpdater": {
|
"iconsUpdater": {
|
||||||
"label": "图标更新"
|
"label": "图标更新"
|
||||||
@@ -3780,10 +3667,7 @@
|
|||||||
"label": "天气"
|
"label": "天气"
|
||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": "Tracearr"
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": "Umami 活跃访客"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3907,8 +3791,8 @@
|
|||||||
"subtitle": "在许多语言中,有{count}人贡献了翻译"
|
"subtitle": "在许多语言中,有{count}人贡献了翻译"
|
||||||
},
|
},
|
||||||
"sponsors": {
|
"sponsors": {
|
||||||
"title": "赞助商",
|
"title": "",
|
||||||
"subtitle": "{count}人通过财务方式支持该项目"
|
"subtitle": ""
|
||||||
},
|
},
|
||||||
"libraries": {
|
"libraries": {
|
||||||
"title": "相关的库",
|
"title": "相关的库",
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "端口"
|
"label": "端口"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": "宿主机"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "全局命令",
|
"title": "全局命令",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "切换外观模式",
|
|
||||||
"light": "切换到日间模式",
|
"light": "切换到日间模式",
|
||||||
"dark": "切换到暗黑模式"
|
"dark": "切换到暗黑模式"
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "搜索引擎",
|
"title": "搜索引擎",
|
||||||
"tipDdgBangs": "提示:你也可以在此使用任何 DuckDuckGo Bangs,例如 !something",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "使用“‘’{query}”搜索“{label}”",
|
|
||||||
"pressEnterToOpen": "按 Enter 键打开",
|
|
||||||
"engineSelected": "已选择{label}({bang})",
|
|
||||||
"typeQueryToContinue": "输入搜索查询以继续",
|
|
||||||
"emptyBangHint": "输入 bang,例如 !yt,然后按空格键进行选择"
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "crwdns2696:0crwdne2696:0"
|
"label": "crwdns2696:0crwdne2696:0"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": "crwdns4231:0crwdne4231:0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": "crwdns4233:0crwdne4233:0"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": "crwdns4235:0crwdne4235:0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "crwdns94:0crwdne94:0",
|
"label": "crwdns94:0crwdne94:0",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "crwdns4225:0crwdne4225:0",
|
|
||||||
"light": "crwdns2362:0crwdne2362:0",
|
"light": "crwdns2362:0crwdne2362:0",
|
||||||
"dark": "crwdns2364:0crwdne2364:0"
|
"dark": "crwdns2364:0crwdne2364:0"
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": "crwdns3988:0crwdne3988:0"
|
"internalServerError": "crwdns3988:0crwdne3988:0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "crwdns4103:0crwdne4103:0",
|
|
||||||
"description": "crwdns4105:0crwdne4105:0",
|
|
||||||
"visitors": "crwdns4107:0crwdne4107:0",
|
|
||||||
"active": "crwdns4109:0crwdne4109:0",
|
|
||||||
"pageviews": "crwdns4111:0crwdne4111:0",
|
|
||||||
"visits": "crwdns4113:0crwdne4113:0",
|
|
||||||
"bounceRate": "crwdns4115:0crwdne4115:0",
|
|
||||||
"avgDuration": "crwdns4117:0crwdne4117:0",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "crwdns4119:0crwdne4119:0",
|
|
||||||
"description": "crwdns4121:0crwdne4121:0",
|
|
||||||
"placeholder": "crwdns4123:0crwdne4123:0",
|
|
||||||
"loading": "crwdns4125:0crwdne4125:0",
|
|
||||||
"noWebsites": "crwdns4127:0crwdne4127:0",
|
|
||||||
"configureIntegrationFirst": "crwdns4129:0crwdne4129:0"
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "crwdns4131:0crwdne4131:0",
|
|
||||||
"description": "crwdns4133:0crwdne4133:0",
|
|
||||||
"option": {
|
|
||||||
"today": "crwdns4135:0crwdne4135:0",
|
|
||||||
"24h": "crwdns4137:0crwdne4137:0",
|
|
||||||
"7d": "crwdns4139:0crwdne4139:0",
|
|
||||||
"30d": "crwdns4141:0crwdne4141:0",
|
|
||||||
"month": "crwdns4143:0crwdne4143:0",
|
|
||||||
"lastMonth": "crwdns4145:0crwdne4145:0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "crwdns4147:0crwdne4147:0",
|
|
||||||
"description": "crwdns4149:0crwdne4149:0",
|
|
||||||
"placeholder": "crwdns4151:0crwdne4151:0",
|
|
||||||
"loading": "crwdns4153:0crwdne4153:0",
|
|
||||||
"noEvents": "crwdns4155:0crwdne4155:0",
|
|
||||||
"none": "crwdns4157:0crwdne4157:0",
|
|
||||||
"configureWebsiteFirst": "crwdns4159:0crwdne4159:0"
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "crwdns4161:0crwdne4161:0",
|
|
||||||
"description": "crwdns4163:0crwdne4163:0",
|
|
||||||
"option": {
|
|
||||||
"bar": "crwdns4165:0crwdne4165:0",
|
|
||||||
"sparkline": "crwdns4167:0crwdne4167:0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "crwdns4169:0crwdne4169:0",
|
|
||||||
"description": "crwdns4171:0crwdne4171:0",
|
|
||||||
"option": {
|
|
||||||
"grouped": "crwdns4173:0crwdne4173:0",
|
|
||||||
"overlay": "crwdns4175:0crwdne4175:0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "crwdns4177:0crwdne4177:0",
|
|
||||||
"description": "crwdns4179:0crwdne4179:0",
|
|
||||||
"option": {
|
|
||||||
"chart": "crwdns4181:0crwdne4181:0",
|
|
||||||
"events": "crwdns4183:0crwdne4183:0",
|
|
||||||
"topPages": "crwdns4185:0crwdne4185:0",
|
|
||||||
"topReferrers": "crwdns4187:0crwdne4187:0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "crwdns4189:0crwdne4189:0",
|
|
||||||
"description": "crwdns4191:0crwdne4191:0",
|
|
||||||
"placeholder": "crwdns4193:0crwdne4193:0",
|
|
||||||
"loading": "crwdns4195:0crwdne4195:0",
|
|
||||||
"noEvents": "crwdns4197:0crwdne4197:0",
|
|
||||||
"configureWebsiteFirst": "crwdns4199:0crwdne4199:0"
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "crwdns4201:0crwdne4201:0",
|
|
||||||
"description": "crwdns4203:0crwdne4203:0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "crwdns4205:0crwdne4205:0",
|
|
||||||
"label": "crwdns4207:0crwdne4207:0"
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": "crwdns4209:0crwdne4209:0"
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": "crwdns4211:0crwdne4211:0"
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": "crwdns4213:0crwdne4213:0"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "crwdns4215:0crwdne4215:0",
|
|
||||||
"noWebsite": "crwdns4217:0crwdne4217:0",
|
|
||||||
"noData": "crwdns4219:0crwdne4219:0",
|
|
||||||
"internalServerError": "crwdns4221:0crwdne4221:0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "crwdns1110:0crwdne1110:0",
|
"query": "crwdns1110:0crwdne1110:0",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "crwdns1810:0crwdne1810:0",
|
"label": "crwdns1810:0crwdne1810:0",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "crwdns4227:0crwdne4227:0",
|
|
||||||
"light": "crwdns1812:0crwdne1812:0",
|
"light": "crwdns1812:0crwdne1812:0",
|
||||||
"dark": "crwdns1814:0crwdne1814:0"
|
"dark": "crwdns1814:0crwdne1814:0"
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": "crwdns3990:0crwdne3990:0"
|
"label": "crwdns3990:0crwdne3990:0"
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": "crwdns4223:0crwdne4223:0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "crwdns1920:0crwdne1920:0"
|
"label": "crwdns1920:0crwdne1920:0"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": "crwdns4249:0crwdne4249:0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "crwdns2072:0crwdne2072:0",
|
"title": "crwdns2072:0crwdne2072:0",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "crwdns4229:0crwdne4229:0",
|
|
||||||
"light": "crwdns2074:0crwdne2074:0",
|
"light": "crwdns2074:0crwdne2074:0",
|
||||||
"dark": "crwdns2076:0crwdne2076:0"
|
"dark": "crwdns2076:0crwdne2076:0"
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "crwdns2100:0crwdne2100:0",
|
"title": "crwdns2100:0crwdne2100:0",
|
||||||
"tipDdgBangs": "crwdns4237:0crwdne4237:0",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "crwdns4239:0{query}crwdnd4239:0{label}crwdne4239:0",
|
|
||||||
"pressEnterToOpen": "crwdns4241:0crwdne4241:0",
|
|
||||||
"engineSelected": "crwdns4243:0{label}crwdnd4243:0{bang}crwdne4243:0",
|
|
||||||
"typeQueryToContinue": "crwdns4245:0crwdne4245:0",
|
|
||||||
"emptyBangHint": "crwdns4247:0crwdne4247:0"
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Změnit obrázek",
|
"label": "Změnit obrázek",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Světlý",
|
"light": "Světlý",
|
||||||
"dark": "Tmavý"
|
"dark": "Tmavý"
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": ""
|
"internalServerError": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "",
|
|
||||||
"description": "",
|
|
||||||
"visitors": "",
|
|
||||||
"active": "",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "",
|
"query": "",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "",
|
"label": "",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "Porty"
|
"label": "Porty"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "",
|
"title": "",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "Åben søgeresultater i en ny fane"
|
"label": "Åben søgeresultater i en ny fane"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Skift billede",
|
"label": "Skift billede",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Lys",
|
"light": "Lys",
|
||||||
"dark": "Mørk"
|
"dark": "Mørk"
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": "Kunne ikke hente Tracearr data"
|
"internalServerError": "Kunne ikke hente Tracearr data"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "",
|
|
||||||
"description": "",
|
|
||||||
"visitors": "",
|
|
||||||
"active": "",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "By / Postnummer",
|
"query": "By / Postnummer",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "Standard farvetema",
|
"label": "Standard farvetema",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Lys",
|
"light": "Lys",
|
||||||
"dark": "Mørk"
|
"dark": "Mørk"
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": "Tracearr"
|
"label": "Tracearr"
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "Porte"
|
"label": "Porte"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "Globale kommandoer",
|
"title": "Globale kommandoer",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "Skift til lys tilstand",
|
"light": "Skift til lys tilstand",
|
||||||
"dark": "Skift til mørk tilstand"
|
"dark": "Skift til mørk tilstand"
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "Søgemaskiner",
|
"title": "Søgemaskiner",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "Suchergebnisse in neuem Tab öffnen"
|
"label": "Suchergebnisse in neuem Tab öffnen"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Biud wächsle",
|
"label": "Biud wächsle",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Hell",
|
"light": "Hell",
|
||||||
"dark": "Dunkel"
|
"dark": "Dunkel"
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": ""
|
"internalServerError": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "",
|
|
||||||
"description": "",
|
|
||||||
"visitors": "",
|
|
||||||
"active": "",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "Stadt / Postleitzahl",
|
"query": "Stadt / Postleitzahl",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "Standard Farbschema",
|
"label": "Standard Farbschema",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Hell",
|
"light": "Hell",
|
||||||
"dark": "Dunkel"
|
"dark": "Dunkel"
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "Globale Befehle",
|
"title": "Globale Befehle",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "Zum hellen Design wechseln",
|
"light": "Zum hellen Design wechseln",
|
||||||
"dark": "Zum dunklen Design wechseln"
|
"dark": "Zum dunklen Design wechseln"
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "Suchmaschinen",
|
"title": "Suchmaschinen",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "Suchergebnisse in neuem Tab öffnen"
|
"label": "Suchergebnisse in neuem Tab öffnen"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Bild ändern",
|
"label": "Bild ändern",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Hell",
|
"light": "Hell",
|
||||||
"dark": "Dunkel"
|
"dark": "Dunkel"
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": ""
|
"internalServerError": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "",
|
|
||||||
"description": "",
|
|
||||||
"visitors": "",
|
|
||||||
"active": "",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "Stadt / Postleitzahl",
|
"query": "Stadt / Postleitzahl",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "Standard Farbschema",
|
"label": "Standard Farbschema",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "Hell",
|
"light": "Hell",
|
||||||
"dark": "Dunkel"
|
"dark": "Dunkel"
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "Ports"
|
"label": "Ports"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "Globale Befehle",
|
"title": "Globale Befehle",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "Zum hellen Design wechseln",
|
"light": "Zum hellen Design wechseln",
|
||||||
"dark": "Zum dunklen Design wechseln"
|
"dark": "Zum dunklen Design wechseln"
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "Suchmaschinen",
|
"title": "Suchmaschinen",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "",
|
"label": "",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": ""
|
"internalServerError": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "",
|
|
||||||
"description": "",
|
|
||||||
"visitors": "",
|
|
||||||
"active": "",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "",
|
"query": "",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "",
|
"label": "",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "Θύρες"
|
"label": "Θύρες"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "",
|
"title": "",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "Open the search results in a new tab"
|
"label": "Open the search results in a new tab"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": "Enable DuckDuckGo bangs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": "DuckDuckGo bangs toggled successfully"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": "Unable to toggle DuckDuckGo bangs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Change image",
|
"label": "Change image",
|
||||||
@@ -1093,7 +1080,6 @@
|
|||||||
},
|
},
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "Auto",
|
|
||||||
"light": "Light",
|
"light": "Light",
|
||||||
"dark": "Dark"
|
"dark": "Dark"
|
||||||
}
|
}
|
||||||
@@ -2110,104 +2096,6 @@
|
|||||||
"internalServerError": "Failed to fetch Tracearr data"
|
"internalServerError": "Failed to fetch Tracearr data"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"umami": {
|
|
||||||
"name": "Umami Analytics",
|
|
||||||
"description": "Display visitor stats from your Umami analytics instance",
|
|
||||||
"visitors": "visitors",
|
|
||||||
"active": "active",
|
|
||||||
"pageviews": "",
|
|
||||||
"visits": "",
|
|
||||||
"bounceRate": "",
|
|
||||||
"avgDuration": "",
|
|
||||||
"option": {
|
|
||||||
"websiteId": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noWebsites": "",
|
|
||||||
"configureIntegrationFirst": ""
|
|
||||||
},
|
|
||||||
"timeFrame": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"today": "",
|
|
||||||
"24h": "",
|
|
||||||
"7d": "",
|
|
||||||
"30d": "",
|
|
||||||
"month": "",
|
|
||||||
"lastMonth": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventName": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"none": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"chartType": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"bar": "",
|
|
||||||
"sparkline": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chartStyle": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"grouped": "",
|
|
||||||
"overlay": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"viewMode": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"option": {
|
|
||||||
"chart": "",
|
|
||||||
"events": "",
|
|
||||||
"topPages": "",
|
|
||||||
"topReferrers": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eventNames": {
|
|
||||||
"label": "",
|
|
||||||
"description": "",
|
|
||||||
"placeholder": "",
|
|
||||||
"loading": "",
|
|
||||||
"noEvents": "",
|
|
||||||
"configureWebsiteFirst": ""
|
|
||||||
},
|
|
||||||
"topCount": {
|
|
||||||
"label": "",
|
|
||||||
"description": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"occurrences": "",
|
|
||||||
"label": ""
|
|
||||||
},
|
|
||||||
"topPages": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"topReferrers": {
|
|
||||||
"direct": ""
|
|
||||||
},
|
|
||||||
"events": {
|
|
||||||
"selectPrompt": ""
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"noIntegration": "",
|
|
||||||
"noWebsite": "",
|
|
||||||
"noData": "",
|
|
||||||
"internalServerError": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"common": {
|
"common": {
|
||||||
"location": {
|
"location": {
|
||||||
"query": "City / Postal code",
|
"query": "City / Postal code",
|
||||||
@@ -2290,55 +2178,55 @@
|
|||||||
"resolution": "Resolution"
|
"resolution": "Resolution"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"title": "Audio",
|
"title": "",
|
||||||
"channelCount": "Audio channels",
|
"channelCount": "",
|
||||||
"codec": "Audio codec"
|
"codec": ""
|
||||||
},
|
},
|
||||||
"transcoding": {
|
"transcoding": {
|
||||||
"title": "Transcoding",
|
"title": "",
|
||||||
"container": "Container",
|
"container": "",
|
||||||
"resolution": "Resolution",
|
"resolution": "",
|
||||||
"target": "Target codec"
|
"target": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"immich-serverStats": {
|
"immich-serverStats": {
|
||||||
"name": "Immich Server Stats",
|
"name": "",
|
||||||
"description": "Information about your Immich instance",
|
"description": "",
|
||||||
"option": {
|
"option": {
|
||||||
"showUsers": {
|
"showUsers": {
|
||||||
"label": "Show users",
|
"label": "",
|
||||||
"description": "Show count of users on your instance"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showPhotos": {
|
"showPhotos": {
|
||||||
"label": "Show photos",
|
"label": "",
|
||||||
"description": "Show count of photos on your instance"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showVideos": {
|
"showVideos": {
|
||||||
"label": "Show videos",
|
"label": "",
|
||||||
"description": "Show count of videos on your instance"
|
"description": ""
|
||||||
},
|
},
|
||||||
"showStorage": {
|
"showStorage": {
|
||||||
"label": "Show storage",
|
"label": "",
|
||||||
"description": "Show the total amount of storage used"
|
"description": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"users": "Users",
|
"users": "",
|
||||||
"photos": "Photos",
|
"photos": "",
|
||||||
"videos": "Videos",
|
"videos": "",
|
||||||
"storage": "Used Storage"
|
"storage": ""
|
||||||
},
|
},
|
||||||
"immich-albumCarousel": {
|
"immich-albumCarousel": {
|
||||||
"name": "Immich Album",
|
"name": "",
|
||||||
"option": {
|
"option": {
|
||||||
"albumId": {
|
"albumId": {
|
||||||
"label": "Album ID",
|
"label": "",
|
||||||
"description": "This is a unique ID which refers to your Immich album. You can find this id by opening an album and copying the unique string from the URL, for example 'a21aca09-9f05-47dc-b1a1-7b53c547226e'"
|
"description": ""
|
||||||
},
|
},
|
||||||
"rotationIntervalSeconds": {
|
"rotationIntervalSeconds": {
|
||||||
"label": "Interval in seconds",
|
"label": "",
|
||||||
"description": "Rotate between pictures in the album every X seconds. Must be at least 1. Must be below 3600."
|
"description": ""
|
||||||
},
|
},
|
||||||
"showPhotoInfo": {
|
"showPhotoInfo": {
|
||||||
"label": "",
|
"label": "",
|
||||||
@@ -3680,7 +3568,6 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "Default colour scheme",
|
"label": "Default colour scheme",
|
||||||
"options": {
|
"options": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
}
|
}
|
||||||
@@ -3781,9 +3668,6 @@
|
|||||||
},
|
},
|
||||||
"tracearr": {
|
"tracearr": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"umamiActiveVisitors": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@@ -3970,9 +3854,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4499,7 +4380,6 @@
|
|||||||
"title": "",
|
"title": "",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"auto": "",
|
|
||||||
"light": "",
|
"light": "",
|
||||||
"dark": ""
|
"dark": ""
|
||||||
},
|
},
|
||||||
@@ -4521,10 +4401,10 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"newIntegration": {
|
"newIntegration": {
|
||||||
"label": "Create a new integration",
|
"label": "",
|
||||||
"children": {
|
"children": {
|
||||||
"detail": {
|
"detail": {
|
||||||
"title": "Select the integration type you want to create"
|
"title": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4551,14 +4431,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"tipDdgBangs": "",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "",
|
|
||||||
"pressEnterToOpen": "",
|
|
||||||
"engineSelected": "",
|
|
||||||
"typeQueryToContinue": "",
|
|
||||||
"emptyBangHint": ""
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
@@ -157,9 +157,6 @@
|
|||||||
},
|
},
|
||||||
"openSearchInNewTab": {
|
"openSearchInNewTab": {
|
||||||
"label": "Open search results in new tab"
|
"label": "Open search results in new tab"
|
||||||
},
|
|
||||||
"ddgBangs": {
|
|
||||||
"label": "Enable DuckDuckGo bangs"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -249,16 +246,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"changeDdgBangs": {
|
|
||||||
"notification": {
|
|
||||||
"success": {
|
|
||||||
"message": "DuckDuckGo bangs toggled successfully"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"message": "Unable to toggle DuckDuckGo bangs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"manageAvatar": {
|
"manageAvatar": {
|
||||||
"changeImage": {
|
"changeImage": {
|
||||||
"label": "Change image",
|
"label": "Change image",
|
||||||
@@ -3970,9 +3957,6 @@
|
|||||||
},
|
},
|
||||||
"ports": {
|
"ports": {
|
||||||
"label": "Ports"
|
"label": "Ports"
|
||||||
},
|
|
||||||
"host": {
|
|
||||||
"label": "Host"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -4551,14 +4535,6 @@
|
|||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "Search engines",
|
"title": "Search engines",
|
||||||
"tipDdgBangs": "Tip: You can use any DuckDuckGo bangs here as well, e.g. !something",
|
|
||||||
"bang": {
|
|
||||||
"searchWithQuery": "Search \"{query}\" with {label}",
|
|
||||||
"pressEnterToOpen": "Press Enter to open",
|
|
||||||
"engineSelected": "{label} selected (!{bang})",
|
|
||||||
"typeQueryToContinue": "Type your search query to continue",
|
|
||||||
"emptyBangHint": "Type a bang, e.g. !yt, then press Space to select"
|
|
||||||
},
|
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
|
|||||||
Loaded 100 of 140 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user