Compare commits
75
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
168b587c18 | ||
|
|
dc12a82805 | ||
|
|
f5076454cd | ||
|
|
aeb681a858 | ||
|
|
56b57ad171 | ||
|
|
91e1cef611 | ||
|
|
e53b06e8c2 | ||
|
|
0ebf4bc55e | ||
|
|
b8a155dd08 | ||
|
|
63786eed06 | ||
|
|
598f0047eb | ||
|
|
eacda4c397 | ||
|
|
5cb726f793 | ||
|
|
e8d29420e0 | ||
|
|
23c7d0bbf0 | ||
|
|
75aefcb0d5 | ||
|
|
b52a8a7935 | ||
|
|
6d90209e00 | ||
|
|
8f0945f51a | ||
|
|
5b04b93f23 | ||
|
|
c8228b920c | ||
|
|
abf7942fb7 | ||
|
|
50746eb3e4 | ||
|
|
76abfca11b | ||
|
|
fcab6a347d | ||
|
|
c91aae53ac | ||
|
|
4943e7b851 | ||
|
|
88c423fca6 | ||
|
|
f238663ec7 | ||
|
|
e9870e7ee7 | ||
|
|
9c0a0ced04 | ||
|
|
4c27635066 | ||
|
|
3d66ff9148 | ||
|
|
ec257e5f60 | ||
|
|
ef24370a8c | ||
|
|
1fa0fc50c5 | ||
|
|
e9a1dae857 | ||
|
|
e37279fe80 | ||
|
|
82c6ce7b77 | ||
|
|
555212e2dc | ||
|
|
c831539772 | ||
|
|
3e2ffbd7bf | ||
|
|
22d7f676eb | ||
|
|
23bf262f4e | ||
|
|
ecae80d741 | ||
|
|
162e8adf4c | ||
|
|
620ec0315f | ||
|
|
8df398c3c7 | ||
|
|
425359be02 | ||
|
|
8893b72fe3 | ||
|
|
b9483379dd | ||
|
|
0336803550 | ||
|
|
e220087e96 | ||
|
|
f127c9325c | ||
|
|
c410b06a15 | ||
|
|
ce755efe4d | ||
|
|
8b416a6dd3 | ||
|
|
fe95334aa7 | ||
|
|
b0facfd77a | ||
|
|
01db27c34f | ||
|
|
999cf58625 | ||
|
|
9223dd06ee | ||
|
|
42da2b9b06 | ||
|
|
a73eed63eb | ||
|
|
44dcc72d43 | ||
|
|
d02ded5511 | ||
|
|
dfacb08dbd | ||
|
|
4e85bbbad0 | ||
|
|
d78c6ed529 | ||
|
|
210ce3669f | ||
|
|
44e5346d75 | ||
|
|
d34d665229 | ||
|
|
b6dc38483d | ||
|
|
a7e387e54c | ||
|
|
189f35f3cb |
No files matched your search
+8
-5
@@ -4,6 +4,14 @@
|
|||||||
# This file will be committed to version control, so make sure not to have any secrets in it.
|
# This file will be committed to version control, so make sure not to have any secrets in it.
|
||||||
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.
|
# If you are cloning this repo, create a copy of this file named `.env` and populate it with your secrets.
|
||||||
|
|
||||||
|
# The below secret is not used anywhere but required for Auth.js (Would encrypt JWTs and Mail hashes, both not used)
|
||||||
|
AUTH_SECRET="supersecret"
|
||||||
|
|
||||||
|
# The below secret is used to encrypt integration secrets in the database.
|
||||||
|
# It should be a 32-byte string, generated by running `openssl rand -hex 32` on Unix
|
||||||
|
# or starting the project without any (which will show a randomly generated one).
|
||||||
|
SECRET_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
|
||||||
# This is how you can use the sqlite driver:
|
# This is how you can use the sqlite driver:
|
||||||
DB_DRIVER='better-sqlite3'
|
DB_DRIVER='better-sqlite3'
|
||||||
DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
|
DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
|
||||||
@@ -20,11 +28,6 @@ DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'
|
|||||||
# DB_PASSWORD='password'
|
# DB_PASSWORD='password'
|
||||||
# DB_NAME='name-of-database'
|
# DB_NAME='name-of-database'
|
||||||
|
|
||||||
|
|
||||||
# You can generate the secret via 'openssl rand -base64 32' on Unix
|
|
||||||
# @see https://next-auth.js.org/configuration/options#secret
|
|
||||||
AUTH_SECRET='supersecret'
|
|
||||||
|
|
||||||
TURBO_TELEMETRY_DISABLED=1
|
TURBO_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
# Configure logging to use winston logger
|
# Configure logging to use winston logger
|
||||||
|
|||||||
@@ -1,37 +1,78 @@
|
|||||||
name: 🐞 Bug Report
|
name: 🐞 Bug Report
|
||||||
description: Create a bug report to help us improve
|
description: Report that something is broken, not working as intended or causes side-effects
|
||||||
title: "bug: "
|
title: "bug: "
|
||||||
labels: ["🐞❔ unconfirmed bug"]
|
labels: ["needs triage"]
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Provide environment information
|
|
||||||
description: |
|
|
||||||
Run this command in your project root and paste the results in a code block:
|
|
||||||
```bash
|
|
||||||
npx envinfo --system --binaries
|
|
||||||
```
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe the bug
|
label: Describe the bug
|
||||||
description: A clear and concise description of the bug, as well as what you expected to happen when encountering it.
|
description: A clear and concise description of the bug, as well as what you expected to happen when encountering it.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Link to reproduction
|
label: Steps to reproduce
|
||||||
description: Please provide a link to a reproduction of the bug. Issues without a reproduction repo may be ignored.
|
description: Describe how to reproduce your bug. Steps, code snippets, reproduction repos etc.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: To reproduce
|
label: Impact
|
||||||
description: Describe how to reproduce your bug. Steps, code snippets, reproduction repos etc.
|
description: How big is the impact of this bug? Does it make Homarr unusable? Is there any workaround that you're aware of?
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional information
|
label: Additional information
|
||||||
description: Add any other information related to the bug here, screenshots if applicable.
|
description: Add any other information related to the bug here, screenshots if applicable.
|
||||||
|
- type: dropdown
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: What version of Homarr are you running?
|
||||||
|
options:
|
||||||
|
- 1.0.0-beta
|
||||||
|
- Other (describe in "additional information")
|
||||||
|
default: 0
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: installationMethod
|
||||||
|
attributes:
|
||||||
|
label: Installation method
|
||||||
|
description: How do you run Homarr? Post docker-compose, configs or screenshots if applicable.
|
||||||
|
options:
|
||||||
|
- Docker Run
|
||||||
|
- Docker Compose
|
||||||
|
- Portainer
|
||||||
|
- Helm
|
||||||
|
- QNAP
|
||||||
|
- Saltbox
|
||||||
|
- EasyPanel
|
||||||
|
- Unraid Apps
|
||||||
|
- TrueNAS Apps
|
||||||
|
- Synology
|
||||||
|
- HomeAssistant Addon
|
||||||
|
- From Source
|
||||||
|
- Other (describe in "additional information")
|
||||||
|
default: 0
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: browser
|
||||||
|
attributes:
|
||||||
|
label: Browser
|
||||||
|
description: If relevant, what browser do you use?
|
||||||
|
options:
|
||||||
|
- Firefox
|
||||||
|
- Edge (Chromium)
|
||||||
|
- Edge (Proprietary)
|
||||||
|
- Chrome
|
||||||
|
- Safari
|
||||||
|
- Vivaldi
|
||||||
|
- Brave
|
||||||
|
- Samsung Internet
|
||||||
|
- Other (describe in "additional information")
|
||||||
|
default: 0
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -2,26 +2,16 @@
|
|||||||
# See here: https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/3.feature_request.yml
|
# See here: https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/3.feature_request.yml
|
||||||
|
|
||||||
name: 🛠 Feature Request
|
name: 🛠 Feature Request
|
||||||
description: Create a feature request for the core packages
|
description: Request a new feature that you would like to have implemented
|
||||||
title: "feat: "
|
title: "feat: "
|
||||||
labels: ["✨ enhancement"]
|
labels: ["needs triage"]
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
Thank you for taking the time to file a feature request. Please fill out this form as completely as possible.
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe the feature you'd like to request
|
label: Describe the feature you'd like to request
|
||||||
description: Please describe the feature as clear and concise as possible. Remember to add context as to why you believe this feature is needed.
|
description: Please describe the feature as clear and concise as possible. Remember to add context as to why you believe this feature is needed.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Describe the solution you'd like to see
|
|
||||||
description: Please describe the solution you would like to see. Adding example usage is a good way to provide context.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional information
|
label: Additional information
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
name: 🛠 Integration request
|
||||||
|
description: Request support for a new integration (eg. Sonarr, Radarr)
|
||||||
|
title: "feat: "
|
||||||
|
labels: ["needs triage"]
|
||||||
|
body:
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Project Website
|
||||||
|
description: Post the link to the website of the application. Paste the official link.
|
||||||
|
placeholder: ex. https://sonarr.tv/
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Describe what data should be consumed by Homarr
|
||||||
|
description: Please describe what data Homarr should fetch from the integration. Specify in what interval data should be fetched and whether the user can also perform write operations (eg. deleting a movie or adding a user).
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional information
|
||||||
|
description: Add any other information related to the integration.
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Public API available?
|
||||||
|
description: Is there a public API available, that we can consume in Homarr?
|
||||||
|
options:
|
||||||
|
- Yes, available on a website
|
||||||
|
- Yes, available in the application itself
|
||||||
|
- No
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Are you willing to contribute this yourself?
|
||||||
|
options:
|
||||||
|
- Yes
|
||||||
|
- No
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: 🛠 Widget request
|
||||||
|
description: Request a new widget (eg. Clock, Calendar, ...)
|
||||||
|
title: "feat: "
|
||||||
|
labels: ["needs triage"]
|
||||||
|
body:
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: Compatible integrations
|
||||||
|
description: Post a list of the integrations that should be compatible with this widget. Divide using comma. Leave empty if no integration is needed.
|
||||||
|
placeholder: ex. Sonarr, Radarr, Lidarr, Readarr, Nextcloud
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Describe what data should be displayed
|
||||||
|
description: Please describe what data Homarr should display. Describe how elements should be intractable and what actions the user can perform.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional information
|
||||||
|
description: Add any other information related to the widget.
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Are you willing to contribute this yourself?
|
||||||
|
options:
|
||||||
|
- Yes
|
||||||
|
- No
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
@@ -13,11 +13,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
description: Send notifications
|
description: Send notifications
|
||||||
push-image:
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
description: Push Docker Image
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -112,7 +107,6 @@ jobs:
|
|||||||
NEXT_VERSION: ${{ needs.release.outputs.version }}
|
NEXT_VERSION: ${{ needs.release.outputs.version }}
|
||||||
DEPLOY_LATEST: ${{ github.ref_name == 'main' }}
|
DEPLOY_LATEST: ${{ github.ref_name == 'main' }}
|
||||||
DEPLOY_BETA: ${{ github.ref_name == 'beta' }}
|
DEPLOY_BETA: ${{ github.ref_name == 'beta' }}
|
||||||
PUSH_IMAGE: ${{ github.event_name != 'workflow_dispatch' || github.events.inputs.push-image == true }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -143,13 +137,13 @@ jobs:
|
|||||||
${{ env.DEPLOY_LATEST == 'true' && 'type=raw,value=latest' || null }}
|
${{ env.DEPLOY_LATEST == 'true' && 'type=raw,value=latest' || null }}
|
||||||
${{ env.DEPLOY_BETA == 'true' && 'type=raw,value=beta' || null }}
|
${{ env.DEPLOY_BETA == 'true' && 'type=raw,value=beta' || null }}
|
||||||
type=raw,value=${{ env.NEXT_VERSION }}
|
type=raw,value=${{ env.NEXT_VERSION }}
|
||||||
- name: Build and maybe push
|
- name: Build and push
|
||||||
id: buildPushAction
|
id: buildPushAction
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
context: .
|
context: .
|
||||||
push: ${{ env.PUSH_IMAGE}}
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
network: host
|
network: host
|
||||||
@@ -160,4 +154,4 @@ jobs:
|
|||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
uses: Ilshidur/action-discord@master
|
uses: Ilshidur/action-discord@master
|
||||||
with:
|
with:
|
||||||
args: "Deployment of image has completed for branch ${{ github.ref_name }}. Image ID is '${{ steps.buildPushAction.outputs.imageid }}'. ${{ env.PUSH_IMAGE == 'true' && '' || 'This was a dry run' }}"
|
args: "Deployment of image has completed for branch ${{ github.ref_name }}. Image ID is '${{ steps.buildPushAction.outputs.imageid }}'."
|
||||||
Vendored
+1
-1
@@ -39,5 +39,5 @@
|
|||||||
"i18n-ally.localesPaths": [
|
"i18n-ally.localesPaths": [
|
||||||
"packages/translation/src/lang",
|
"packages/translation/src/lang",
|
||||||
],
|
],
|
||||||
"i18n-ally.keystyle": "auto",
|
"i18n-ally.keystyle": "nested",
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,63 @@
|
|||||||
|
## [1.0.0-beta.10](https://github.com/homarr-labs/homarr/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2024-12-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add request media ([#1811](https://github.com/homarr-labs/homarr/issues/1811)) ([91e1cef](https://github.com/homarr-labs/homarr/commit/91e1cef611a47d57b42c91c0c6d49fcf2e6a10bb))
|
||||||
|
* **docker:** add support for pgid and puid env variables ([#1759](https://github.com/homarr-labs/homarr/issues/1759)) ([aeb681a](https://github.com/homarr-labs/homarr/commit/aeb681a85839e31284e8f1566adc4191a68ea385))
|
||||||
|
* **integration:** add search engine creation ([#1816](https://github.com/homarr-labs/homarr/issues/1816)) ([f507645](https://github.com/homarr-labs/homarr/commit/f5076454cd644a99439b697f24bb0b1f871b2205))
|
||||||
|
* **widget:** add minecraft server status widget ([#1801](https://github.com/homarr-labs/homarr/issues/1801)) ([0ebf4bc](https://github.com/homarr-labs/homarr/commit/0ebf4bc55e62caf5917340496abb350d564df255))
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **deps:** update dependency octokit to ^4.0.3 ([#1806](https://github.com/homarr-labs/homarr/issues/1806)) ([75aefcb](https://github.com/homarr-labs/homarr/commit/75aefcb0d5210a53e8a00b675dbbce847aa8add4))
|
||||||
|
* **deps:** update dependency trpc-to-openapi to ^2.1.1 ([#1788](https://github.com/homarr-labs/homarr/issues/1788)) ([4943e7b](https://github.com/homarr-labs/homarr/commit/4943e7b851cd29291b5e8f2f9d0e084b4deeffc0))
|
||||||
|
* **deps:** update dependency typescript-eslint to ^8.19.0 ([#1814](https://github.com/homarr-labs/homarr/issues/1814)) ([598f004](https://github.com/homarr-labs/homarr/commit/598f0047eb13d6d0d6b68c9032a7a6648f4b6aa3))
|
||||||
|
* **deps:** update tiptap monorepo to v2.11.0 ([#1813](https://github.com/homarr-labs/homarr/issues/1813)) ([eacda4c](https://github.com/homarr-labs/homarr/commit/eacda4c397cb384a35e9eec0305f9b26f2a22a4a))
|
||||||
|
* **docker:** replace anonymous docker volume with env variable for encrypting secrets ([#1809](https://github.com/homarr-labs/homarr/issues/1809)) ([56b57ad](https://github.com/homarr-labs/homarr/commit/56b57ad171da170c2d8edd6112092cef0b586852))
|
||||||
|
* **health-monitoring:** add months to uptime, fix status update ([#1792](https://github.com/homarr-labs/homarr/issues/1792)) ([c91aae5](https://github.com/homarr-labs/homarr/commit/c91aae53acf27eab96a9150281f98a2156e9e2af))
|
||||||
|
* **media-server:** redesign widget ([#1775](https://github.com/homarr-labs/homarr/issues/1775)) ([23c7d0b](https://github.com/homarr-labs/homarr/commit/23c7d0bbf01215b680f346e7eef8072d8b9db09e))
|
||||||
|
|
||||||
|
## [1.0.0-beta.9](https://github.com/homarr-labs/homarr/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2024-12-27)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **deps:** update nextjs monorepo to ^14.2.22 ([#1787](https://github.com/homarr-labs/homarr/issues/1787)) ([3d66ff9](https://github.com/homarr-labs/homarr/commit/3d66ff914883a665c0329c8fc4fd087f4d220692))
|
||||||
|
* **deps:** update tanstack-query monorepo to ^5.62.11 ([#1791](https://github.com/homarr-labs/homarr/issues/1791)) ([e9870e7](https://github.com/homarr-labs/homarr/commit/e9870e7ee78227d3be773d9d93aa732760cc8e21))
|
||||||
|
|
||||||
|
## [1.0.0-beta.8](https://github.com/homarr-labs/homarr/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2024-12-25)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **deps:** update dependency @ctrl/deluge to ^7.1.0 ([#1776](https://github.com/homarr-labs/homarr/issues/1776)) ([ecae80d](https://github.com/homarr-labs/homarr/commit/ecae80d741213f12ff08f87992cc4d906cbe0085))
|
||||||
|
* **deps:** update dependency @ctrl/transmission to ^7.2.0 ([#1777](https://github.com/homarr-labs/homarr/issues/1777)) ([3e2ffbd](https://github.com/homarr-labs/homarr/commit/3e2ffbd7bf2793ff58136ed75b38e0d96b4a5ca8))
|
||||||
|
* **deps:** update dependency drizzle-orm to ^0.38.3 ([#1783](https://github.com/homarr-labs/homarr/issues/1783)) ([82c6ce7](https://github.com/homarr-labs/homarr/commit/82c6ce7b77023881bd4c74fb43437e777f9b219e))
|
||||||
|
* **deps:** update dependency drizzle-zod to ^0.6.1 ([#1782](https://github.com/homarr-labs/homarr/issues/1782)) ([555212e](https://github.com/homarr-labs/homarr/commit/555212e2dc82c4b71b8c25a5f20964b3441b5ab9))
|
||||||
|
* oldmarr import user casing wrong ([#1784](https://github.com/homarr-labs/homarr/issues/1784)) ([e37279f](https://github.com/homarr-labs/homarr/commit/e37279fe8071773f1a9773e3233bc81cbb336798))
|
||||||
|
|
||||||
|
## [1.0.0-beta.7](https://github.com/homarr-labs/homarr/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2024-12-24)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **apps:** remove url variables ([#1771](https://github.com/homarr-labs/homarr/issues/1771)) ([8df398c](https://github.com/homarr-labs/homarr/commit/8df398c3c706369f6990719603a357c161606f81))
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **auth:** oidc redirect does not respect https protocol ([#1763](https://github.com/homarr-labs/homarr/issues/1763)) ([0336803](https://github.com/homarr-labs/homarr/commit/033680355044b1ebfa5d8fe07b59929bbcfcb3a0))
|
||||||
|
* **board:** item background and border overridden by mantine card styles ([#1769](https://github.com/homarr-labs/homarr/issues/1769)) ([425359b](https://github.com/homarr-labs/homarr/commit/425359be02f66242f7db0dc77bed0355495e21d5))
|
||||||
|
* **board:** tiles order not respected on firefox ([#1770](https://github.com/homarr-labs/homarr/issues/1770)) ([8893b72](https://github.com/homarr-labs/homarr/commit/8893b72fe363691b91b6aca75d4ad37f4b8e9f6a))
|
||||||
|
* copy media link ([#1750](https://github.com/homarr-labs/homarr/issues/1750)) ([d78c6ed](https://github.com/homarr-labs/homarr/commit/d78c6ed5299e1f975c2e85ec3ecad38e00457677))
|
||||||
|
* **deps:** update dependency @ctrl/qbittorrent to ^9.2.0 ([#1768](https://github.com/homarr-labs/homarr/issues/1768)) ([8b416a6](https://github.com/homarr-labs/homarr/commit/8b416a6dd354b22a3e4f527b793dde2c538b1e6a))
|
||||||
|
* **deps:** update dependency eslint-plugin-react to ^7.37.3 ([#1767](https://github.com/homarr-labs/homarr/issues/1767)) ([fe95334](https://github.com/homarr-labs/homarr/commit/fe95334aa70c95faefcf904591fa9d33159b0905))
|
||||||
|
* **deps:** update dependency jotai to ^2.11.0 ([#1756](https://github.com/homarr-labs/homarr/issues/1756)) ([4e85bbb](https://github.com/homarr-labs/homarr/commit/4e85bbbad034f08ab84e331d376b7a9c6f54e507))
|
||||||
|
* **deps:** update dependency mysql2 to v3.12.0 ([#1758](https://github.com/homarr-labs/homarr/issues/1758)) ([d02ded5](https://github.com/homarr-labs/homarr/commit/d02ded5511aa2d54307db0ac7f4e0a5dee5a707d))
|
||||||
|
* **deps:** update dependency react-error-boundary to v5 ([#1748](https://github.com/homarr-labs/homarr/issues/1748)) ([01db27c](https://github.com/homarr-labs/homarr/commit/01db27c34f3daf6e67e35bbd357df31dcb154b41))
|
||||||
|
* **deps:** update dependency typescript-eslint to ^8.18.2 ([#1762](https://github.com/homarr-labs/homarr/issues/1762)) ([9223dd0](https://github.com/homarr-labs/homarr/commit/9223dd06ee0c2b51e036f607d7b3252c61ab77ea))
|
||||||
|
* **deps:** update mantine monorepo to ^7.15.2 ([#1757](https://github.com/homarr-labs/homarr/issues/1757)) ([dfacb08](https://github.com/homarr-labs/homarr/commit/dfacb08dbddb6864646ece2fca6978207f0c58ac))
|
||||||
|
* **deps:** update tanstack-query monorepo to ^5.62.10 ([#1772](https://github.com/homarr-labs/homarr/issues/1772)) ([c410b06](https://github.com/homarr-labs/homarr/commit/c410b06a15ed5426931ad764cc861f66f11a40da))
|
||||||
|
* **deps:** update tanstack-query monorepo to ^5.62.9 ([#1761](https://github.com/homarr-labs/homarr/issues/1761)) ([42da2b9](https://github.com/homarr-labs/homarr/commit/42da2b9b062bd8a08c37e45ab129953e8b0e3624))
|
||||||
|
* **icons:** local icon repository does not work with medias ([#1765](https://github.com/homarr-labs/homarr/issues/1765)) ([e220087](https://github.com/homarr-labs/homarr/commit/e220087e96c7096303b1d245ccf3941118e692f3))
|
||||||
|
* **onboard:** missing admin permission assignment for external group ([#1764](https://github.com/homarr-labs/homarr/issues/1764)) ([b948337](https://github.com/homarr-labs/homarr/commit/b9483379dd56a8dab2b9b636b66b970da4cf9d83))
|
||||||
|
|
||||||
## [1.0.0-beta.6](https://github.com/homarr-labs/homarr/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2024-12-20)
|
## [1.0.0-beta.6](https://github.com/homarr-labs/homarr/compare/v1.0.0-beta.5...v1.0.0-beta.6) (2024-12-20)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
+19
-29
@@ -25,51 +25,41 @@ RUN corepack enable pnpm && pnpm build
|
|||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# gettext is required for envsubst
|
# gettext is required for envsubst, openssl for generating AUTH_SECRET, su-exec for running application as non-root
|
||||||
RUN apk add --no-cache redis nginx bash gettext su-exec
|
RUN apk add --no-cache redis nginx bash gettext su-exec openssl
|
||||||
RUN mkdir /appdata
|
RUN mkdir /appdata
|
||||||
VOLUME /appdata
|
VOLUME /appdata
|
||||||
RUN mkdir /secrets
|
|
||||||
VOLUME /secrets
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
|
||||||
RUN adduser --system --uid 1001 nextjs
|
|
||||||
|
|
||||||
# Enable homarr cli
|
# Enable homarr cli
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/packages/cli/cli.cjs /app/apps/cli/cli.cjs
|
COPY --from=builder /app/packages/cli/cli.cjs /app/apps/cli/cli.cjs
|
||||||
RUN echo $'#!/bin/bash\ncd /app/apps/cli && node ./cli.cjs "$@"' > /usr/bin/homarr
|
RUN echo $'#!/bin/bash\ncd /app/apps/cli && node ./cli.cjs "$@"' > /usr/bin/homarr
|
||||||
RUN chmod +x /usr/bin/homarr
|
RUN chmod +x /usr/bin/homarr
|
||||||
|
|
||||||
# Don't run production as root
|
# Don't run production as root
|
||||||
RUN chown -R nextjs:nodejs /secrets
|
RUN mkdir -p /var/cache/nginx && \
|
||||||
RUN mkdir -p /var/cache/nginx && chown -R nextjs:nodejs /var/cache/nginx && \
|
mkdir -p /var/log/nginx && \
|
||||||
mkdir -p /var/log/nginx && chown -R nextjs:nodejs /var/log/nginx && \
|
mkdir -p /var/lib/nginx && \
|
||||||
mkdir -p /var/lib/nginx && chown -R nextjs:nodejs /var/lib/nginx && \
|
touch /run/nginx/nginx.pid && \
|
||||||
touch /run/nginx/nginx.pid && chown -R nextjs:nodejs /run/nginx/nginx.pid && \
|
mkdir -p /etc/nginx/templates /etc/nginx/ssl/certs
|
||||||
mkdir -p /etc/nginx/templates /etc/nginx/ssl/certs && chown -R nextjs:nodejs /etc/nginx
|
|
||||||
|
|
||||||
COPY --from=builder /app/apps/nextjs/next.config.mjs .
|
COPY --from=builder /app/apps/nextjs/next.config.mjs .
|
||||||
COPY --from=builder /app/apps/nextjs/package.json .
|
COPY --from=builder /app/apps/nextjs/package.json .
|
||||||
|
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/tasks/tasks.cjs ./apps/tasks/tasks.cjs
|
COPY --from=builder /app/apps/tasks/tasks.cjs ./apps/tasks/tasks.cjs
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/websocket/wssServer.cjs ./apps/websocket/wssServer.cjs
|
COPY --from=builder /app/apps/websocket/wssServer.cjs ./apps/websocket/wssServer.cjs
|
||||||
COPY --from=builder --chown=nextjs:nodejs /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 --chown=nextjs:nodejs /app/packages/db/migrations ./db/migrations
|
COPY --from=builder /app/packages/db/migrations ./db/migrations
|
||||||
|
|
||||||
# Automatically leverage output traces to reduce image size
|
# Automatically leverage output traces to reduce image size
|
||||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/nextjs/.next/standalone ./
|
COPY --from=builder /app/apps/nextjs/.next/standalone ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/nextjs/.next/static ./apps/nextjs/.next/static
|
COPY --from=builder /app/apps/nextjs/.next/static ./apps/nextjs/.next/static
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/nextjs/public ./apps/nextjs/public
|
COPY --from=builder /app/apps/nextjs/public ./apps/nextjs/public
|
||||||
COPY --chown=nextjs:nodejs scripts/run.sh ./run.sh
|
COPY scripts/run.sh ./run.sh
|
||||||
COPY scripts/entrypoint.sh ./entrypoint.sh
|
COPY --chmod=777 scripts/entrypoint.sh ./entrypoint.sh
|
||||||
RUN chmod +x ./entrypoint.sh
|
COPY packages/redis/redis.conf /app/redis.conf
|
||||||
COPY --chown=nextjs:nodejs scripts/generateRandomSecureKey.js ./generateRandomSecureKey.js
|
COPY nginx.conf /etc/nginx/templates/nginx.conf
|
||||||
COPY --chown=nextjs:nodejs packages/redis/redis.conf /app/redis.conf
|
|
||||||
COPY --chown=nextjs:nodejs nginx.conf /etc/nginx/templates/nginx.conf
|
|
||||||
|
|
||||||
|
|
||||||
ENV DB_URL='/appdata/db/db.sqlite'
|
ENV DB_URL='/appdata/db/db.sqlite'
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Importing env files here to validate on build
|
// Importing env files here to validate on build
|
||||||
import "@homarr/auth/env.mjs";
|
import "@homarr/auth/env.mjs";
|
||||||
import "@homarr/db/env.mjs";
|
import "@homarr/db/env.mjs";
|
||||||
|
import "@homarr/common/env.mjs";
|
||||||
|
|
||||||
import MillionLint from "@million/lint";
|
import MillionLint from "@million/lint";
|
||||||
import createNextIntlPlugin from "next-intl/plugin";
|
import createNextIntlPlugin from "next-intl/plugin";
|
||||||
|
|||||||
+13
-13
@@ -38,18 +38,18 @@
|
|||||||
"@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/widgets": "workspace:^0.1.0",
|
"@homarr/widgets": "workspace:^0.1.0",
|
||||||
"@mantine/colors-generator": "^7.15.1",
|
"@mantine/colors-generator": "^7.15.2",
|
||||||
"@mantine/core": "^7.15.1",
|
"@mantine/core": "^7.15.2",
|
||||||
"@mantine/dropzone": "^7.15.1",
|
"@mantine/dropzone": "^7.15.2",
|
||||||
"@mantine/hooks": "^7.15.1",
|
"@mantine/hooks": "^7.15.2",
|
||||||
"@mantine/modals": "^7.15.1",
|
"@mantine/modals": "^7.15.2",
|
||||||
"@mantine/tiptap": "^7.15.1",
|
"@mantine/tiptap": "^7.15.2",
|
||||||
"@million/lint": "1.0.14",
|
"@million/lint": "1.0.14",
|
||||||
"@t3-oss/env-nextjs": "^0.11.1",
|
"@t3-oss/env-nextjs": "^0.11.1",
|
||||||
"@tabler/icons-react": "^3.26.0",
|
"@tabler/icons-react": "^3.26.0",
|
||||||
"@tanstack/react-query": "^5.62.8",
|
"@tanstack/react-query": "^5.62.11",
|
||||||
"@tanstack/react-query-devtools": "^5.62.8",
|
"@tanstack/react-query-devtools": "^5.62.11",
|
||||||
"@tanstack/react-query-next-experimental": "5.62.8",
|
"@tanstack/react-query-next-experimental": "5.62.11",
|
||||||
"@trpc/client": "next",
|
"@trpc/client": "next",
|
||||||
"@trpc/next": "next",
|
"@trpc/next": "next",
|
||||||
"@trpc/react-query": "next",
|
"@trpc/react-query": "next",
|
||||||
@@ -63,14 +63,14 @@
|
|||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"flag-icons": "^7.2.3",
|
"flag-icons": "^7.2.3",
|
||||||
"glob": "^11.0.0",
|
"glob": "^11.0.0",
|
||||||
"jotai": "^2.10.4",
|
"jotai": "^2.11.0",
|
||||||
"mantine-react-table": "2.0.0-beta.7",
|
"mantine-react-table": "2.0.0-beta.7",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"postcss-preset-mantine": "^1.17.0",
|
"postcss-preset-mantine": "^1.17.0",
|
||||||
"prismjs": "^1.29.0",
|
"prismjs": "^1.29.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"react-error-boundary": "^4.1.2",
|
"react-error-boundary": "^5.0.0",
|
||||||
"react-simple-code-editor": "^0.14.1",
|
"react-simple-code-editor": "^0.14.1",
|
||||||
"sass": "^1.83.0",
|
"sass": "^1.83.0",
|
||||||
"superjson": "2.2.2",
|
"superjson": "2.2.2",
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
"@types/react": "^19.0.2",
|
"@types/react": "^19.0.2",
|
||||||
"@types/react-dom": "^19.0.2",
|
"@types/react-dom": "^19.0.2",
|
||||||
"@types/swagger-ui-react": "^4.18.3",
|
"@types/swagger-ui-react": "^4.18.3",
|
||||||
"concurrently": "^9.1.0",
|
"concurrently": "^9.1.2",
|
||||||
"eslint": "^9.17.0",
|
"eslint": "^9.17.0",
|
||||||
"node-loader": "^2.1.0",
|
"node-loader": "^2.1.0",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { IconBox, IconPencil } from "@tabler/icons-react";
|
|||||||
import type { RouterOutputs } from "@homarr/api";
|
import type { RouterOutputs } from "@homarr/api";
|
||||||
import { api } from "@homarr/api/server";
|
import { api } from "@homarr/api/server";
|
||||||
import { auth } from "@homarr/auth/next";
|
import { auth } from "@homarr/auth/next";
|
||||||
import { parseAppHrefWithVariablesServer } from "@homarr/common/server";
|
|
||||||
import { getI18n, getScopedI18n } from "@homarr/translation/server";
|
import { getI18n, getScopedI18n } from "@homarr/translation/server";
|
||||||
|
|
||||||
import { ManageContainer } from "~/components/manage/manage-container";
|
import { ManageContainer } from "~/components/manage/manage-container";
|
||||||
@@ -82,8 +81,8 @@ const AppCard = async ({ app }: AppCardProps) => {
|
|||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
{app.href && (
|
{app.href && (
|
||||||
<Anchor href={parseAppHrefWithVariablesServer(app.href)} lineClamp={1} size="sm" w="min-content">
|
<Anchor href={app.href} lineClamp={1} size="sm" w="min-content">
|
||||||
{parseAppHrefWithVariablesServer(app.href)}
|
{app.href}
|
||||||
</Anchor>
|
</Anchor>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Alert, Button, Fieldset, Group, SegmentedControl, Stack, Text, TextInput } from "@mantine/core";
|
import { Alert, Button, Checkbox, Fieldset, Group, SegmentedControl, Stack, Text, TextInput } from "@mantine/core";
|
||||||
import { IconInfoCircle } from "@tabler/icons-react";
|
import { IconInfoCircle } from "@tabler/icons-react";
|
||||||
|
|
||||||
import { clientApi } from "@homarr/api/client";
|
import { clientApi } from "@homarr/api/client";
|
||||||
import { revalidatePathActionAsync } from "@homarr/common/client";
|
import { revalidatePathActionAsync } from "@homarr/common/client";
|
||||||
import type { IntegrationKind, IntegrationSecretKind } from "@homarr/definitions";
|
import type { IntegrationKind, IntegrationSecretKind } from "@homarr/definitions";
|
||||||
import { getAllSecretKindOptions, getIntegrationName } from "@homarr/definitions";
|
import { getAllSecretKindOptions, getIntegrationName, integrationDefs } from "@homarr/definitions";
|
||||||
import type { UseFormReturnType } from "@homarr/form";
|
import type { UseFormReturnType } from "@homarr/form";
|
||||||
import { useZodForm } from "@homarr/form";
|
import { useZodForm } from "@homarr/form";
|
||||||
import { convertIntegrationTestConnectionError } from "@homarr/integrations/client";
|
import { convertIntegrationTestConnectionError } from "@homarr/integrations/client";
|
||||||
@@ -38,6 +38,7 @@ export const NewIntegrationForm = ({ searchParams }: NewIntegrationFormProps) =>
|
|||||||
kind,
|
kind,
|
||||||
value: "",
|
value: "",
|
||||||
})),
|
})),
|
||||||
|
attemptSearchEngineCreation: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { mutateAsync, isPending } = clientApi.integration.create.useMutation();
|
const { mutateAsync, isPending } = clientApi.integration.create.useMutation();
|
||||||
@@ -78,6 +79,8 @@ export const NewIntegrationForm = ({ searchParams }: NewIntegrationFormProps) =>
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const supportsSearchEngine = integrationDefs[searchParams.kind].category.flat().includes("search");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form onSubmit={form.onSubmit((value) => void handleSubmitAsync(value))}>
|
<form onSubmit={form.onSubmit((value) => void handleSubmitAsync(value))}>
|
||||||
<Stack>
|
<Stack>
|
||||||
@@ -104,6 +107,16 @@ export const NewIntegrationForm = ({ searchParams }: NewIntegrationFormProps) =>
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
|
|
||||||
|
{supportsSearchEngine && (
|
||||||
|
<Checkbox
|
||||||
|
label={t("integration.field.attemptSearchEngineCreation.label")}
|
||||||
|
description={t("integration.field.attemptSearchEngineCreation.description", {
|
||||||
|
kind: getIntegrationName(searchParams.kind),
|
||||||
|
})}
|
||||||
|
{...form.getInputProps("attemptSearchEngineCreation", { type: "checkbox" })}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<Group justify="end" align="center">
|
<Group justify="end" align="center">
|
||||||
<Button variant="default" component={Link} href="/manage/integrations">
|
<Button variant="default" component={Link} href="/manage/integrations">
|
||||||
{t("common.action.backToOverview")}
|
{t("common.action.backToOverview")}
|
||||||
|
|||||||
@@ -13,10 +13,7 @@ interface CopyMediaProps {
|
|||||||
export const CopyMedia = ({ media }: CopyMediaProps) => {
|
export const CopyMedia = ({ media }: CopyMediaProps) => {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
|
|
||||||
const url =
|
const url = typeof window !== "undefined" ? `${window.location.origin}/api/user-medias/${media.id}` : "";
|
||||||
typeof window !== "undefined"
|
|
||||||
? `${window.location.protocol}://${window.location.hostname}:${window.location.port}/api/user-medias/${media.id}`
|
|
||||||
: "";
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CopyButton value={url}>
|
<CopyButton value={url}>
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ import { useSectionContext } from "./section-context";
|
|||||||
export const SectionContent = () => {
|
export const SectionContent = () => {
|
||||||
const { section, innerSections, refs } = useSectionContext();
|
const { section, innerSections, refs } = useSectionContext();
|
||||||
const board = useRequiredBoard();
|
const board = useRequiredBoard();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IMPORTANT: THE ORDER OF THE BELOW ITEMS HAS TO MATCH THE ORDER OF
|
||||||
|
* THE ITEMS RENDERED WITH GRIDSTACK, OTHERWISE THE ITEMS WILL BE MIXED UP
|
||||||
|
* @see https://github.com/homarr-labs/homarr/pull/1770
|
||||||
|
*/
|
||||||
const sortedItems = useMemo(() => {
|
const sortedItems = useMemo(() => {
|
||||||
return [
|
return [
|
||||||
...section.items.map((item) => ({ ...item, type: "item" as const })),
|
...section.items.map((item) => ({ ...item, type: "item" as const })),
|
||||||
@@ -19,7 +25,7 @@ export const SectionContent = () => {
|
|||||||
return itemA.xOffset - itemB.xOffset;
|
return itemA.xOffset - itemB.xOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemA.yOffset - itemB.xOffset;
|
return itemA.yOffset - itemB.yOffset;
|
||||||
});
|
});
|
||||||
}, [section.items, innerSections]);
|
}, [section.items, innerSections]);
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
--background-color: rgb(from var(--mantine-color-white) r g b / var(--opacity));
|
--background-color: rgb(from var(--mantine-color-white) r g b / var(--opacity));
|
||||||
--border-color: rgb(from var(--mantine-color-gray-3) r g b / var(--opacity));
|
--border-color: rgb(from var(--mantine-color-gray-3) r g b / var(--opacity));
|
||||||
}
|
}
|
||||||
background-color: var(--background-color);
|
background-color: var(--background-color) !important;
|
||||||
border-color: var(--border-color);
|
border-color: var(--border-color) !important;
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,6 @@ import { z } from "zod";
|
|||||||
|
|
||||||
export const env = createEnv({
|
export const env = createEnv({
|
||||||
shared: {
|
shared: {
|
||||||
VERCEL_URL: z
|
|
||||||
.string()
|
|
||||||
.optional()
|
|
||||||
.transform((url) => (url ? `https://${url}` : undefined)),
|
|
||||||
PORT: z.coerce.number().default(3000),
|
PORT: z.coerce.number().default(3000),
|
||||||
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
|
NODE_ENV: z.enum(["development", "production", "test"]).default("development"),
|
||||||
},
|
},
|
||||||
@@ -30,7 +26,6 @@ export const env = createEnv({
|
|||||||
* Destructure all variables from `process.env` to make sure they aren't tree-shaken away.
|
* Destructure all variables from `process.env` to make sure they aren't tree-shaken away.
|
||||||
*/
|
*/
|
||||||
runtimeEnv: {
|
runtimeEnv: {
|
||||||
VERCEL_URL: process.env.VERCEL_URL,
|
|
||||||
PORT: process.env.PORT,
|
PORT: process.env.PORT,
|
||||||
NODE_ENV: process.env.NODE_ENV,
|
NODE_ENV: process.env.NODE_ENV,
|
||||||
DOCKER_HOSTNAMES: process.env.DOCKER_HOSTNAMES,
|
DOCKER_HOSTNAMES: process.env.DOCKER_HOSTNAMES,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||||
"@homarr/tsconfig": "workspace:^0.1.0",
|
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||||
"@types/node": "^22.10.2",
|
"@types/node": "^22.10.2",
|
||||||
"dotenv-cli": "^7.4.4",
|
"dotenv-cli": "^8.0.0",
|
||||||
"eslint": "^9.17.0",
|
"eslint": "^9.17.0",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"tsx": "4.19.2",
|
"tsx": "4.19.2",
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@
|
|||||||
<a href="https://github.com/homarr-labs/homarr/actions/workflows/deployment-docker-image.yml">
|
<a href="https://github.com/homarr-labs/homarr/actions/workflows/deployment-docker-image.yml">
|
||||||
<img title="Docker CI Status" src="https://github.com/homarr-labs/homarr/actions/workflows/deployment-docker-image.yml/badge.svg" alt="CI Status">
|
<img title="Docker CI Status" src="https://github.com/homarr-labs/homarr/actions/workflows/deployment-docker-image.yml/badge.svg" alt="CI Status">
|
||||||
</a>
|
</a>
|
||||||
<a href=https://translate.homarr.dev/>
|
<a href="https://crowdin.com/project/homarr_labs">
|
||||||
<img title="Translations" src="https://badges.crowdin.net/homarr/localized.svg" />
|
<img title="Translations" src="https://badges.crowdin.net/homarr_labs/localized.svg" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://discord.gg/aCsmEV5RgA">
|
<a href="https://discord.gg/aCsmEV5RgA">
|
||||||
<img title="Discord" src="https://discordapp.com/api/guilds/972958686051962910/widget.png?style=shield">
|
<img title="Discord" src="https://discordapp.com/api/guilds/972958686051962910/widget.png?style=shield">
|
||||||
|
|||||||
@@ -5,7 +5,22 @@ export const createHomarrContainer = () => {
|
|||||||
throw new Error("This test should only be run in CI or with a homarr image named 'homarr-e2e'");
|
throw new Error("This test should only be run in CI or with a homarr image named 'homarr-e2e'");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new GenericContainer("homarr-e2e")
|
return withLogs(
|
||||||
.withExposedPorts(7575)
|
new GenericContainer("homarr-e2e")
|
||||||
.withWaitStrategy(Wait.forHttp("/api/health/ready", 7575));
|
.withExposedPorts(7575)
|
||||||
|
.withEnvironment({
|
||||||
|
SECRET_ENCRYPTION_KEY: "0".repeat(64),
|
||||||
|
})
|
||||||
|
.withWaitStrategy(Wait.forHttp("/api/health/ready", 7575)),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const withLogs = (container: GenericContainer) => {
|
||||||
|
container.withLogConsumer((stream) =>
|
||||||
|
stream
|
||||||
|
.on("data", (line) => console.log(line))
|
||||||
|
.on("err", (line) => console.error(line))
|
||||||
|
.on("end", () => console.log("Stream closed")),
|
||||||
|
);
|
||||||
|
return container;
|
||||||
};
|
};
|
||||||
+1
-1
@@ -21,7 +21,7 @@ http {
|
|||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homarr",
|
"name": "homarr",
|
||||||
"version": "1.0.0-beta.6",
|
"version": "1.0.0-beta.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "cross-env CI=true turbo build",
|
"build": "cross-env CI=true turbo build",
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"vite-tsconfig-paths": "^5.1.4",
|
"vite-tsconfig-paths": "^5.1.4",
|
||||||
"vitest": "^2.1.8"
|
"vitest": "^2.1.8"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.15.1",
|
"packageManager": "pnpm@9.15.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
"@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",
|
||||||
"@homarr/definitions": "workspace:^0.1.0",
|
"@homarr/definitions": "workspace:^0.1.0",
|
||||||
|
"@homarr/icons": "workspace:^0.1.0",
|
||||||
"@homarr/integrations": "workspace:^0.1.0",
|
"@homarr/integrations": "workspace:^0.1.0",
|
||||||
"@homarr/log": "workspace:^",
|
"@homarr/log": "workspace:^",
|
||||||
"@homarr/old-import": "workspace:^0.1.0",
|
"@homarr/old-import": "workspace:^0.1.0",
|
||||||
@@ -40,10 +41,11 @@
|
|||||||
"@trpc/react-query": "next",
|
"@trpc/react-query": "next",
|
||||||
"@trpc/server": "next",
|
"@trpc/server": "next",
|
||||||
"dockerode": "^4.0.2",
|
"dockerode": "^4.0.2",
|
||||||
"next": "^14.2.21",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"next": "^14.2.22",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"superjson": "2.2.2",
|
"superjson": "2.2.2",
|
||||||
"trpc-to-openapi": "^2.1.0"
|
"trpc-to-openapi": "^2.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export const fetchApi = createTRPCClient<AppRouter>({
|
|||||||
|
|
||||||
function getBaseUrl() {
|
function getBaseUrl() {
|
||||||
if (typeof window !== "undefined") return window.location.origin;
|
if (typeof window !== "undefined") return window.location.origin;
|
||||||
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
|
|
||||||
return `http://localhost:${process.env.PORT ?? 3000}`;
|
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,11 +152,17 @@ export const groupRouter = createTRPCRouter({
|
|||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input, ctx }) => {
|
||||||
await checkSimilarNameAndThrowAsync(ctx.db, input.name);
|
await checkSimilarNameAndThrowAsync(ctx.db, input.name);
|
||||||
|
|
||||||
|
const groupId = createId();
|
||||||
await ctx.db.insert(groups).values({
|
await ctx.db.insert(groups).values({
|
||||||
id: createId(),
|
id: groupId,
|
||||||
name: input.name,
|
name: input.name,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await ctx.db.insert(groupPermissions).values({
|
||||||
|
groupId,
|
||||||
|
permission: "admin",
|
||||||
|
});
|
||||||
|
|
||||||
await nextOnboardingStepAsync(ctx.db, undefined);
|
await nextOnboardingStepAsync(ctx.db, undefined);
|
||||||
}),
|
}),
|
||||||
createGroup: permissionRequiredProcedure
|
createGroup: permissionRequiredProcedure
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ import {
|
|||||||
integrations,
|
integrations,
|
||||||
integrationSecrets,
|
integrationSecrets,
|
||||||
integrationUserPermissions,
|
integrationUserPermissions,
|
||||||
|
searchEngines,
|
||||||
} from "@homarr/db/schema";
|
} from "@homarr/db/schema";
|
||||||
import type { IntegrationSecretKind } from "@homarr/definitions";
|
import type { IntegrationSecretKind } from "@homarr/definitions";
|
||||||
import {
|
import {
|
||||||
|
getIconUrl,
|
||||||
getIntegrationKindsByCategory,
|
getIntegrationKindsByCategory,
|
||||||
getPermissionsWithParents,
|
getPermissionsWithParents,
|
||||||
integrationDefs,
|
integrationDefs,
|
||||||
@@ -192,6 +194,18 @@ export const integrationRouter = createTRPCRouter({
|
|||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (input.attemptSearchEngineCreation) {
|
||||||
|
const icon = getIconUrl(input.kind);
|
||||||
|
await ctx.db.insert(searchEngines).values({
|
||||||
|
id: createId(),
|
||||||
|
name: input.name,
|
||||||
|
integrationId,
|
||||||
|
type: "fromIntegration",
|
||||||
|
iconUrl: icon,
|
||||||
|
short: await getNextValidShortNameForSearchEngineAsync(ctx.db, input.name),
|
||||||
|
});
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
update: protectedProcedure.input(validation.integration.update).mutation(async ({ ctx, input }) => {
|
update: protectedProcedure.input(validation.integration.update).mutation(async ({ ctx, input }) => {
|
||||||
await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.id), "full");
|
await throwIfActionForbiddenAsync(ctx, eq(integrations.id, input.id), "full");
|
||||||
@@ -411,6 +425,36 @@ interface AddSecretInput {
|
|||||||
value: string;
|
value: string;
|
||||||
kind: IntegrationSecretKind;
|
kind: IntegrationSecretKind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getNextValidShortNameForSearchEngineAsync = async (db: Database, integrationName: string) => {
|
||||||
|
const searchEngines = await db.query.searchEngines.findMany({
|
||||||
|
columns: {
|
||||||
|
short: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const usedShortNames = searchEngines.flatMap((searchEngine) => searchEngine.short.toLowerCase());
|
||||||
|
const nameByIntegrationName = integrationName.slice(0, 1).toLowerCase();
|
||||||
|
|
||||||
|
if (!usedShortNames.includes(nameByIntegrationName)) {
|
||||||
|
return nameByIntegrationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 8 is max length constraint
|
||||||
|
for (let i = 2; i < 9999999; i++) {
|
||||||
|
const generatedName = `${nameByIntegrationName}${i}`;
|
||||||
|
if (usedShortNames.includes(generatedName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return generatedName;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(
|
||||||
|
"Unable to automatically generate a short name. All possible variations were exhausted. Please disable the automatic creation and choose one later yourself.",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const addSecretAsync = async (db: Database, input: AddSecretInput) => {
|
const addSecretAsync = async (db: Database, input: AddSecretInput) => {
|
||||||
await db.insert(integrationSecrets).values({
|
await db.insert(integrationSecrets).values({
|
||||||
kind: input.kind,
|
kind: input.kind,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { TRPCError } from "@trpc/server";
|
import { TRPCError } from "@trpc/server";
|
||||||
|
|
||||||
|
import type { InferInsertModel } from "@homarr/db";
|
||||||
import { and, createId, desc, eq, like } from "@homarr/db";
|
import { and, createId, desc, eq, like } from "@homarr/db";
|
||||||
import { medias } from "@homarr/db/schema";
|
import { iconRepositories, icons, medias } from "@homarr/db/schema";
|
||||||
|
import { createLocalImageUrl, LOCAL_ICON_REPOSITORY_SLUG, mapMediaToIcon } from "@homarr/icons/local";
|
||||||
import { validation, z } from "@homarr/validation";
|
import { validation, z } from "@homarr/validation";
|
||||||
|
|
||||||
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";
|
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";
|
||||||
@@ -52,13 +54,29 @@ export const mediaRouter = createTRPCRouter({
|
|||||||
.mutation(async ({ ctx, input }) => {
|
.mutation(async ({ ctx, input }) => {
|
||||||
const content = Buffer.from(await input.file.arrayBuffer());
|
const content = Buffer.from(await input.file.arrayBuffer());
|
||||||
const id = createId();
|
const id = createId();
|
||||||
await ctx.db.insert(medias).values({
|
const media = {
|
||||||
id,
|
id,
|
||||||
creatorId: ctx.session.user.id,
|
creatorId: ctx.session.user.id,
|
||||||
content,
|
content,
|
||||||
size: input.file.size,
|
size: input.file.size,
|
||||||
contentType: input.file.type,
|
contentType: input.file.type,
|
||||||
name: input.file.name,
|
name: input.file.name,
|
||||||
|
} satisfies InferInsertModel<typeof medias>;
|
||||||
|
await ctx.db.insert(medias).values(media);
|
||||||
|
|
||||||
|
const localIconRepository = await ctx.db.query.iconRepositories.findFirst({
|
||||||
|
where: eq(iconRepositories.slug, LOCAL_ICON_REPOSITORY_SLUG),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!localIconRepository) return id;
|
||||||
|
|
||||||
|
const icon = mapMediaToIcon(media);
|
||||||
|
await ctx.db.insert(icons).values({
|
||||||
|
id: createId(),
|
||||||
|
checksum: icon.checksum,
|
||||||
|
name: icon.fileNameWithExtension,
|
||||||
|
url: icon.imageUrl,
|
||||||
|
iconRepositoryId: localIconRepository.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
@@ -67,6 +85,7 @@ export const mediaRouter = createTRPCRouter({
|
|||||||
const dbMedia = await ctx.db.query.medias.findFirst({
|
const dbMedia = await ctx.db.query.medias.findFirst({
|
||||||
where: eq(medias.id, input.id),
|
where: eq(medias.id, input.id),
|
||||||
columns: {
|
columns: {
|
||||||
|
id: true,
|
||||||
creatorId: true,
|
creatorId: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -87,5 +106,6 @@ export const mediaRouter = createTRPCRouter({
|
|||||||
}
|
}
|
||||||
|
|
||||||
await ctx.db.delete(medias).where(eq(medias.id, input.id));
|
await ctx.db.delete(medias).where(eq(medias.id, input.id));
|
||||||
|
await ctx.db.delete(icons).where(eq(icons.url, createLocalImageUrl(input.id)));
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@@ -2,8 +2,10 @@ import { TRPCError } from "@trpc/server";
|
|||||||
|
|
||||||
import { createId, eq, like, sql } from "@homarr/db";
|
import { createId, eq, like, sql } from "@homarr/db";
|
||||||
import { searchEngines } from "@homarr/db/schema";
|
import { searchEngines } from "@homarr/db/schema";
|
||||||
|
import { integrationCreator } from "@homarr/integrations";
|
||||||
import { validation } from "@homarr/validation";
|
import { validation } from "@homarr/validation";
|
||||||
|
|
||||||
|
import { createOneIntegrationMiddleware } from "../../middlewares/integration";
|
||||||
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";
|
import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";
|
||||||
|
|
||||||
export const searchEngineRouter = createTRPCRouter({
|
export const searchEngineRouter = createTRPCRouter({
|
||||||
@@ -56,9 +58,32 @@ export const searchEngineRouter = createTRPCRouter({
|
|||||||
search: protectedProcedure.input(validation.common.search).query(async ({ ctx, input }) => {
|
search: protectedProcedure.input(validation.common.search).query(async ({ ctx, input }) => {
|
||||||
return await ctx.db.query.searchEngines.findMany({
|
return await ctx.db.query.searchEngines.findMany({
|
||||||
where: like(searchEngines.short, `${input.query.toLowerCase().trim()}%`),
|
where: like(searchEngines.short, `${input.query.toLowerCase().trim()}%`),
|
||||||
|
with: {
|
||||||
|
integration: {
|
||||||
|
columns: {
|
||||||
|
kind: true,
|
||||||
|
url: true,
|
||||||
|
id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
limit: input.limit,
|
limit: input.limit,
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
getMediaRequestOptions: protectedProcedure
|
||||||
|
.unstable_concat(createOneIntegrationMiddleware("query", "jellyseerr", "overseerr"))
|
||||||
|
.input(validation.common.mediaRequestOptions)
|
||||||
|
.query(async ({ ctx, input }) => {
|
||||||
|
const integration = integrationCreator(ctx.integration);
|
||||||
|
return await integration.getSeriesInformationAsync(input.mediaType, input.mediaId);
|
||||||
|
}),
|
||||||
|
requestMedia: protectedProcedure
|
||||||
|
.unstable_concat(createOneIntegrationMiddleware("interact", "jellyseerr", "overseerr"))
|
||||||
|
.input(validation.common.requestMedia)
|
||||||
|
.mutation(async ({ ctx, input }) => {
|
||||||
|
const integration = integrationCreator(ctx.integration);
|
||||||
|
return await integration.requestMediaAsync(input.mediaType, input.mediaId, input.seasons);
|
||||||
|
}),
|
||||||
create: permissionRequiredProcedure
|
create: permissionRequiredProcedure
|
||||||
.requiresPermission("search-engine-create")
|
.requiresPermission("search-engine-create")
|
||||||
.input(validation.searchEngine.manage)
|
.input(validation.searchEngine.manage)
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ describe("create should create a new integration", () => {
|
|||||||
kind: "jellyfin" as const,
|
kind: "jellyfin" as const,
|
||||||
url: "http://jellyfin.local",
|
url: "http://jellyfin.local",
|
||||||
secrets: [{ kind: "apiKey" as const, value: "1234567890" }],
|
secrets: [{ kind: "apiKey" as const, value: "1234567890" }],
|
||||||
|
attemptSearchEngineCreation: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const fakeNow = new Date("2023-07-01T00:00:00Z");
|
const fakeNow = new Date("2023-07-01T00:00:00Z");
|
||||||
@@ -201,6 +202,48 @@ describe("create should create a new integration", () => {
|
|||||||
expect(dbSecret!.updatedAt).toEqual(fakeNow);
|
expect(dbSecret!.updatedAt).toEqual(fakeNow);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("with create integration access should create a new integration when creating search engine", async () => {
|
||||||
|
const db = createDb();
|
||||||
|
const caller = integrationRouter.createCaller({
|
||||||
|
db,
|
||||||
|
session: defaultSessionWithPermissions(["integration-create"]),
|
||||||
|
});
|
||||||
|
const input = {
|
||||||
|
name: "Jellyseerr",
|
||||||
|
kind: "jellyseerr" as const,
|
||||||
|
url: "http://jellyseerr.local",
|
||||||
|
secrets: [{ kind: "apiKey" as const, value: "1234567890" }],
|
||||||
|
attemptSearchEngineCreation: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
const fakeNow = new Date("2023-07-01T00:00:00Z");
|
||||||
|
vi.useFakeTimers();
|
||||||
|
vi.setSystemTime(fakeNow);
|
||||||
|
await caller.create(input);
|
||||||
|
vi.useRealTimers();
|
||||||
|
|
||||||
|
const dbIntegration = await db.query.integrations.findFirst();
|
||||||
|
const dbSecret = await db.query.integrationSecrets.findFirst();
|
||||||
|
const dbSearchEngine = await db.query.searchEngines.findFirst();
|
||||||
|
expect(dbIntegration).toBeDefined();
|
||||||
|
expect(dbIntegration!.name).toBe(input.name);
|
||||||
|
expect(dbIntegration!.kind).toBe(input.kind);
|
||||||
|
expect(dbIntegration!.url).toBe(input.url);
|
||||||
|
|
||||||
|
expect(dbSecret!.integrationId).toBe(dbIntegration!.id);
|
||||||
|
expect(dbSecret).toBeDefined();
|
||||||
|
expect(dbSecret!.kind).toBe(input.secrets[0]!.kind);
|
||||||
|
expect(dbSecret!.value).toMatch(/^[a-f0-9]+.[a-f0-9]+$/);
|
||||||
|
expect(dbSecret!.updatedAt).toEqual(fakeNow);
|
||||||
|
|
||||||
|
expect(dbSearchEngine!.integrationId).toBe(dbIntegration!.id);
|
||||||
|
expect(dbSearchEngine!.short).toBe("j");
|
||||||
|
expect(dbSearchEngine!.name).toBe(input.name);
|
||||||
|
expect(dbSearchEngine!.iconUrl).toBe(
|
||||||
|
"https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/jellyseerr.png",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("without create integration access should throw permission error", async () => {
|
test("without create integration access should throw permission error", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const db = createDb();
|
const db = createDb();
|
||||||
@@ -213,6 +256,7 @@ describe("create should create a new integration", () => {
|
|||||||
kind: "jellyfin" as const,
|
kind: "jellyfin" as const,
|
||||||
url: "http://jellyfin.local",
|
url: "http://jellyfin.local",
|
||||||
secrets: [{ kind: "apiKey" as const, value: "1234567890" }],
|
secrets: [{ kind: "apiKey" as const, value: "1234567890" }],
|
||||||
|
attemptSearchEngineCreation: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { indexerManagerRouter } from "./indexer-manager";
|
|||||||
import { mediaRequestsRouter } from "./media-requests";
|
import { mediaRequestsRouter } from "./media-requests";
|
||||||
import { mediaServerRouter } from "./media-server";
|
import { mediaServerRouter } from "./media-server";
|
||||||
import { mediaTranscodingRouter } from "./media-transcoding";
|
import { mediaTranscodingRouter } from "./media-transcoding";
|
||||||
|
import { minecraftRouter } from "./minecraft";
|
||||||
import { notebookRouter } from "./notebook";
|
import { notebookRouter } from "./notebook";
|
||||||
import { rssFeedRouter } from "./rssFeed";
|
import { rssFeedRouter } from "./rssFeed";
|
||||||
import { smartHomeRouter } from "./smart-home";
|
import { smartHomeRouter } from "./smart-home";
|
||||||
@@ -27,4 +28,5 @@ export const widgetRouter = createTRPCRouter({
|
|||||||
indexerManager: indexerManagerRouter,
|
indexerManager: indexerManagerRouter,
|
||||||
healthMonitoring: healthMonitoringRouter,
|
healthMonitoring: healthMonitoringRouter,
|
||||||
mediaTranscoding: mediaTranscodingRouter,
|
mediaTranscoding: mediaTranscodingRouter,
|
||||||
|
minecraft: minecraftRouter,
|
||||||
});
|
});
|
||||||
@@ -21,6 +21,7 @@ export const mediaServerRouter = createTRPCRouter({
|
|||||||
const { data } = await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: false });
|
const { data } = await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: false });
|
||||||
return {
|
return {
|
||||||
integrationId: integration.id,
|
integrationId: integration.id,
|
||||||
|
integrationKind: integration.kind,
|
||||||
sessions: data,
|
sessions: data,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import { observable } from "@trpc/server/observable";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import type { MinecraftServerStatus } from "@homarr/request-handler/minecraft-server-status";
|
||||||
|
import { minecraftServerStatusRequestHandler } from "@homarr/request-handler/minecraft-server-status";
|
||||||
|
|
||||||
|
import { createTRPCRouter, publicProcedure } from "../../trpc";
|
||||||
|
|
||||||
|
const serverStatusInputSchema = z.object({
|
||||||
|
domain: z.string().nonempty(),
|
||||||
|
isBedrockServer: z.boolean(),
|
||||||
|
});
|
||||||
|
export const minecraftRouter = createTRPCRouter({
|
||||||
|
getServerStatus: publicProcedure.input(serverStatusInputSchema).query(async ({ input }) => {
|
||||||
|
const innerHandler = minecraftServerStatusRequestHandler.handler({
|
||||||
|
isBedrockServer: input.isBedrockServer,
|
||||||
|
domain: input.domain,
|
||||||
|
});
|
||||||
|
return await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: true });
|
||||||
|
}),
|
||||||
|
subscribeServerStatus: publicProcedure.input(serverStatusInputSchema).subscription(({ input }) => {
|
||||||
|
return observable<MinecraftServerStatus>((emit) => {
|
||||||
|
const innerHandler = minecraftServerStatusRequestHandler.handler({
|
||||||
|
isBedrockServer: input.isBedrockServer,
|
||||||
|
domain: input.domain,
|
||||||
|
});
|
||||||
|
const unsubscribe = innerHandler.subscribe((data) => {
|
||||||
|
emit.next(data);
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
unsubscribe();
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
});
|
||||||
@@ -64,7 +64,6 @@ export const env = createEnv({
|
|||||||
server: {
|
server: {
|
||||||
AUTH_LOGOUT_REDIRECT_URL: z.string().url().optional(),
|
AUTH_LOGOUT_REDIRECT_URL: z.string().url().optional(),
|
||||||
AUTH_SESSION_EXPIRY_TIME: createDurationSchema("30d"),
|
AUTH_SESSION_EXPIRY_TIME: createDurationSchema("30d"),
|
||||||
AUTH_SECRET: process.env.NODE_ENV === "production" ? z.string().min(1) : z.string().min(1).optional(),
|
|
||||||
AUTH_PROVIDERS: authProvidersSchema,
|
AUTH_PROVIDERS: authProvidersSchema,
|
||||||
...(authProviders.includes("oidc")
|
...(authProviders.includes("oidc")
|
||||||
? {
|
? {
|
||||||
@@ -98,7 +97,6 @@ export const env = createEnv({
|
|||||||
runtimeEnv: {
|
runtimeEnv: {
|
||||||
AUTH_LOGOUT_REDIRECT_URL: process.env.AUTH_LOGOUT_REDIRECT_URL,
|
AUTH_LOGOUT_REDIRECT_URL: process.env.AUTH_LOGOUT_REDIRECT_URL,
|
||||||
AUTH_SESSION_EXPIRY_TIME: process.env.AUTH_SESSION_EXPIRY_TIME,
|
AUTH_SESSION_EXPIRY_TIME: process.env.AUTH_SESSION_EXPIRY_TIME,
|
||||||
AUTH_SECRET: process.env.AUTH_SECRET,
|
|
||||||
AUTH_PROVIDERS: process.env.AUTH_PROVIDERS,
|
AUTH_PROVIDERS: process.env.AUTH_PROVIDERS,
|
||||||
AUTH_LDAP_BASE: process.env.AUTH_LDAP_BASE,
|
AUTH_LDAP_BASE: process.env.AUTH_LDAP_BASE,
|
||||||
AUTH_LDAP_BIND_DN: process.env.AUTH_LDAP_BIND_DN,
|
AUTH_LDAP_BIND_DN: process.env.AUTH_LDAP_BIND_DN,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
"bcrypt": "^5.1.1",
|
"bcrypt": "^5.1.1",
|
||||||
"cookies": "^0.9.1",
|
"cookies": "^0.9.1",
|
||||||
"ldapts": "7.3.0",
|
"ldapts": "7.3.0",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"next-auth": "5.0.0-beta.25",
|
"next-auth": "5.0.0-beta.25",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0"
|
"react-dom": "^19.0.0"
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ export const OidcProvider = (headers: ReadonlyHeaders | null): OIDCConfig<Profil
|
|||||||
authorization: {
|
authorization: {
|
||||||
params: {
|
params: {
|
||||||
scope: env.AUTH_OIDC_SCOPE_OVERWRITE,
|
scope: env.AUTH_OIDC_SCOPE_OVERWRITE,
|
||||||
redirect_uri: createRedirectUri(headers, "/api/auth/callback/oidc"),
|
// We fallback to https as generally oidc providers require https
|
||||||
|
redirect_uri: createRedirectUri(headers, "/api/auth/callback/oidc", "https"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
profile(profile) {
|
profile(profile) {
|
||||||
|
|||||||
@@ -8,12 +8,16 @@ import { extractBaseUrlFromHeaders } from "@homarr/common";
|
|||||||
* @param pathname
|
* @param pathname
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const createRedirectUri = (headers: ReadonlyHeaders | null, pathname: string) => {
|
export const createRedirectUri = (
|
||||||
|
headers: ReadonlyHeaders | null,
|
||||||
|
pathname: string,
|
||||||
|
fallbackProtocol: "http" | "https" = "http",
|
||||||
|
) => {
|
||||||
if (!headers) {
|
if (!headers) {
|
||||||
return pathname;
|
return pathname;
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseUrl = extractBaseUrlFromHeaders(headers);
|
const baseUrl = extractBaseUrlFromHeaders(headers, fallbackProtocol);
|
||||||
|
|
||||||
const path = pathname.startsWith("/") ? pathname : `/${pathname}`;
|
const path = pathname.startsWith("/") ? pathname : `/${pathname}`;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { randomBytes } from "crypto";
|
||||||
|
import { createEnv } from "@t3-oss/env-nextjs";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
const errorSuffix = `, please generate a 64 character secret in hex format or use the following: "${randomBytes(32).toString("hex")}"`;
|
||||||
|
|
||||||
|
export const env = createEnv({
|
||||||
|
server: {
|
||||||
|
SECRET_ENCRYPTION_KEY: z
|
||||||
|
.string({
|
||||||
|
required_error: `SECRET_ENCRYPTION_KEY is required${errorSuffix}`,
|
||||||
|
})
|
||||||
|
.min(64, {
|
||||||
|
message: `SECRET_ENCRYPTION_KEY has to be 64 characters${errorSuffix}`,
|
||||||
|
})
|
||||||
|
.max(64, {
|
||||||
|
message: `SECRET_ENCRYPTION_KEY has to be 64 characters${errorSuffix}`,
|
||||||
|
})
|
||||||
|
.regex(/^[0-9a-fA-F]{64}$/, {
|
||||||
|
message: `SECRET_ENCRYPTION_KEY must only contain hex characters${errorSuffix}`,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
runtimeEnv: {
|
||||||
|
SECRET_ENCRYPTION_KEY: process.env.SECRET_ENCRYPTION_KEY,
|
||||||
|
},
|
||||||
|
skipValidation:
|
||||||
|
Boolean(process.env.CI) || Boolean(process.env.SKIP_ENV_VALIDATION) || process.env.npm_lifecycle_event === "lint",
|
||||||
|
});
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
".": "./index.ts",
|
".": "./index.ts",
|
||||||
"./types": "./src/types.ts",
|
"./types": "./src/types.ts",
|
||||||
"./server": "./src/server.ts",
|
"./server": "./src/server.ts",
|
||||||
"./client": "./src/client.ts"
|
"./client": "./src/client.ts",
|
||||||
|
"./env.mjs": "./env.mjs"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
@@ -27,9 +28,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@homarr/log": "workspace:^0.1.0",
|
"@homarr/log": "workspace:^0.1.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0"
|
||||||
"tldts": "^6.1.69"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
import * as tldts from "tldts";
|
|
||||||
|
|
||||||
const safeParseTldts = (url: string) => {
|
|
||||||
try {
|
|
||||||
return tldts.parse(url);
|
|
||||||
} catch {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const parseAppHrefWithVariables = <TInput extends string | null>(url: TInput, currentHref: string): TInput => {
|
|
||||||
if (!url || url.length === 0) return url;
|
|
||||||
|
|
||||||
const tldtsResult = safeParseTldts(currentHref);
|
|
||||||
|
|
||||||
const urlObject = new URL(currentHref);
|
|
||||||
|
|
||||||
return url
|
|
||||||
.replaceAll("[homarr_base]", `${urlObject.protocol}//${urlObject.hostname}`)
|
|
||||||
.replaceAll("[homarr_hostname]", tldtsResult?.hostname ?? "")
|
|
||||||
.replaceAll("[homarr_domain]", tldtsResult?.domain ?? "")
|
|
||||||
.replaceAll("[homarr_protocol]", urlObject.protocol.replace(":", "")) as TInput;
|
|
||||||
};
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import { parseAppHrefWithVariables } from "./base";
|
|
||||||
|
|
||||||
export const parseAppHrefWithVariablesClient = <TInput extends string | null>(url: TInput): TInput => {
|
|
||||||
if (typeof window === "undefined") return url;
|
|
||||||
return parseAppHrefWithVariables(url, window.location.href);
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { headers } from "next/headers";
|
|
||||||
|
|
||||||
import { extractBaseUrlFromHeaders } from "../url";
|
|
||||||
import { parseAppHrefWithVariables } from "./base";
|
|
||||||
|
|
||||||
export const parseAppHrefWithVariablesServer = <TInput extends string | null>(url: TInput): TInput => {
|
|
||||||
return parseAppHrefWithVariables(url, extractBaseUrlFromHeaders(headers()));
|
|
||||||
};
|
|
||||||
@@ -1,2 +1 @@
|
|||||||
export * from "./app-url/client";
|
|
||||||
export * from "./revalidate-path-action";
|
export * from "./revalidate-path-action";
|
||||||
@@ -1,20 +1,12 @@
|
|||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
|
|
||||||
import { logger } from "@homarr/log";
|
import { env } from "../env.mjs";
|
||||||
|
|
||||||
const algorithm = "aes-256-cbc"; //Using AES encryption
|
const algorithm = "aes-256-cbc"; //Using AES encryption
|
||||||
const fallbackKey = "0000000000000000000000000000000000000000000000000000000000000000";
|
|
||||||
const encryptionKey = process.env.ENCRYPTION_KEY ?? fallbackKey; // Fallback to a default key for local development
|
|
||||||
if (encryptionKey === fallbackKey) {
|
|
||||||
logger.warn("Using a fallback encryption key, stored secrets are not secure");
|
|
||||||
|
|
||||||
// We never want to use the fallback key in production
|
// We fallback to a key of 0s if the key was not provided because env validation was skipped
|
||||||
if (process.env.NODE_ENV === "production" && process.env.CI !== "true") {
|
// This should only be the case in CI
|
||||||
throw new Error("Encryption key is not set");
|
const key = Buffer.from(env.SECRET_ENCRYPTION_KEY || "0".repeat(64), "hex");
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const key = Buffer.from(encryptionKey, "hex");
|
|
||||||
|
|
||||||
export function encryptSecret(text: string): `${string}.${string}` {
|
export function encryptSecret(text: string): `${string}.${string}` {
|
||||||
const initializationVector = crypto.randomBytes(16);
|
const initializationVector = crypto.randomBytes(16);
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
export * from "./app-url/server";
|
|
||||||
export * from "./security";
|
export * from "./security";
|
||||||
export * from "./encryption";
|
export * from "./encryption";
|
||||||
@@ -11,3 +11,8 @@ export type RemoveReadonly<T> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type MaybeArray<T> = T | T[];
|
export type MaybeArray<T> = T | T[];
|
||||||
|
export type Inverse<T extends Invertible> = {
|
||||||
|
[Key in keyof T as T[Key]]: Key;
|
||||||
|
};
|
||||||
|
|
||||||
|
type Invertible = Record<PropertyKey, PropertyKey>;
|
||||||
@@ -4,8 +4,16 @@ export const removeTrailingSlash = (path: string) => {
|
|||||||
return path.at(-1) === "/" ? path.substring(0, path.length - 1) : path;
|
return path.at(-1) === "/" ? path.substring(0, path.length - 1) : path;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const extractBaseUrlFromHeaders = (headers: ReadonlyHeaders): `${string}://${string}` => {
|
export const extractBaseUrlFromHeaders = (
|
||||||
let protocol = headers.get("x-forwarded-proto") ?? "http";
|
headers: ReadonlyHeaders,
|
||||||
|
fallbackProtocol: "http" | "https" = "http",
|
||||||
|
): `${string}://${string}` => {
|
||||||
|
let protocol = headers.get("x-forwarded-proto");
|
||||||
|
|
||||||
|
// If the protocol is not set or an empty string
|
||||||
|
if (!protocol) {
|
||||||
|
protocol = fallbackProtocol;
|
||||||
|
}
|
||||||
|
|
||||||
// @see https://support.glitch.com/t/x-forwarded-proto-contains-multiple-protocols/17219
|
// @see https://support.glitch.com/t/x-forwarded-proto-contains-multiple-protocols/17219
|
||||||
if (protocol.includes(",")) {
|
if (protocol.includes(",")) {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { mediaOrganizerJob } from "./jobs/integrations/media-organizer";
|
|||||||
import { mediaRequestListJob, mediaRequestStatsJob } from "./jobs/integrations/media-requests";
|
import { mediaRequestListJob, mediaRequestStatsJob } from "./jobs/integrations/media-requests";
|
||||||
import { mediaServerJob } from "./jobs/integrations/media-server";
|
import { mediaServerJob } from "./jobs/integrations/media-server";
|
||||||
import { mediaTranscodingJob } from "./jobs/integrations/media-transcoding";
|
import { mediaTranscodingJob } from "./jobs/integrations/media-transcoding";
|
||||||
|
import { minecraftServerStatusJob } from "./jobs/minecraft-server-status";
|
||||||
import { pingJob } from "./jobs/ping";
|
import { pingJob } from "./jobs/ping";
|
||||||
import type { RssFeed } from "./jobs/rss-feeds";
|
import type { RssFeed } from "./jobs/rss-feeds";
|
||||||
import { rssFeedsJob } from "./jobs/rss-feeds";
|
import { rssFeedsJob } from "./jobs/rss-feeds";
|
||||||
@@ -33,6 +34,7 @@ export const jobGroup = createCronJobGroup({
|
|||||||
sessionCleanup: sessionCleanupJob,
|
sessionCleanup: sessionCleanupJob,
|
||||||
updateChecker: updateCheckerJob,
|
updateChecker: updateCheckerJob,
|
||||||
mediaTranscoding: mediaTranscodingJob,
|
mediaTranscoding: mediaTranscodingJob,
|
||||||
|
minecraftServerStatus: minecraftServerStatusJob,
|
||||||
});
|
});
|
||||||
|
|
||||||
export type JobGroupKeys = ReturnType<(typeof jobGroup)["getKeys"]>[number];
|
export type JobGroupKeys = ReturnType<(typeof jobGroup)["getKeys"]>[number];
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import SuperJSON from "superjson";
|
||||||
|
|
||||||
|
import { EVERY_5_MINUTES } from "@homarr/cron-jobs-core/expressions";
|
||||||
|
import { db, eq } from "@homarr/db";
|
||||||
|
import { items } from "@homarr/db/schema";
|
||||||
|
import { minecraftServerStatusRequestHandler } from "@homarr/request-handler/minecraft-server-status";
|
||||||
|
|
||||||
|
import type { WidgetComponentProps } from "../../../widgets/src";
|
||||||
|
import { createCronJob } from "../lib";
|
||||||
|
|
||||||
|
export const minecraftServerStatusJob = createCronJob("minecraftServerStatus", EVERY_5_MINUTES).withCallback(
|
||||||
|
async () => {
|
||||||
|
const dbItems = await db.query.items.findMany({
|
||||||
|
where: eq(items.kind, "minecraftServerStatus"),
|
||||||
|
});
|
||||||
|
|
||||||
|
await Promise.allSettled(
|
||||||
|
dbItems.map(async (item) => {
|
||||||
|
const options = SuperJSON.parse<WidgetComponentProps<"minecraftServerStatus">["options"]>(item.options);
|
||||||
|
const innerHandler = minecraftServerStatusRequestHandler.handler(options);
|
||||||
|
await innerHandler.getCachedOrUpdatedDataAsync({ forceUpdate: true });
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `search_engine` ADD CONSTRAINT `search_engine_short_unique` UNIQUE(`short`);
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -127,6 +127,13 @@
|
|||||||
"when": 1733777544067,
|
"when": 1733777544067,
|
||||||
"tag": "0017_tired_penance",
|
"tag": "0017_tired_penance",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 18,
|
||||||
|
"version": "5",
|
||||||
|
"when": 1735593853768,
|
||||||
|
"tag": "0018_mighty_shaman",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
CREATE UNIQUE INDEX `search_engine_short_unique` ON `search_engine` (`short`);
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -127,6 +127,13 @@
|
|||||||
"when": 1733777395703,
|
"when": 1733777395703,
|
||||||
"tag": "0017_small_rumiko_fujikawa",
|
"tag": "0017_small_rumiko_fujikawa",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 18,
|
||||||
|
"version": "6",
|
||||||
|
"when": 1735593831501,
|
||||||
|
"tag": "0018_cheerful_tattoo",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -48,16 +48,16 @@
|
|||||||
"better-sqlite3": "^11.7.0",
|
"better-sqlite3": "^11.7.0",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"drizzle-kit": "^0.30.1",
|
"drizzle-kit": "^0.30.1",
|
||||||
"drizzle-orm": "^0.38.2",
|
"drizzle-orm": "^0.38.3",
|
||||||
"drizzle-zod": "^0.6.0",
|
"drizzle-zod": "^0.6.1",
|
||||||
"mysql2": "3.11.5"
|
"mysql2": "3.12.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
"@homarr/prettier-config": "workspace:^0.1.0",
|
"@homarr/prettier-config": "workspace:^0.1.0",
|
||||||
"@homarr/tsconfig": "workspace:^0.1.0",
|
"@homarr/tsconfig": "workspace:^0.1.0",
|
||||||
"@types/better-sqlite3": "7.6.12",
|
"@types/better-sqlite3": "7.6.12",
|
||||||
"dotenv-cli": "^7.4.4",
|
"dotenv-cli": "^8.0.0",
|
||||||
"eslint": "^9.17.0",
|
"eslint": "^9.17.0",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"tsx": "4.19.2",
|
"tsx": "4.19.2",
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ export const searchEngines = mysqlTable("search_engine", {
|
|||||||
id: varchar({ length: 64 }).notNull().primaryKey(),
|
id: varchar({ length: 64 }).notNull().primaryKey(),
|
||||||
iconUrl: text().notNull(),
|
iconUrl: text().notNull(),
|
||||||
name: varchar({ length: 64 }).notNull(),
|
name: varchar({ length: 64 }).notNull(),
|
||||||
short: varchar({ length: 8 }).notNull(),
|
short: varchar({ length: 8 }).unique().notNull(),
|
||||||
description: text(),
|
description: text(),
|
||||||
urlTemplate: text(),
|
urlTemplate: text(),
|
||||||
type: varchar({ length: 64 }).$type<SearchEngineType>().notNull().default("generic"),
|
type: varchar({ length: 64 }).$type<SearchEngineType>().notNull().default("generic"),
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ export const searchEngines = sqliteTable("search_engine", {
|
|||||||
id: text().notNull().primaryKey(),
|
id: text().notNull().primaryKey(),
|
||||||
iconUrl: text().notNull(),
|
iconUrl: text().notNull(),
|
||||||
name: text().notNull(),
|
name: text().notNull(),
|
||||||
short: text().notNull(),
|
short: text().unique().notNull(),
|
||||||
description: text(),
|
description: text(),
|
||||||
urlTemplate: text(),
|
urlTemplate: text(),
|
||||||
type: text().$type<SearchEngineType>().notNull().default("generic"),
|
type: text().$type<SearchEngineType>().notNull().default("generic"),
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ export type HomarrDocumentationPath =
|
|||||||
| "/docs/tags/lists"
|
| "/docs/tags/lists"
|
||||||
| "/docs/tags/management"
|
| "/docs/tags/management"
|
||||||
| "/docs/tags/media"
|
| "/docs/tags/media"
|
||||||
|
| "/docs/tags/minecraft"
|
||||||
| "/docs/tags/monitoring"
|
| "/docs/tags/monitoring"
|
||||||
| "/docs/tags/news"
|
| "/docs/tags/news"
|
||||||
| "/docs/tags/notebook"
|
| "/docs/tags/notebook"
|
||||||
@@ -190,6 +191,7 @@ export type HomarrDocumentationPath =
|
|||||||
| "/docs/widgets/indexer-manager"
|
| "/docs/widgets/indexer-manager"
|
||||||
| "/docs/widgets/media-requests"
|
| "/docs/widgets/media-requests"
|
||||||
| "/docs/widgets/media-server"
|
| "/docs/widgets/media-server"
|
||||||
|
| "/docs/widgets/minecraft-server-status"
|
||||||
| "/docs/widgets/notebook"
|
| "/docs/widgets/notebook"
|
||||||
| "/docs/widgets/rss"
|
| "/docs/widgets/rss"
|
||||||
| "/docs/widgets/video"
|
| "/docs/widgets/video"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export const widgetKinds = [
|
|||||||
"mediaRequests-requestList",
|
"mediaRequests-requestList",
|
||||||
"mediaRequests-requestStats",
|
"mediaRequests-requestStats",
|
||||||
"mediaTranscoding",
|
"mediaTranscoding",
|
||||||
|
"minecraftServerStatus",
|
||||||
"rssFeed",
|
"rssFeed",
|
||||||
"bookmarks",
|
"bookmarks",
|
||||||
"indexerManager",
|
"indexerManager",
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
"@homarr/common": "workspace:^0.1.0",
|
"@homarr/common": "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",
|
||||||
"@mantine/form": "^7.15.1"
|
"@mantine/form": "^7.15.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@homarr/eslint-config": "workspace:^0.2.0",
|
"@homarr/eslint-config": "workspace:^0.2.0",
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
export * from "./src/icons-fetcher";
|
export * from "./src/icons-fetcher";
|
||||||
export * from "./src/types";
|
export * from "./src/types";
|
||||||
|
export * from "./src/auto-icon-searcher";
|
||||||
@@ -5,7 +5,8 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.ts"
|
".": "./index.ts",
|
||||||
|
"./local": "./src/local.ts"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import type { Database } from "@homarr/db";
|
||||||
|
import { like } from "@homarr/db";
|
||||||
|
import { icons } from "@homarr/db/schema";
|
||||||
|
|
||||||
|
export const getIconForNameAsync = async (db: Database, name: string) => {
|
||||||
|
return await db.query.icons.findFirst({
|
||||||
|
where: like(icons.name, `%${name}%`),
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { createLocalImageUrl, mapMediaToIcon, LOCAL_ICON_REPOSITORY_SLUG } from "./repositories/local.icon-repository";
|
||||||
@@ -1,26 +1,36 @@
|
|||||||
import { createHash } from "crypto";
|
import { createHash } from "crypto";
|
||||||
|
|
||||||
|
import type { InferSelectModel } from "@homarr/db";
|
||||||
import { db } from "@homarr/db";
|
import { db } from "@homarr/db";
|
||||||
|
import type { medias } from "@homarr/db/schema";
|
||||||
|
|
||||||
import type { RepositoryIconGroup } from "../types";
|
import type { RepositoryIcon, RepositoryIconGroup } from "../types";
|
||||||
import { IconRepository } from "./icon-repository";
|
import { IconRepository } from "./icon-repository";
|
||||||
|
|
||||||
|
export const LOCAL_ICON_REPOSITORY_SLUG = "local";
|
||||||
|
|
||||||
export class LocalIconRepository extends IconRepository {
|
export class LocalIconRepository extends IconRepository {
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Local", "local", undefined, undefined, undefined, undefined);
|
super("Local", LOCAL_ICON_REPOSITORY_SLUG, undefined, undefined, undefined, undefined);
|
||||||
}
|
}
|
||||||
protected async getAllIconsInternalAsync(): Promise<RepositoryIconGroup> {
|
protected async getAllIconsInternalAsync(): Promise<RepositoryIconGroup> {
|
||||||
const medias = await db.query.medias.findMany();
|
const medias = await db.query.medias.findMany();
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
icons: medias.map((media) => ({
|
icons: medias.map(mapMediaToIcon),
|
||||||
local: true,
|
slug: LOCAL_ICON_REPOSITORY_SLUG,
|
||||||
fileNameWithExtension: media.name,
|
|
||||||
imageUrl: `/api/user-medias/${media.id}`,
|
|
||||||
checksum: createHash("md5").update(media.content).digest("hex"),
|
|
||||||
sizeInBytes: media.size,
|
|
||||||
})),
|
|
||||||
slug: "local",
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const createLocalImageUrl = (id: string) => `/api/user-medias/${id}`;
|
||||||
|
|
||||||
|
export const mapMediaToIcon = (
|
||||||
|
media: Pick<InferSelectModel<typeof medias>, "name" | "id" | "content" | "size">,
|
||||||
|
): RepositoryIcon => ({
|
||||||
|
local: true,
|
||||||
|
fileNameWithExtension: media.name,
|
||||||
|
imageUrl: createLocalImageUrl(media.id),
|
||||||
|
checksum: createHash("md5").update(media.content).digest("hex"),
|
||||||
|
sizeInBytes: media.size,
|
||||||
|
});
|
||||||
@@ -24,9 +24,9 @@
|
|||||||
},
|
},
|
||||||
"prettier": "@homarr/prettier-config",
|
"prettier": "@homarr/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ctrl/deluge": "^7.0.0",
|
"@ctrl/deluge": "^7.1.0",
|
||||||
"@ctrl/qbittorrent": "^9.1.0",
|
"@ctrl/qbittorrent": "^9.2.0",
|
||||||
"@ctrl/transmission": "^7.1.0",
|
"@ctrl/transmission": "^7.2.0",
|
||||||
"@homarr/common": "workspace:^0.1.0",
|
"@homarr/common": "workspace:^0.1.0",
|
||||||
"@homarr/db": "workspace:^0.1.0",
|
"@homarr/db": "workspace:^0.1.0",
|
||||||
"@homarr/definitions": "workspace:^0.1.0",
|
"@homarr/definitions": "workspace:^0.1.0",
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export interface ISearchableIntegration {
|
export interface ISearchableIntegration<TResult extends { image?: string; name: string; link: string }> {
|
||||||
searchAsync(query: string): Promise<{ image?: string; name: string; link: string }[]>;
|
searchAsync(query: string): Promise<TResult[]>;
|
||||||
}
|
}
|
||||||
@@ -6,11 +6,20 @@ import type { ISearchableIntegration } from "../base/searchable-integration";
|
|||||||
import type { MediaRequest, RequestStats, RequestUser } from "../interfaces/media-requests/media-request";
|
import type { MediaRequest, RequestStats, RequestUser } from "../interfaces/media-requests/media-request";
|
||||||
import { MediaAvailability, MediaRequestStatus } from "../interfaces/media-requests/media-request";
|
import { MediaAvailability, MediaRequestStatus } from "../interfaces/media-requests/media-request";
|
||||||
|
|
||||||
|
interface OverseerrSearchResult {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
link: string;
|
||||||
|
image?: string;
|
||||||
|
text?: string;
|
||||||
|
type: Exclude<z.infer<typeof searchSchema>["results"], undefined>[number]["mediaType"];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overseerr Integration. See https://api-docs.overseerr.dev
|
* Overseerr Integration. See https://api-docs.overseerr.dev
|
||||||
*/
|
*/
|
||||||
export class OverseerrIntegration extends Integration implements ISearchableIntegration {
|
export class OverseerrIntegration extends Integration implements ISearchableIntegration<OverseerrSearchResult> {
|
||||||
public async searchAsync(query: string): Promise<{ image?: string; name: string; link: string; text?: string }[]> {
|
public async searchAsync(query: string) {
|
||||||
const response = await fetch(this.url("/api/v1/search", { query }), {
|
const response = await fetch(this.url("/api/v1/search", { query }), {
|
||||||
headers: {
|
headers: {
|
||||||
"X-Api-Key": this.getSecretValue("apiKey"),
|
"X-Api-Key": this.getSecretValue("apiKey"),
|
||||||
@@ -23,13 +32,53 @@ export class OverseerrIntegration extends Integration implements ISearchableInte
|
|||||||
}
|
}
|
||||||
|
|
||||||
return schemaData.results.map((result) => ({
|
return schemaData.results.map((result) => ({
|
||||||
|
id: result.id,
|
||||||
name: "name" in result ? result.name : result.title,
|
name: "name" in result ? result.name : result.title,
|
||||||
link: this.url(`/${result.mediaType}/${result.id}`).toString(),
|
link: this.url(`/${result.mediaType}/${result.id}`).toString(),
|
||||||
image: constructSearchResultImage(result),
|
image: constructSearchResultImage(result),
|
||||||
text: "overview" in result ? result.overview : undefined,
|
text: "overview" in result ? result.overview : undefined,
|
||||||
|
type: result.mediaType,
|
||||||
|
inLibrary: result.mediaInfo !== undefined,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async getSeriesInformationAsync(mediaType: "movie" | "tv", id: number) {
|
||||||
|
const url = mediaType === "tv" ? this.url(`/api/v1/tv/${id}`) : this.url(`/api/v1/movie/${id}`);
|
||||||
|
const response = await fetch(url, {
|
||||||
|
headers: {
|
||||||
|
"X-Api-Key": this.getSecretValue("apiKey"),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return await mediaInformationSchema.parseAsync(await response.json());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request a media. See https://api-docs.overseerr.dev/#/request/post_request
|
||||||
|
* @param mediaType The media type to request. Can be "movie" or "tv".
|
||||||
|
* @param id The Overseerr ID of the media to request.
|
||||||
|
* @param seasons A list of the seasons that should be requested.
|
||||||
|
*/
|
||||||
|
public async requestMediaAsync(mediaType: "movie" | "tv", id: number, seasons?: number[]): Promise<void> {
|
||||||
|
const url = this.url("/api/v1/request");
|
||||||
|
const response = await fetch(url, {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify({
|
||||||
|
mediaType,
|
||||||
|
mediaId: id,
|
||||||
|
seasons,
|
||||||
|
}),
|
||||||
|
headers: {
|
||||||
|
"X-Api-Key": this.getSecretValue("apiKey"),
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (response.status !== 201) {
|
||||||
|
throw new Error(
|
||||||
|
`Status code ${response.status} does not match the expected status code. The request was likely not created. Response: ${await response.text()}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async testConnectionAsync(): Promise<void> {
|
public async testConnectionAsync(): Promise<void> {
|
||||||
const response = await fetch(this.url("/api/v1/auth/me"), {
|
const response = await fetch(this.url("/api/v1/auth/me"), {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -220,6 +269,27 @@ interface MovieInformation {
|
|||||||
releaseDate: string;
|
releaseDate: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mediaInformationSchema = z.union([
|
||||||
|
z.object({
|
||||||
|
id: z.number(),
|
||||||
|
overview: z.string(),
|
||||||
|
seasons: z.array(
|
||||||
|
z.object({
|
||||||
|
id: z.number(),
|
||||||
|
name: z.string().min(0),
|
||||||
|
episodeCount: z.number().min(0),
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
numberOfSeasons: z.number(),
|
||||||
|
posterPath: z.string().startsWith("/"),
|
||||||
|
}),
|
||||||
|
z.object({
|
||||||
|
id: z.number(),
|
||||||
|
overview: z.string(),
|
||||||
|
posterPath: z.string().startsWith("/"),
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
|
||||||
const searchSchema = z.object({
|
const searchSchema = z.object({
|
||||||
results: z
|
results: z
|
||||||
.array(
|
.array(
|
||||||
@@ -230,6 +300,7 @@ const searchSchema = z.object({
|
|||||||
name: z.string(),
|
name: z.string(),
|
||||||
posterPath: z.string().startsWith("/").endsWith(".jpg").nullable(),
|
posterPath: z.string().startsWith("/").endsWith(".jpg").nullable(),
|
||||||
overview: z.string(),
|
overview: z.string(),
|
||||||
|
mediaInfo: z.object({}).optional(),
|
||||||
}),
|
}),
|
||||||
z.object({
|
z.object({
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
@@ -237,12 +308,14 @@ const searchSchema = z.object({
|
|||||||
title: z.string(),
|
title: z.string(),
|
||||||
posterPath: z.string().startsWith("/").endsWith(".jpg").nullable(),
|
posterPath: z.string().startsWith("/").endsWith(".jpg").nullable(),
|
||||||
overview: z.string(),
|
overview: z.string(),
|
||||||
|
mediaInfo: z.object({}).optional(),
|
||||||
}),
|
}),
|
||||||
z.object({
|
z.object({
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
mediaType: z.literal("person"),
|
mediaType: z.literal("person"),
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
profilePath: z.string().startsWith("/").endsWith(".jpg").nullable(),
|
profilePath: z.string().startsWith("/").endsWith(".jpg").nullable(),
|
||||||
|
mediaInfo: z.object({}).optional(),
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,10 +32,10 @@
|
|||||||
"@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",
|
||||||
"@mantine/core": "^7.15.1",
|
"@mantine/core": "^7.15.2",
|
||||||
"@tabler/icons-react": "^3.26.0",
|
"@tabler/icons-react": "^3.26.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"react": "^19.0.0"
|
"react": "^19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
export * from "./boards";
|
export * from "./boards";
|
||||||
export * from "./invites";
|
export * from "./invites";
|
||||||
export * from "./groups";
|
export * from "./groups";
|
||||||
|
export * from "./search-engines";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { RequestMediaModal } from "./request-media-modal";
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
import { useMemo } from "react";
|
||||||
|
import { Button, Group, Image, LoadingOverlay, Stack, Text } from "@mantine/core";
|
||||||
|
import type { MRT_ColumnDef } from "mantine-react-table";
|
||||||
|
import { MRT_Table } from "mantine-react-table";
|
||||||
|
|
||||||
|
import { clientApi } from "@homarr/api/client";
|
||||||
|
import { createModal } from "@homarr/modals";
|
||||||
|
import { showSuccessNotification } from "@homarr/notifications";
|
||||||
|
import { useI18n } from "@homarr/translation/client";
|
||||||
|
import { useTranslatedMantineReactTable } from "@homarr/ui/hooks";
|
||||||
|
|
||||||
|
interface RequestMediaModalProps {
|
||||||
|
integrationId: string;
|
||||||
|
mediaId: number;
|
||||||
|
mediaType: "movie" | "tv";
|
||||||
|
}
|
||||||
|
|
||||||
|
export const RequestMediaModal = createModal<RequestMediaModalProps>(({ actions, innerProps }) => {
|
||||||
|
const { data, isPending: isPendingQuery } = clientApi.searchEngine.getMediaRequestOptions.useQuery({
|
||||||
|
integrationId: innerProps.integrationId,
|
||||||
|
mediaId: innerProps.mediaId,
|
||||||
|
mediaType: innerProps.mediaType,
|
||||||
|
});
|
||||||
|
|
||||||
|
const { mutate, isPending: isPendingMutation } = clientApi.searchEngine.requestMedia.useMutation({
|
||||||
|
onSuccess() {
|
||||||
|
actions.closeModal();
|
||||||
|
showSuccessNotification({
|
||||||
|
message: t("common.notification.create.success"),
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const isPending = isPendingQuery || isPendingMutation;
|
||||||
|
const t = useI18n();
|
||||||
|
|
||||||
|
const columns = useMemo<MRT_ColumnDef<Season>[]>(
|
||||||
|
() => [
|
||||||
|
{
|
||||||
|
accessorKey: "name",
|
||||||
|
header: t("search.engine.media.request.modal.table.header.season"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
accessorKey: "episodeCount",
|
||||||
|
header: t("search.engine.media.request.modal.table.header.episodes"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
);
|
||||||
|
|
||||||
|
const table = useTranslatedMantineReactTable({
|
||||||
|
columns,
|
||||||
|
data: data && "seasons" in data ? data.seasons : [],
|
||||||
|
enableColumnActions: false,
|
||||||
|
enableColumnFilters: false,
|
||||||
|
enablePagination: false,
|
||||||
|
enableSorting: false,
|
||||||
|
enableSelectAll: true,
|
||||||
|
enableRowSelection: true,
|
||||||
|
mantineTableProps: {
|
||||||
|
highlightOnHover: false,
|
||||||
|
striped: "odd",
|
||||||
|
withColumnBorders: true,
|
||||||
|
withRowBorders: true,
|
||||||
|
withTableBorder: true,
|
||||||
|
},
|
||||||
|
initialState: {
|
||||||
|
density: "xs",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const anySelected = Object.keys(table.getState().rowSelection).length > 0;
|
||||||
|
|
||||||
|
const handleMutate = () => {
|
||||||
|
const selectedSeasons = table.getSelectedRowModel().rows.flatMap((row) => row.original.id);
|
||||||
|
mutate({
|
||||||
|
integrationId: innerProps.integrationId,
|
||||||
|
mediaId: innerProps.mediaId,
|
||||||
|
mediaType: innerProps.mediaType,
|
||||||
|
seasons: selectedSeasons,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Stack>
|
||||||
|
<LoadingOverlay visible={isPending} zIndex={1000} overlayProps={{ radius: "sm", blur: 2 }} />
|
||||||
|
{data && (
|
||||||
|
<Group wrap="nowrap" align="start">
|
||||||
|
<Image
|
||||||
|
src={`https://image.tmdb.org/t/p/w600_and_h900_bestv2${data.posterPath}`}
|
||||||
|
alt="poster"
|
||||||
|
w={100}
|
||||||
|
radius="md"
|
||||||
|
/>
|
||||||
|
<Text c="dimmed" style={{ flex: "1" }}>
|
||||||
|
{data.overview}
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
{innerProps.mediaType === "tv" && <MRT_Table table={table} />}
|
||||||
|
<Group justify="end">
|
||||||
|
<Button onClick={actions.closeModal} variant="light">
|
||||||
|
{t("common.action.cancel")}
|
||||||
|
</Button>
|
||||||
|
<Button onClick={handleMutate} disabled={!anySelected && innerProps.mediaType === "tv"}>
|
||||||
|
{t("search.engine.media.request.modal.button.send")}
|
||||||
|
</Button>
|
||||||
|
</Group>
|
||||||
|
</Stack>
|
||||||
|
);
|
||||||
|
}).withOptions({
|
||||||
|
size: "xl",
|
||||||
|
});
|
||||||
|
|
||||||
|
interface Season {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
episodeCount: number;
|
||||||
|
}
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@homarr/translation": "workspace:^0.1.0",
|
"@homarr/translation": "workspace:^0.1.0",
|
||||||
"@homarr/ui": "workspace:^0.1.0",
|
"@homarr/ui": "workspace:^0.1.0",
|
||||||
"@mantine/core": "^7.15.1",
|
"@mantine/core": "^7.15.2",
|
||||||
"@mantine/hooks": "^7.15.1",
|
"@mantine/hooks": "^7.15.2",
|
||||||
"react": "^19.0.0"
|
"react": "^19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
"prettier": "@homarr/prettier-config",
|
"prettier": "@homarr/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@homarr/ui": "workspace:^0.1.0",
|
"@homarr/ui": "workspace:^0.1.0",
|
||||||
"@mantine/notifications": "^7.15.1",
|
"@mantine/notifications": "^7.15.2",
|
||||||
"@tabler/icons-react": "^3.26.0"
|
"@tabler/icons-react": "^3.26.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -37,10 +37,10 @@
|
|||||||
"@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",
|
||||||
"@mantine/core": "^7.15.1",
|
"@mantine/core": "^7.15.2",
|
||||||
"@mantine/hooks": "^7.15.1",
|
"@mantine/hooks": "^7.15.2",
|
||||||
"adm-zip": "0.5.16",
|
"adm-zip": "0.5.16",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"superjson": "2.2.2",
|
"superjson": "2.2.2",
|
||||||
"zod": "^3.24.1",
|
"zod": "^3.24.1",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const insertItemsAsync = async (
|
|||||||
xOffset: screenSizeShape.location.x,
|
xOffset: screenSizeShape.location.x,
|
||||||
yOffset: screenSizeShape.location.y,
|
yOffset: screenSizeShape.location.y,
|
||||||
kind,
|
kind,
|
||||||
options: SuperJSON.stringify(mapOptions(kind, widget.properties, appsMap)),
|
options: SuperJSON.stringify(mapOptions(widget.type, widget.properties, appsMap)),
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.debug(`Inserted widget id=${widget.id} sectionId=${sectionId}`);
|
logger.debug(`Inserted widget id=${widget.id} sectionId=${sectionId}`);
|
||||||
|
|||||||
@@ -83,7 +83,11 @@ export const mapWidget = (
|
|||||||
yOffset: shapeForSize.location.y,
|
yOffset: shapeForSize.location.y,
|
||||||
kind,
|
kind,
|
||||||
options: SuperJSON.stringify(
|
options: SuperJSON.stringify(
|
||||||
mapOptions(kind, widget.properties, new Map([...appsMap.entries()].map(([key, value]) => [key, value.id]))),
|
mapOptions(
|
||||||
|
widget.type,
|
||||||
|
widget.properties,
|
||||||
|
new Map([...appsMap.entries()].map(([key, value]) => [key, value.id])),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -23,6 +23,7 @@ export const mapAndDecryptUsers = (importUsers: OldmarrImportUser[], encryptionT
|
|||||||
...user,
|
...user,
|
||||||
oldId: id,
|
oldId: id,
|
||||||
id: createId(),
|
id: createId(),
|
||||||
|
name: user.name.toLowerCase(),
|
||||||
colorScheme: settings?.colorScheme === "environment" ? undefined : settings?.colorScheme,
|
colorScheme: settings?.colorScheme === "environment" ? undefined : settings?.colorScheme,
|
||||||
firstDayOfWeek: settings?.firstDayOfWeek === "sunday" ? 0 : settings?.firstDayOfWeek === "monday" ? 1 : 6,
|
firstDayOfWeek: settings?.firstDayOfWeek === "sunday" ? 0 : settings?.firstDayOfWeek === "monday" ? 1 : 6,
|
||||||
provider: "credentials",
|
provider: "credentials",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { objectEntries } from "@homarr/common";
|
import { objectEntries } from "@homarr/common";
|
||||||
|
import type { Inverse } from "@homarr/common/types";
|
||||||
import type { WidgetKind } from "@homarr/definitions";
|
import type { WidgetKind } from "@homarr/definitions";
|
||||||
|
|
||||||
import type { OldmarrBookmarkDefinition } from "./bookmark";
|
import type { OldmarrBookmarkDefinition } from "./bookmark";
|
||||||
@@ -49,32 +50,32 @@ export type OldmarrWidgetDefinitions =
|
|||||||
| OldmarrMediaTranscodingDefinition;
|
| OldmarrMediaTranscodingDefinition;
|
||||||
|
|
||||||
export const widgetKindMapping = {
|
export const widgetKindMapping = {
|
||||||
app: null, // In oldmarr apps were not widgets
|
date: "clock",
|
||||||
clock: "date",
|
|
||||||
calendar: "calendar",
|
calendar: "calendar",
|
||||||
downloads: "torrents-status",
|
"torrents-status": "downloads",
|
||||||
weather: "weather",
|
weather: "weather",
|
||||||
rssFeed: "rss",
|
rss: "rssFeed",
|
||||||
video: "video-stream",
|
"video-stream": "video",
|
||||||
iframe: "iframe",
|
iframe: "iframe",
|
||||||
mediaServer: "media-server",
|
"media-server": "mediaServer",
|
||||||
dnsHoleSummary: "dns-hole-summary",
|
"dns-hole-summary": "dnsHoleSummary",
|
||||||
dnsHoleControls: "dns-hole-controls",
|
"dns-hole-controls": "dnsHoleControls",
|
||||||
notebook: "notebook",
|
notebook: "notebook",
|
||||||
"smartHome-entityState": "smart-home/entity-state",
|
"smart-home/entity-state": "smartHome-entityState",
|
||||||
"smartHome-executeAutomation": "smart-home/trigger-automation",
|
"smart-home/trigger-automation": "smartHome-executeAutomation",
|
||||||
"mediaRequests-requestList": "media-requests-list",
|
"media-requests-list": "mediaRequests-requestList",
|
||||||
"mediaRequests-requestStats": "media-requests-stats",
|
"media-requests-stats": "mediaRequests-requestStats",
|
||||||
indexerManager: "indexer-manager",
|
"indexer-manager": "indexerManager",
|
||||||
bookmarks: "bookmark",
|
bookmark: "bookmarks",
|
||||||
healthMonitoring: "health-monitoring",
|
"health-monitoring": "healthMonitoring",
|
||||||
mediaTranscoding: "media-transcoding",
|
dashdot: "healthMonitoring",
|
||||||
} satisfies Record<WidgetKind, OldmarrWidgetDefinitions["id"] | null>;
|
"media-transcoding": "mediaTranscoding",
|
||||||
// Use null for widgets that did not exist in oldmarr
|
dlspeed: null,
|
||||||
// TODO: revert assignment so that only old widgets are needed in the object,
|
usenet: "downloads",
|
||||||
// this can be done ones all widgets are implemented
|
} satisfies Record<OldmarrWidgetDefinitions["id"], WidgetKind | null>;
|
||||||
|
|
||||||
export type WidgetMapping = typeof widgetKindMapping;
|
export type WidgetMapping = typeof widgetKindMapping;
|
||||||
|
export type InversedWidgetMapping = Inverse<Omit<typeof widgetKindMapping, "dlspeed">>;
|
||||||
|
|
||||||
export const mapKind = (kind: OldmarrWidgetDefinitions["id"]): WidgetKind | undefined =>
|
export const mapKind = (kind: OldmarrWidgetDefinitions["id"]): keyof InversedWidgetMapping | null =>
|
||||||
objectEntries(widgetKindMapping).find(([_, value]) => value === kind)?.[0];
|
objectEntries(widgetKindMapping).find(([key]) => key === kind)?.[1] ?? null;
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
import { objectEntries } from "@homarr/common";
|
import { objectEntries } from "@homarr/common";
|
||||||
import type { WidgetKind } from "@homarr/definitions";
|
|
||||||
import { logger } from "@homarr/log";
|
import { logger } from "@homarr/log";
|
||||||
|
|
||||||
import type { WidgetComponentProps } from "../../../widgets/src/definition";
|
import type { WidgetComponentProps } from "../../../widgets/src/definition";
|
||||||
import type { OldmarrWidgetDefinitions, WidgetMapping } from "./definitions";
|
import { mapKind } from "./definitions";
|
||||||
|
import type { InversedWidgetMapping, OldmarrWidgetDefinitions, WidgetMapping } from "./definitions";
|
||||||
|
|
||||||
// This type enforces, that for all widget mappings there is a corresponding option mapping,
|
// This type enforces, that for all widget mappings there is a corresponding option mapping,
|
||||||
// each option of newmarr can be mapped from the value of the oldmarr options
|
// each option of newmarr can be mapped from the value of the oldmarr options
|
||||||
type OptionMapping = {
|
type OptionMapping = {
|
||||||
[WidgetKey in keyof WidgetMapping]: WidgetMapping[WidgetKey] extends null
|
[WidgetKey in keyof InversedWidgetMapping]: InversedWidgetMapping[WidgetKey] extends null
|
||||||
? null
|
? null
|
||||||
: {
|
: {
|
||||||
[OptionsKey in keyof WidgetComponentProps<WidgetKey>["options"]]: (
|
[OptionsKey in keyof WidgetComponentProps<WidgetKey>["options"]]: (
|
||||||
oldOptions: Extract<OldmarrWidgetDefinitions, { id: WidgetMapping[WidgetKey] }>["options"],
|
oldOptions: Extract<OldmarrWidgetDefinitions, { id: InversedWidgetMapping[WidgetKey] }>["options"],
|
||||||
appsMap: Map<string, string>,
|
appsMap: Map<string, string>,
|
||||||
) => WidgetComponentProps<WidgetKey>["options"][OptionsKey] | undefined;
|
) => WidgetComponentProps<WidgetKey>["options"][OptionsKey] | undefined;
|
||||||
};
|
};
|
||||||
@@ -55,12 +55,16 @@ const optionMapping: OptionMapping = {
|
|||||||
useCustomTimezone: () => true,
|
useCustomTimezone: () => true,
|
||||||
},
|
},
|
||||||
downloads: {
|
downloads: {
|
||||||
activeTorrentThreshold: (oldOptions) => oldOptions.speedLimitOfActiveTorrents,
|
activeTorrentThreshold: (oldOptions) =>
|
||||||
applyFilterToRatio: (oldOptions) => oldOptions.displayRatioWithFilter,
|
"speedLimitOfActiveTorrents" in oldOptions ? oldOptions.speedLimitOfActiveTorrents : undefined,
|
||||||
categoryFilter: (oldOptions) => oldOptions.labelFilter,
|
applyFilterToRatio: (oldOptions) =>
|
||||||
filterIsWhitelist: (oldOptions) => oldOptions.labelFilterIsWhitelist,
|
"displayRatioWithFilter" in oldOptions ? oldOptions.displayRatioWithFilter : undefined,
|
||||||
enableRowSorting: (oldOptions) => oldOptions.rowSorting,
|
categoryFilter: (oldOptions) => ("labelFilter" in oldOptions ? oldOptions.labelFilter : undefined),
|
||||||
showCompletedTorrent: (oldOptions) => oldOptions.displayCompletedTorrents,
|
filterIsWhitelist: (oldOptions) =>
|
||||||
|
"labelFilterIsWhitelist" in oldOptions ? oldOptions.labelFilterIsWhitelist : undefined,
|
||||||
|
enableRowSorting: (oldOptions) => ("rowSorting" in oldOptions ? oldOptions.rowSorting : undefined),
|
||||||
|
showCompletedTorrent: (oldOptions) =>
|
||||||
|
"displayCompletedTorrents" in oldOptions ? oldOptions.displayCompletedTorrents : undefined,
|
||||||
columns: () => ["integration", "name", "progress", "time", "actions"],
|
columns: () => ["integration", "name", "progress", "time", "actions"],
|
||||||
defaultSort: () => "type",
|
defaultSort: () => "type",
|
||||||
descendingDefaultSort: () => false,
|
descendingDefaultSort: () => false,
|
||||||
@@ -124,45 +128,54 @@ const optionMapping: OptionMapping = {
|
|||||||
openIndexerSiteInNewTab: (oldOptions) => oldOptions.openIndexerSiteInNewTab,
|
openIndexerSiteInNewTab: (oldOptions) => oldOptions.openIndexerSiteInNewTab,
|
||||||
},
|
},
|
||||||
healthMonitoring: {
|
healthMonitoring: {
|
||||||
cpu: (oldOptions) => oldOptions.cpu,
|
cpu: (oldOptions) =>
|
||||||
memory: (oldOptions) => oldOptions.memory,
|
"cpu" in oldOptions
|
||||||
fahrenheit: (oldOptions) => oldOptions.fahrenheit,
|
? oldOptions.cpu
|
||||||
fileSystem: (oldOptions) => oldOptions.fileSystem,
|
: oldOptions.graphsOrder.some((graph) => graph.key === "cpu" && graph.subValues.enabled),
|
||||||
|
memory: (oldOptions) =>
|
||||||
|
"memory" in oldOptions
|
||||||
|
? oldOptions.memory
|
||||||
|
: oldOptions.graphsOrder.some((graph) => graph.key === "ram" && graph.subValues.enabled),
|
||||||
|
fahrenheit: (oldOptions) => ("fahrenheit" in oldOptions ? oldOptions.fahrenheit : undefined),
|
||||||
|
fileSystem: (oldOptions) =>
|
||||||
|
"fileSystem" in oldOptions
|
||||||
|
? oldOptions.fileSystem
|
||||||
|
: oldOptions.graphsOrder.some((graph) => graph.key === "storage" && graph.subValues.enabled),
|
||||||
},
|
},
|
||||||
mediaTranscoding: {
|
mediaTranscoding: {
|
||||||
defaultView: (oldOptions) => oldOptions.defaultView,
|
defaultView: (oldOptions) => oldOptions.defaultView,
|
||||||
queuePageSize: (oldOptions) => oldOptions.queuePageSize,
|
queuePageSize: (oldOptions) => oldOptions.queuePageSize,
|
||||||
},
|
},
|
||||||
app: null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps the oldmarr options to the newmarr options
|
* Maps the oldmarr options to the newmarr options
|
||||||
* @param kind item kind to map
|
* @param type old widget type
|
||||||
* @param oldOptions oldmarr options for this item
|
* @param oldOptions oldmarr options for this item
|
||||||
* @param appsMap map of old app ids to new app ids
|
* @param appsMap map of old app ids to new app ids
|
||||||
* @returns newmarr options for this item or null if the item did not exist in oldmarr
|
* @returns newmarr options for this item or null if the item did not exist in oldmarr
|
||||||
*/
|
*/
|
||||||
export const mapOptions = <K extends WidgetKind>(
|
export const mapOptions = <K extends OldmarrWidgetDefinitions["id"]>(
|
||||||
kind: K,
|
type: K,
|
||||||
oldOptions: Extract<OldmarrWidgetDefinitions, { id: WidgetMapping[K] }>["options"],
|
oldOptions: Extract<OldmarrWidgetDefinitions, { id: K }>["options"],
|
||||||
appsMap: Map<string, string>,
|
appsMap: Map<string, string>,
|
||||||
) => {
|
) => {
|
||||||
logger.debug(`Mapping old homarr options for widget kind=${kind} options=${JSON.stringify(oldOptions)}`);
|
logger.debug(`Mapping old homarr options for widget type=${type} options=${JSON.stringify(oldOptions)}`);
|
||||||
if (optionMapping[kind] === null) {
|
const kind = mapKind(type);
|
||||||
|
if (!kind) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapping = optionMapping[kind];
|
const mapping = optionMapping[kind];
|
||||||
return objectEntries(mapping).reduce(
|
return objectEntries(mapping).reduce(
|
||||||
(acc, [key, value]) => {
|
(acc, [key, value]: [string, (oldOptions: Record<string, unknown>, appsMap: Map<string, string>) => unknown]) => {
|
||||||
const newValue = value(oldOptions as never, appsMap);
|
const newValue = value(oldOptions, appsMap);
|
||||||
logger.debug(`Mapping old homarr option kind=${kind} key=${key as string} newValue=${newValue as string}`);
|
logger.debug(`Mapping old homarr option kind=${kind} key=${key} newValue=${newValue as string}`);
|
||||||
if (newValue !== undefined) {
|
if (newValue !== undefined) {
|
||||||
acc[key as string] = newValue;
|
acc[key] = newValue;
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
{} as Record<string, unknown>,
|
{} as Record<string, unknown>,
|
||||||
) as WidgetComponentProps<K>["options"];
|
) as WidgetComponentProps<Exclude<WidgetMapping[K], null>>["options"];
|
||||||
};
|
};
|
||||||
@@ -5,6 +5,7 @@ export {
|
|||||||
createItemAndIntegrationChannel,
|
createItemAndIntegrationChannel,
|
||||||
createItemChannel,
|
createItemChannel,
|
||||||
createIntegrationOptionsChannel,
|
createIntegrationOptionsChannel,
|
||||||
|
createWidgetOptionsChannel,
|
||||||
createChannelWithLatestAndEvents,
|
createChannelWithLatestAndEvents,
|
||||||
handshakeAsync,
|
handshakeAsync,
|
||||||
createSubPubChannel,
|
createSubPubChannel,
|
||||||
|
|||||||
@@ -183,6 +183,16 @@ export const createIntegrationOptionsChannel = <TData>(
|
|||||||
return createChannelWithLatestAndEvents<TData>(channelName);
|
return createChannelWithLatestAndEvents<TData>(channelName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const createWidgetOptionsChannel = <TData>(
|
||||||
|
widgetKind: WidgetKind,
|
||||||
|
queryKey: string,
|
||||||
|
options: Record<string, unknown>,
|
||||||
|
) => {
|
||||||
|
const optionsKey = hashObjectBase64(options);
|
||||||
|
const channelName = `widget:${widgetKind}:${queryKey}:options:${optionsKey}`;
|
||||||
|
return createChannelWithLatestAndEvents<TData>(channelName);
|
||||||
|
};
|
||||||
|
|
||||||
export const createItemChannel = <TData>(itemId: string) => {
|
export const createItemChannel = <TData>(itemId: string) => {
|
||||||
return createChannelWithLatestAndEvents<TData>(`item:${itemId}`);
|
return createChannelWithLatestAndEvents<TData>(`item:${itemId}`);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"@homarr/log": "workspace:^0.1.0",
|
"@homarr/log": "workspace:^0.1.0",
|
||||||
"@homarr/redis": "workspace:^0.1.0",
|
"@homarr/redis": "workspace:^0.1.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"octokit": "^4.0.2",
|
"octokit": "^4.0.3",
|
||||||
"pretty-print-error": "^1.1.2",
|
"pretty-print-error": "^1.1.2",
|
||||||
"superjson": "2.2.2"
|
"superjson": "2.2.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import type { Duration } from "dayjs/plugin/duration";
|
||||||
|
|
||||||
|
import type { WidgetKind } from "@homarr/definitions";
|
||||||
|
import { createWidgetOptionsChannel } from "@homarr/redis";
|
||||||
|
|
||||||
|
import { createCachedRequestHandler } from "./cached-request-handler";
|
||||||
|
|
||||||
|
interface Options<TData, TKind extends WidgetKind, TInput extends Record<string, unknown>> {
|
||||||
|
// Unique key for this request handler
|
||||||
|
queryKey: string;
|
||||||
|
requestAsync: (input: TInput) => Promise<TData>;
|
||||||
|
cacheDuration: Duration;
|
||||||
|
widgetKind: TKind;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const createCachedWidgetRequestHandler = <
|
||||||
|
TData,
|
||||||
|
TKind extends WidgetKind,
|
||||||
|
TInput extends Record<string, unknown>,
|
||||||
|
>(
|
||||||
|
requestHandlerOptions: Options<TData, TKind, TInput>,
|
||||||
|
) => {
|
||||||
|
return {
|
||||||
|
handler: (widgetOptions: TInput) =>
|
||||||
|
createCachedRequestHandler({
|
||||||
|
queryKey: requestHandlerOptions.queryKey,
|
||||||
|
requestAsync: async (input: TInput) => {
|
||||||
|
return await requestHandlerOptions.requestAsync(input);
|
||||||
|
},
|
||||||
|
cacheDuration: requestHandlerOptions.cacheDuration,
|
||||||
|
createRedisChannel(input, options) {
|
||||||
|
return createWidgetOptionsChannel<TData>(requestHandlerOptions.widgetKind, options.queryKey, input);
|
||||||
|
},
|
||||||
|
}).handler(widgetOptions),
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import dayjs from "dayjs";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { fetchWithTimeout } from "@homarr/common";
|
||||||
|
|
||||||
|
import { createCachedWidgetRequestHandler } from "./lib/cached-widget-request-handler";
|
||||||
|
|
||||||
|
export const minecraftServerStatusRequestHandler = createCachedWidgetRequestHandler({
|
||||||
|
queryKey: "minecraftServerStatusApiResult",
|
||||||
|
widgetKind: "minecraftServerStatus",
|
||||||
|
async requestAsync(input: { domain: string; isBedrockServer: boolean }) {
|
||||||
|
const path = `/3/${input.isBedrockServer ? "bedrock/" : ""}${input.domain}`;
|
||||||
|
|
||||||
|
const response = await fetchWithTimeout(`https://api.mcsrvstat.us${path}`);
|
||||||
|
return responseSchema.parse(await response.json());
|
||||||
|
},
|
||||||
|
cacheDuration: dayjs.duration(5, "minutes"),
|
||||||
|
});
|
||||||
|
|
||||||
|
const responseSchema = z
|
||||||
|
.object({
|
||||||
|
online: z.literal(false),
|
||||||
|
})
|
||||||
|
.or(
|
||||||
|
z.object({
|
||||||
|
online: z.literal(true),
|
||||||
|
players: z.object({
|
||||||
|
online: z.number(),
|
||||||
|
max: z.number(),
|
||||||
|
}),
|
||||||
|
icon: z.string().optional(),
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
export type MinecraftServerStatus = z.infer<typeof responseSchema>;
|
||||||
@@ -32,12 +32,12 @@
|
|||||||
"@homarr/modals-collection": "workspace:^0.1.0",
|
"@homarr/modals-collection": "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",
|
||||||
"@mantine/core": "^7.15.1",
|
"@mantine/core": "^7.15.2",
|
||||||
"@mantine/hooks": "^7.15.1",
|
"@mantine/hooks": "^7.15.2",
|
||||||
"@mantine/spotlight": "^7.15.1",
|
"@mantine/spotlight": "^7.15.2",
|
||||||
"@tabler/icons-react": "^3.26.0",
|
"@tabler/icons-react": "^3.26.0",
|
||||||
"jotai": "^2.10.4",
|
"jotai": "^2.11.0",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"use-deep-compare-effect": "^1.8.1"
|
"use-deep-compare-effect": "^1.8.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,14 +4,25 @@ import { ChildrenActionItem } from "./items/children-action-item";
|
|||||||
interface SpotlightChildrenActionsProps {
|
interface SpotlightChildrenActionsProps {
|
||||||
childrenOptions: inferSearchInteractionOptions<"children">;
|
childrenOptions: inferSearchInteractionOptions<"children">;
|
||||||
query: string;
|
query: string;
|
||||||
|
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SpotlightChildrenActions = ({ childrenOptions, query }: SpotlightChildrenActionsProps) => {
|
export const SpotlightChildrenActions = ({
|
||||||
|
childrenOptions,
|
||||||
|
query,
|
||||||
|
setChildrenOptions,
|
||||||
|
}: SpotlightChildrenActionsProps) => {
|
||||||
const actions = childrenOptions.useActions(childrenOptions.option, query);
|
const actions = childrenOptions.useActions(childrenOptions.option, query);
|
||||||
|
|
||||||
return actions
|
return actions
|
||||||
.filter((action) => (typeof action.hide === "function" ? !action.hide(childrenOptions.option) : !action.hide))
|
.filter((action) => (typeof action.hide === "function" ? !action.hide(childrenOptions.option) : !action.hide))
|
||||||
.map((action) => (
|
.map((action) => (
|
||||||
<ChildrenActionItem key={action.key} childrenOptions={childrenOptions} query={query} action={action} />
|
<ChildrenActionItem
|
||||||
|
key={action.key}
|
||||||
|
childrenOptions={childrenOptions}
|
||||||
|
query={query}
|
||||||
|
action={action}
|
||||||
|
setChildrenOptions={setChildrenOptions}
|
||||||
|
/>
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
@@ -8,9 +8,10 @@ interface ChildrenActionItemProps {
|
|||||||
childrenOptions: inferSearchInteractionOptions<"children">;
|
childrenOptions: inferSearchInteractionOptions<"children">;
|
||||||
query: string;
|
query: string;
|
||||||
action: ReturnType<inferSearchInteractionOptions<"children">["useActions"]>[number];
|
action: ReturnType<inferSearchInteractionOptions<"children">["useActions"]>[number];
|
||||||
|
setChildrenOptions: (options: inferSearchInteractionOptions<"children">) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ChildrenActionItem = ({ childrenOptions, action, query }: ChildrenActionItemProps) => {
|
export const ChildrenActionItem = ({ childrenOptions, action, query, setChildrenOptions }: ChildrenActionItemProps) => {
|
||||||
const interaction = action.useInteraction(childrenOptions.option, query);
|
const interaction = action.useInteraction(childrenOptions.option, query);
|
||||||
|
|
||||||
const renderRoot =
|
const renderRoot =
|
||||||
@@ -20,10 +21,20 @@ export const ChildrenActionItem = ({ childrenOptions, action, query }: ChildrenA
|
|||||||
}
|
}
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
const onClick = interaction.type === "javaScript" ? interaction.onSelect : undefined;
|
const onClick =
|
||||||
|
interaction.type === "javaScript"
|
||||||
|
? interaction.onSelect
|
||||||
|
: interaction.type === "children"
|
||||||
|
? () => setChildrenOptions(interaction)
|
||||||
|
: undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Spotlight.Action renderRoot={renderRoot} onClick={onClick} className={classes.spotlightAction}>
|
<Spotlight.Action
|
||||||
|
renderRoot={renderRoot}
|
||||||
|
onClick={onClick}
|
||||||
|
closeSpotlightOnTrigger={interaction.type !== "children"}
|
||||||
|
className={classes.spotlightAction}
|
||||||
|
>
|
||||||
<action.Component {...childrenOptions.option} />
|
<action.Component {...childrenOptions.option} />
|
||||||
</Spotlight.Action>
|
</Spotlight.Action>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -140,7 +140,11 @@ const SpotlightWithActiveMode = ({ modeState, activeMode, defaultMode }: Spotlig
|
|||||||
|
|
||||||
<MantineSpotlight.ActionsList>
|
<MantineSpotlight.ActionsList>
|
||||||
{childrenOptions ? (
|
{childrenOptions ? (
|
||||||
<SpotlightChildrenActions childrenOptions={childrenOptions} query={query} />
|
<SpotlightChildrenActions
|
||||||
|
childrenOptions={childrenOptions}
|
||||||
|
query={query}
|
||||||
|
setChildrenOptions={setChildrenOptions}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<SpotlightActionGroups
|
<SpotlightActionGroups
|
||||||
setMode={(mode) => {
|
setMode={(mode) => {
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ export interface CreateChildrenOptionsProps<TParentOptions extends Record<string
|
|||||||
export interface ChildrenAction<TParentOptions extends Record<string, unknown>> {
|
export interface ChildrenAction<TParentOptions extends Record<string, unknown>> {
|
||||||
key: string;
|
key: string;
|
||||||
Component: (option: TParentOptions) => JSX.Element;
|
Component: (option: TParentOptions) => JSX.Element;
|
||||||
useInteraction: (option: TParentOptions, query: string) => inferSearchInteractionDefinition<"link" | "javaScript">;
|
useInteraction: (
|
||||||
|
option: TParentOptions,
|
||||||
|
query: string,
|
||||||
|
) => inferSearchInteractionDefinition<"link" | "javaScript" | "children">;
|
||||||
hide?: boolean | ((option: TParentOptions) => boolean);
|
hide?: boolean | ((option: TParentOptions) => boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
import { Group, Image, Kbd, Stack, Text } from "@mantine/core";
|
import { Group, Image, Kbd, Stack, Text } from "@mantine/core";
|
||||||
import { IconSearch } from "@tabler/icons-react";
|
import { IconDownload, IconSearch } 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";
|
||||||
|
import type { IntegrationKind } from "@homarr/definitions";
|
||||||
|
import { getIntegrationKindsByCategory, getIntegrationName } from "@homarr/definitions";
|
||||||
|
import { useModalAction } from "@homarr/modals";
|
||||||
|
import { RequestMediaModal } from "@homarr/modals-collection";
|
||||||
import { useScopedI18n } from "@homarr/translation/client";
|
import { useScopedI18n } from "@homarr/translation/client";
|
||||||
|
|
||||||
import { createChildrenOptions } from "../../lib/children";
|
import { createChildrenOptions } from "../../lib/children";
|
||||||
@@ -11,6 +15,100 @@ import { interaction } from "../../lib/interaction";
|
|||||||
|
|
||||||
type SearchEngine = RouterOutputs["searchEngine"]["search"][number];
|
type SearchEngine = RouterOutputs["searchEngine"]["search"][number];
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
||||||
|
type MediaRequestChildrenProps = {
|
||||||
|
result: {
|
||||||
|
id: number;
|
||||||
|
image?: string;
|
||||||
|
name: string;
|
||||||
|
link: string;
|
||||||
|
text?: string;
|
||||||
|
type: "tv" | "movie";
|
||||||
|
inLibrary: boolean;
|
||||||
|
};
|
||||||
|
integration: {
|
||||||
|
kind: IntegrationKind;
|
||||||
|
url: string;
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const mediaRequestsChildrenOptions = createChildrenOptions<MediaRequestChildrenProps>({
|
||||||
|
useActions() {
|
||||||
|
const { openModal } = useModalAction(RequestMediaModal);
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
key: "request",
|
||||||
|
hide: (option) => option.result.inLibrary,
|
||||||
|
Component(option) {
|
||||||
|
const t = useScopedI18n("search.mode.media");
|
||||||
|
return (
|
||||||
|
<Group mx="md" my="sm" wrap="nowrap">
|
||||||
|
<IconDownload stroke={1.5} />
|
||||||
|
{option.result.type === "tv" && <Text>{t("requestSeries")}</Text>}
|
||||||
|
{option.result.type === "movie" && <Text>{t("requestMovie")}</Text>}
|
||||||
|
</Group>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
useInteraction: interaction.javaScript((option) => ({
|
||||||
|
onSelect() {
|
||||||
|
openModal(
|
||||||
|
{
|
||||||
|
integrationId: option.integration.id,
|
||||||
|
mediaId: option.result.id,
|
||||||
|
mediaType: option.result.type,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title(t) {
|
||||||
|
return t("search.engine.media.request.modal.title", { name: option.result.name });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "open",
|
||||||
|
Component({ integration }) {
|
||||||
|
const tChildren = useScopedI18n("search.mode.media");
|
||||||
|
return (
|
||||||
|
<Group mx="md" my="sm" wrap="nowrap">
|
||||||
|
<IconSearch stroke={1.5} />
|
||||||
|
<Text>{tChildren("openIn", { kind: getIntegrationName(integration.kind) })}</Text>
|
||||||
|
</Group>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
useInteraction({ result }) {
|
||||||
|
return {
|
||||||
|
type: "link",
|
||||||
|
href: result.link,
|
||||||
|
newTab: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
|
DetailComponent({ options }) {
|
||||||
|
return (
|
||||||
|
<Group mx="md" my="sm" wrap="nowrap">
|
||||||
|
{options.result.image ? (
|
||||||
|
<Image src={options.result.image} w={35} h={50} fit="cover" radius={"md"} />
|
||||||
|
) : (
|
||||||
|
<IconSearch stroke={1.5} size={35} />
|
||||||
|
)}
|
||||||
|
<Stack gap={2}>
|
||||||
|
<Text>{options.result.name}</Text>
|
||||||
|
{options.result.text && (
|
||||||
|
<Text c="dimmed" size="sm" lineClamp={2}>
|
||||||
|
{options.result.text}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
</Group>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const searchEnginesChildrenOptions = createChildrenOptions<SearchEngine>({
|
export const searchEnginesChildrenOptions = createChildrenOptions<SearchEngine>({
|
||||||
useActions: (searchEngine, query) => {
|
useActions: (searchEngine, query) => {
|
||||||
const { data } = clientApi.integration.searchInIntegration.useQuery(
|
const { data } = clientApi.integration.searchInIntegration.useQuery(
|
||||||
@@ -64,10 +162,48 @@ export const searchEnginesChildrenOptions = createChildrenOptions<SearchEngine>(
|
|||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
useInteraction: interaction.link(() => ({
|
useInteraction(searchEngine) {
|
||||||
href: searchResult.link,
|
if (searchEngine.type !== "fromIntegration") {
|
||||||
newTab: true,
|
throw new Error("Invalid search engine type");
|
||||||
})),
|
}
|
||||||
|
|
||||||
|
if (!searchEngine.integration) {
|
||||||
|
throw new Error("Invalid search engine integration");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
getIntegrationKindsByCategory("mediaRequest").some(
|
||||||
|
(categoryKind) => categoryKind === searchEngine.integration?.kind,
|
||||||
|
) &&
|
||||||
|
"type" in searchResult
|
||||||
|
) {
|
||||||
|
const type = searchResult.type;
|
||||||
|
if (type === "person") {
|
||||||
|
return {
|
||||||
|
type: "link",
|
||||||
|
href: searchResult.link,
|
||||||
|
newTab: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: "children",
|
||||||
|
...mediaRequestsChildrenOptions({
|
||||||
|
result: {
|
||||||
|
...searchResult,
|
||||||
|
type,
|
||||||
|
},
|
||||||
|
integration: searchEngine.integration,
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: "link",
|
||||||
|
href: searchResult.link,
|
||||||
|
newTab: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
DetailComponent({ options }) {
|
DetailComponent({ options }) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"deepmerge": "4.3.1",
|
"deepmerge": "4.3.1",
|
||||||
"mantine-react-table": "2.0.0-beta.7",
|
"mantine-react-table": "2.0.0-beta.7",
|
||||||
"next": "^14.2.21",
|
"next": "^14.2.22",
|
||||||
"next-intl": "3.26.3",
|
"next-intl": "3.26.3",
|
||||||
"react": "^19.0.0"
|
"react": "^19.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1381,7 +1381,7 @@
|
|||||||
"memory": "crwdns5734:0{memory}crwdne5734:0",
|
"memory": "crwdns5734:0{memory}crwdne5734:0",
|
||||||
"memoryAvailable": "crwdns5736:0{memoryAvailable}crwdnd5736:0{percent}crwdne5736:0",
|
"memoryAvailable": "crwdns5736:0{memoryAvailable}crwdnd5736:0{percent}crwdne5736:0",
|
||||||
"version": "crwdns5738:0{version}crwdne5738:0",
|
"version": "crwdns5738:0{version}crwdne5738:0",
|
||||||
"uptime": "crwdns5740:0{days}crwdnd5740:0{hours}crwdnd5740:0{minutes}crwdne5740:0",
|
"uptime": "crwdns7008:0{months}crwdnd7008:0{days}crwdnd7008:0{hours}crwdnd7008:0{minutes}crwdne7008:0",
|
||||||
"loadAverage": "crwdns5742:0crwdne5742:0",
|
"loadAverage": "crwdns5742:0crwdne5742:0",
|
||||||
"minute": "crwdns5744:0crwdne5744:0",
|
"minute": "crwdns5744:0crwdne5744:0",
|
||||||
"minutes": "crwdns5746:0{count}crwdne5746:0",
|
"minutes": "crwdns5746:0{count}crwdne5746:0",
|
||||||
@@ -1457,7 +1457,12 @@
|
|||||||
"mediaServer": {
|
"mediaServer": {
|
||||||
"name": "crwdns5810:0crwdne5810:0",
|
"name": "crwdns5810:0crwdne5810:0",
|
||||||
"description": "crwdns5812:0crwdne5812:0",
|
"description": "crwdns5812:0crwdne5812:0",
|
||||||
"option": {}
|
"option": {},
|
||||||
|
"items": {
|
||||||
|
"user": "crwdns7010:0crwdne7010:0",
|
||||||
|
"name": "crwdns7012:0crwdne7012:0",
|
||||||
|
"id": "crwdns7014:0crwdne7014:0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "crwdns5814:0crwdne5814:0",
|
"name": "crwdns5814:0crwdne5814:0",
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1457,7 +1457,12 @@
|
|||||||
"mediaServer": {
|
"mediaServer": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"option": {}
|
"option": {},
|
||||||
|
"items": {
|
||||||
|
"user": "",
|
||||||
|
"name": "",
|
||||||
|
"id": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "",
|
"name": "",
|
||||||
|
|||||||
@@ -893,11 +893,11 @@
|
|||||||
"dynamic": {
|
"dynamic": {
|
||||||
"action": {
|
"action": {
|
||||||
"create": "Neuer dynamischer Abschnitt",
|
"create": "Neuer dynamischer Abschnitt",
|
||||||
"remove": ""
|
"remove": "Dynamischen Abschnitt entfernen"
|
||||||
},
|
},
|
||||||
"remove": {
|
"remove": {
|
||||||
"title": "",
|
"title": "Dynamischen Abschnitt entfernen",
|
||||||
"message": ""
|
"message": "Möchten Sie diesen dynamischen Abschnitt wirklich entfernen? Die Elemente werden an die gleiche Position im übergeordneten Abschnitt verschoben."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"category": {
|
"category": {
|
||||||
@@ -907,29 +907,29 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"create": "",
|
"create": "Neue Kategorie",
|
||||||
"edit": "",
|
"edit": "Kategorie umbenennen",
|
||||||
"remove": "",
|
"remove": "Kategorie entfernen",
|
||||||
"moveUp": "Nach oben bewegen",
|
"moveUp": "Nach oben bewegen",
|
||||||
"moveDown": "Nach unten bewegen",
|
"moveDown": "Nach unten bewegen",
|
||||||
"createAbove": "",
|
"createAbove": "Neue Kategorie oben",
|
||||||
"createBelow": ""
|
"createBelow": "Neue Kategorie unten"
|
||||||
},
|
},
|
||||||
"create": {
|
"create": {
|
||||||
"title": "",
|
"title": "Neue Kategorie",
|
||||||
"submit": ""
|
"submit": "Kategorie hinzufügen"
|
||||||
},
|
},
|
||||||
"remove": {
|
"remove": {
|
||||||
"title": "",
|
"title": "Kategorie entfernen",
|
||||||
"message": ""
|
"message": "Möchten Sie die Kategorie {name} wirklich entfernen?"
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"title": "",
|
"title": "Kategorie umbenennen",
|
||||||
"submit": ""
|
"submit": "Kategorie umbenennen"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"label": {
|
"label": {
|
||||||
"create": "",
|
"create": "Neue Kategorie",
|
||||||
"changePosition": "Position wechseln"
|
"changePosition": "Position wechseln"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -937,12 +937,12 @@
|
|||||||
},
|
},
|
||||||
"item": {
|
"item": {
|
||||||
"action": {
|
"action": {
|
||||||
"create": "",
|
"create": "Neues Element",
|
||||||
"import": "",
|
"import": "Element importieren",
|
||||||
"edit": "",
|
"edit": "Element bearbeiten",
|
||||||
"moveResize": "",
|
"moveResize": "Element verschieben/Größe ändern",
|
||||||
"duplicate": "",
|
"duplicate": "Element duplizieren",
|
||||||
"remove": ""
|
"remove": "Element löschen"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"label": {
|
"label": {
|
||||||
@@ -950,11 +950,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"create": {
|
"create": {
|
||||||
"title": "",
|
"title": "Wählen Sie das hinzuzufügende Element aus",
|
||||||
"addToBoard": ""
|
"addToBoard": "Zum Board hinzufügen"
|
||||||
},
|
},
|
||||||
"moveResize": {
|
"moveResize": {
|
||||||
"title": "",
|
"title": "Element verschieben/Größe ändern",
|
||||||
"field": {
|
"field": {
|
||||||
"width": {
|
"width": {
|
||||||
"label": "Breite"
|
"label": "Breite"
|
||||||
@@ -963,67 +963,67 @@
|
|||||||
"label": "Höhe"
|
"label": "Höhe"
|
||||||
},
|
},
|
||||||
"xOffset": {
|
"xOffset": {
|
||||||
"label": ""
|
"label": "X Versatz"
|
||||||
},
|
},
|
||||||
"yOffset": {
|
"yOffset": {
|
||||||
"label": ""
|
"label": "Y Versatz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"title": "",
|
"title": "Element bearbeiten",
|
||||||
"advancedOptions": {
|
"advancedOptions": {
|
||||||
"label": "",
|
"label": "Erweiterte Optionen",
|
||||||
"title": ""
|
"title": "Erweiterte Element Optionen"
|
||||||
},
|
},
|
||||||
"field": {
|
"field": {
|
||||||
"integrations": {
|
"integrations": {
|
||||||
"label": ""
|
"label": "Integrationen"
|
||||||
},
|
},
|
||||||
"customCssClasses": {
|
"customCssClasses": {
|
||||||
"label": ""
|
"label": "Benutzerdefinierte CSS Klassen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"remove": {
|
"remove": {
|
||||||
"title": "",
|
"title": "Element löschen",
|
||||||
"message": ""
|
"message": "Soll dieses Element wirklich entfernt werden?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"widget": {
|
"widget": {
|
||||||
"app": {
|
"app": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"description": "",
|
"description": "Bettet eine App in das Board ein.",
|
||||||
"option": {
|
"option": {
|
||||||
"appId": {
|
"appId": {
|
||||||
"label": ""
|
"label": "App auswählen"
|
||||||
},
|
},
|
||||||
"openInNewTab": {
|
"openInNewTab": {
|
||||||
"label": "In neuem Tab öffnen"
|
"label": "In neuem Tab öffnen"
|
||||||
},
|
},
|
||||||
"showTitle": {
|
"showTitle": {
|
||||||
"label": ""
|
"label": "App Namen anzeigen"
|
||||||
},
|
},
|
||||||
"showDescriptionTooltip": {
|
"showDescriptionTooltip": {
|
||||||
"label": ""
|
"label": "Beschreibungs Tooltip anzeigen"
|
||||||
},
|
},
|
||||||
"pingEnabled": {
|
"pingEnabled": {
|
||||||
"label": ""
|
"label": "Einfachen Ping aktivieren"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"notFound": {
|
"notFound": {
|
||||||
"label": "",
|
"label": "Keine App",
|
||||||
"tooltip": ""
|
"tooltip": "Sie haben keine gültige App ausgewählt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bookmarks": {
|
"bookmarks": {
|
||||||
"name": "",
|
"name": "Lesezeichen",
|
||||||
"description": "",
|
"description": "Zeigt mehrere App Links an",
|
||||||
"option": {
|
"option": {
|
||||||
"title": {
|
"title": {
|
||||||
"label": ""
|
"label": "Titel"
|
||||||
},
|
},
|
||||||
"layout": {
|
"layout": {
|
||||||
"label": "Ansicht",
|
"label": "Ansicht",
|
||||||
@@ -1040,7 +1040,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
"label": "",
|
"label": "Lesezeichen",
|
||||||
"add": ""
|
"add": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1376,16 +1376,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"popover": {
|
"popover": {
|
||||||
"information": "",
|
"information": "Informationen",
|
||||||
"processor": "",
|
"processor": "Prozessor: {cpuModelName}",
|
||||||
"memory": "",
|
"memory": "Speicher: {memory}GiB",
|
||||||
"memoryAvailable": "",
|
"memoryAvailable": "Verfügbar: {memoryAvailable} GiB ({percent}%)",
|
||||||
"version": "",
|
"version": "",
|
||||||
"uptime": "",
|
"uptime": "Laufzeit: {months} Monate, {days} Tage, {hours} Stunden, {minutes} Minuten",
|
||||||
"loadAverage": "",
|
"loadAverage": "Durchschnittliche Last:",
|
||||||
"minute": "",
|
"minute": "1 Minute",
|
||||||
"minutes": "",
|
"minutes": "{count} Minuten",
|
||||||
"used": "",
|
"used": "Belegt",
|
||||||
"available": "Verfügbar",
|
"available": "Verfügbar",
|
||||||
"lastSeen": ""
|
"lastSeen": ""
|
||||||
},
|
},
|
||||||
@@ -1422,7 +1422,7 @@
|
|||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"noData": "",
|
"noData": "Keine App gefunden",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
@@ -1457,7 +1457,12 @@
|
|||||||
"mediaServer": {
|
"mediaServer": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"option": {}
|
"option": {},
|
||||||
|
"items": {
|
||||||
|
"user": "",
|
||||||
|
"name": "",
|
||||||
|
"id": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "",
|
"name": "",
|
||||||
@@ -1735,11 +1740,11 @@
|
|||||||
"edit": {
|
"edit": {
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "",
|
"title": "Änderungen erfolgreich angewendet",
|
||||||
"message": ""
|
"message": ""
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Änderungen konnten nicht angewendet werden",
|
||||||
"message": ""
|
"message": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1981,15 +1986,15 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"noBoard": {
|
"noBoard": {
|
||||||
"title": "",
|
"title": "Willkommen bei Homarr",
|
||||||
"description": "",
|
"description": "",
|
||||||
"link": "",
|
"link": "Erstellen Sie Ihr erstes Board",
|
||||||
"notice": ""
|
"notice": ""
|
||||||
},
|
},
|
||||||
"notFound": {
|
"notFound": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"link": "",
|
"link": "Alle Boards anzeigen",
|
||||||
"notice": ""
|
"notice": ""
|
||||||
},
|
},
|
||||||
"homeBoard": {
|
"homeBoard": {
|
||||||
@@ -2013,7 +2018,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"management": {
|
"management": {
|
||||||
"metaTitle": "",
|
"metaTitle": "Verwaltung",
|
||||||
"title": {
|
"title": {
|
||||||
"morning": "",
|
"morning": "",
|
||||||
"afternoon": "",
|
"afternoon": "",
|
||||||
@@ -2028,15 +2033,15 @@
|
|||||||
"home": "Startseite",
|
"home": "Startseite",
|
||||||
"boards": "",
|
"boards": "",
|
||||||
"apps": "",
|
"apps": "",
|
||||||
"integrations": "",
|
"integrations": "Integrationen",
|
||||||
"searchEngies": "",
|
"searchEngies": "Suchmaschinen",
|
||||||
"medias": "",
|
"medias": "Medien",
|
||||||
"users": {
|
"users": {
|
||||||
"label": "Benutzer",
|
"label": "Benutzer",
|
||||||
"items": {
|
"items": {
|
||||||
"manage": "Verwalten",
|
"manage": "Verwalten",
|
||||||
"invites": "Einladungen",
|
"invites": "Einladungen",
|
||||||
"groups": ""
|
"groups": "Gruppen"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
@@ -2067,9 +2072,9 @@
|
|||||||
"board": "",
|
"board": "",
|
||||||
"user": "Benutzer",
|
"user": "Benutzer",
|
||||||
"invite": "Einladungen",
|
"invite": "Einladungen",
|
||||||
"integration": "",
|
"integration": "Integrationen",
|
||||||
"app": "",
|
"app": "",
|
||||||
"group": ""
|
"group": "Gruppen"
|
||||||
},
|
},
|
||||||
"statisticLabel": {
|
"statisticLabel": {
|
||||||
"boards": "",
|
"boards": "",
|
||||||
@@ -2160,7 +2165,7 @@
|
|||||||
"label": "Sicherheit"
|
"label": "Sicherheit"
|
||||||
},
|
},
|
||||||
"groups": {
|
"groups": {
|
||||||
"label": "",
|
"label": "Gruppen",
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
@@ -2168,10 +2173,10 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"completed": {
|
"completed": {
|
||||||
"title": ""
|
"title": "Benutzer erstellt"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": ""
|
"title": "Benutzer anlegen fehlgeschlagen"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -2223,7 +2228,7 @@
|
|||||||
"ownerOfGroupDeleted": ""
|
"ownerOfGroupDeleted": ""
|
||||||
},
|
},
|
||||||
"members": {
|
"members": {
|
||||||
"title": "",
|
"title": "Mitglieder",
|
||||||
"search": "",
|
"search": "",
|
||||||
"notFound": ""
|
"notFound": ""
|
||||||
},
|
},
|
||||||
@@ -2297,8 +2302,8 @@
|
|||||||
"defaultColorScheme": {
|
"defaultColorScheme": {
|
||||||
"label": "",
|
"label": "",
|
||||||
"options": {
|
"options": {
|
||||||
"light": "",
|
"light": "Hell",
|
||||||
"dark": ""
|
"dark": "Dunkel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2529,7 +2534,7 @@
|
|||||||
},
|
},
|
||||||
"tab": {
|
"tab": {
|
||||||
"user": "Benutzer",
|
"user": "Benutzer",
|
||||||
"group": "",
|
"group": "Gruppen",
|
||||||
"inherited": ""
|
"inherited": ""
|
||||||
},
|
},
|
||||||
"field": {
|
"field": {
|
||||||
@@ -2537,7 +2542,7 @@
|
|||||||
"label": "Benutzer"
|
"label": "Benutzer"
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"label": ""
|
"label": "Gruppe"
|
||||||
},
|
},
|
||||||
"permission": {
|
"permission": {
|
||||||
"label": ""
|
"label": ""
|
||||||
@@ -2555,7 +2560,7 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"integrations": {
|
"integrations": {
|
||||||
"label": "",
|
"label": "Integrationen",
|
||||||
"edit": {
|
"edit": {
|
||||||
"label": "Bearbeiten"
|
"label": "Bearbeiten"
|
||||||
},
|
},
|
||||||
@@ -2564,7 +2569,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"search-engines": {
|
"search-engines": {
|
||||||
"label": "",
|
"label": "Suchmaschinen",
|
||||||
"new": {
|
"new": {
|
||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
@@ -2573,7 +2578,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"medias": {
|
"medias": {
|
||||||
"label": ""
|
"label": "Medien"
|
||||||
},
|
},
|
||||||
"apps": {
|
"apps": {
|
||||||
"label": "",
|
"label": "",
|
||||||
@@ -2593,7 +2598,7 @@
|
|||||||
"security": "Sicherheit",
|
"security": "Sicherheit",
|
||||||
"board": "",
|
"board": "",
|
||||||
"groups": {
|
"groups": {
|
||||||
"label": ""
|
"label": "Gruppen"
|
||||||
},
|
},
|
||||||
"invites": {
|
"invites": {
|
||||||
"label": "Einladungen"
|
"label": "Einladungen"
|
||||||
@@ -2634,7 +2639,7 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"label": ""
|
"label": "App bearbeiten"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"detail": {
|
"detail": {
|
||||||
@@ -2662,7 +2667,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"integration": {
|
"integration": {
|
||||||
"title": ""
|
"title": "Integrationen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2676,8 +2681,8 @@
|
|||||||
"title": "",
|
"title": "",
|
||||||
"option": {
|
"option": {
|
||||||
"colorScheme": {
|
"colorScheme": {
|
||||||
"light": "",
|
"light": "Zum hellen Design wechseln",
|
||||||
"dark": ""
|
"dark": "Zum dunklen Design wechseln"
|
||||||
},
|
},
|
||||||
"language": {
|
"language": {
|
||||||
"label": "",
|
"label": "",
|
||||||
@@ -2721,7 +2726,7 @@
|
|||||||
"help": "",
|
"help": "",
|
||||||
"group": {
|
"group": {
|
||||||
"searchEngine": {
|
"searchEngine": {
|
||||||
"title": "",
|
"title": "Suchmaschinen",
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"search": {
|
"search": {
|
||||||
@@ -2828,7 +2833,7 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"manageLog": {
|
"manageLog": {
|
||||||
"label": ""
|
"label": "Logs anzeigen"
|
||||||
},
|
},
|
||||||
"manageTask": {
|
"manageTask": {
|
||||||
"label": ""
|
"label": ""
|
||||||
@@ -2866,7 +2871,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"title": "",
|
"title": "Gruppen",
|
||||||
"children": {
|
"children": {
|
||||||
"action": {
|
"action": {
|
||||||
"detail": {
|
"detail": {
|
||||||
@@ -2900,12 +2905,12 @@
|
|||||||
"label": ""
|
"label": ""
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"label": ""
|
"label": "Beschreibung"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"page": {
|
"page": {
|
||||||
"list": {
|
"list": {
|
||||||
"title": "",
|
"title": "Suchmaschinen",
|
||||||
"noResults": {
|
"noResults": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"action": ""
|
"action": ""
|
||||||
@@ -2929,11 +2934,11 @@
|
|||||||
"title": "",
|
"title": "",
|
||||||
"notification": {
|
"notification": {
|
||||||
"success": {
|
"success": {
|
||||||
"title": "",
|
"title": "Änderungen erfolgreich angewendet",
|
||||||
"message": ""
|
"message": ""
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"title": "",
|
"title": "Änderungen konnten nicht angewendet werden",
|
||||||
"message": ""
|
"message": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1457,7 +1457,12 @@
|
|||||||
"mediaServer": {
|
"mediaServer": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"option": {}
|
"option": {},
|
||||||
|
"items": {
|
||||||
|
"user": "",
|
||||||
|
"name": "",
|
||||||
|
"id": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "",
|
"name": "",
|
||||||
|
|||||||
@@ -612,6 +612,10 @@
|
|||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"label": "Url"
|
"label": "Url"
|
||||||
|
},
|
||||||
|
"attemptSearchEngineCreation": {
|
||||||
|
"label": "Create Search Engine",
|
||||||
|
"description": "Integration \"{kind}\" can be used with the search engines. Check this to automatically configure the search engine."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
@@ -1151,6 +1155,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"minecraftServerStatus": {
|
||||||
|
"name": "Minecraft Server Status",
|
||||||
|
"description": "Displays the status of a Minecraft server",
|
||||||
|
"option": {
|
||||||
|
"title": {
|
||||||
|
"label": "Title"
|
||||||
|
},
|
||||||
|
"domain": {
|
||||||
|
"label": "Server address"
|
||||||
|
},
|
||||||
|
"isBedrockServer": {
|
||||||
|
"label": "Bedrock server"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"online": "Online",
|
||||||
|
"offline": "Offline"
|
||||||
|
}
|
||||||
|
},
|
||||||
"notebook": {
|
"notebook": {
|
||||||
"name": "Notebook",
|
"name": "Notebook",
|
||||||
"description": "A simple notebook widget that supports markdown",
|
"description": "A simple notebook widget that supports markdown",
|
||||||
@@ -1381,7 +1404,7 @@
|
|||||||
"memory": "Memory: {memory}GiB",
|
"memory": "Memory: {memory}GiB",
|
||||||
"memoryAvailable": "Available: {memoryAvailable}GiB ({percent}%)",
|
"memoryAvailable": "Available: {memoryAvailable}GiB ({percent}%)",
|
||||||
"version": "Version: {version}",
|
"version": "Version: {version}",
|
||||||
"uptime": "Uptime: {days} Days, {hours} Hours, {minutes} Minutes",
|
"uptime": "Uptime: {months} Months, {days} Days, {hours} Hours, {minutes} Minutes",
|
||||||
"loadAverage": "Load average:",
|
"loadAverage": "Load average:",
|
||||||
"minute": "1 minute",
|
"minute": "1 minute",
|
||||||
"minutes": "{count} minutes",
|
"minutes": "{count} minutes",
|
||||||
@@ -1457,7 +1480,12 @@
|
|||||||
"mediaServer": {
|
"mediaServer": {
|
||||||
"name": "Current media server streams",
|
"name": "Current media server streams",
|
||||||
"description": "Show the current streams on your media servers",
|
"description": "Show the current streams on your media servers",
|
||||||
"option": {}
|
"option": {},
|
||||||
|
"items": {
|
||||||
|
"user": "User",
|
||||||
|
"name": "Name",
|
||||||
|
"id": "Id"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "Download Client",
|
"name": "Download Client",
|
||||||
@@ -2319,6 +2347,9 @@
|
|||||||
"error": "Error"
|
"error": "Error"
|
||||||
},
|
},
|
||||||
"job": {
|
"job": {
|
||||||
|
"minecraftServerStatus": {
|
||||||
|
"label": "Minecraft server status"
|
||||||
|
},
|
||||||
"iconsUpdater": {
|
"iconsUpdater": {
|
||||||
"label": "Icons Updater"
|
"label": "Icons Updater"
|
||||||
},
|
},
|
||||||
@@ -2717,6 +2748,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"media": {
|
||||||
|
"requestMovie": "Request movie",
|
||||||
|
"requestSeries": "Request series",
|
||||||
|
"openIn": "Open in {kind}"
|
||||||
|
},
|
||||||
"external": {
|
"external": {
|
||||||
"help": "Use an external search engine",
|
"help": "Use an external search engine",
|
||||||
"group": {
|
"group": {
|
||||||
@@ -2957,6 +2993,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"media": {
|
||||||
|
"request": {
|
||||||
|
"modal": {
|
||||||
|
"title": "Request \"{name}\"",
|
||||||
|
"table": {
|
||||||
|
"header": {
|
||||||
|
"season": "Season",
|
||||||
|
"episodes": "Episodes"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"button": {
|
||||||
|
"send": "Send request"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1457,7 +1457,12 @@
|
|||||||
"mediaServer": {
|
"mediaServer": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
"option": {}
|
"option": {},
|
||||||
|
"items": {
|
||||||
|
"user": "",
|
||||||
|
"name": "",
|
||||||
|
"id": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"downloads": {
|
"downloads": {
|
||||||
"name": "",
|
"name": "",
|
||||||
|
|||||||
Loaded 100 of 143 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user