feat: support aria2 integration (#2226)

This commit is contained in:
Kudou Sterain
2025-04-11 02:40:40 +07:00
committed by GitHub
parent 4b0b892250
commit 94263c445b
19 changed files with 473 additions and 18 deletions

View File

@@ -63,6 +63,9 @@ export const { definition, componentLoader } = createWidgetDefinition("downloads
showCompletedTorrent: factory.switch({
defaultValue: true,
}),
showCompletedHttp: factory.switch({
defaultValue: true,
}),
activeTorrentThreshold: factory.number({
//in KiB/s
validate: z.number().min(0),
@@ -95,6 +98,10 @@ export const { definition, componentLoader } = createWidgetDefinition("downloads
shouldHide: (_, integrationKinds) =>
!getIntegrationKindsByCategory("torrent").some((kinds) => integrationKinds.includes(kinds)),
},
showCompletedHttp: {
shouldHide: (_, integrationKinds) =>
!getIntegrationKindsByCategory("miscellaneous").some((kinds) => integrationKinds.includes(kinds)),
},
activeTorrentThreshold: {
shouldHide: (_, integrationKinds) =>
!getIntegrationKindsByCategory("torrent").some((kinds) => integrationKinds.includes(kinds)),