Files
homarr/packages/widgets/src/paperless-ngx/index.ts
T
Thomas Camlong c9f003dadd feat: add Uptime Kuma, Audiobookshelf, Paperless-ngx, and Navidrome integrations
Add four new integrations with full widget support:

- Uptime Kuma: dashboard monitors, uptime percentage ring, status counts
- Audiobookshelf: library stats, audiobooks/podcasts counts, listening time
- Paperless-ngx: document stats, inbox ratio ring, correspondents/tags
- Navidrome: artist/album/song counts, now playing with track list

Also adds a unified "Audio Stats" widget that merges Navidrome and
Audiobookshelf into a single configurable widget with backend-specific
option visibility.

Includes Vitest specs for pagination, status mapping, and shared utils.
2026-06-09 18:09:22 +02:00

49 lines
1.4 KiB
TypeScript

import { IconFileText, IconServerOff } from "@tabler/icons-react";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";
export const { definition, componentLoader } = createWidgetDefinition("paperlessNgx", {
icon: IconFileText,
supportedIntegrations: ["paperlessNgx"],
integrationsRequired: true,
createOptions() {
return optionsBuilder.from((factory) => ({
showInboxRatio: factory.switch({
defaultValue: true,
withDescription: true,
}),
showInboxRing: factory.switch({
defaultValue: true,
withDescription: true,
}),
showDocumentsTotal: factory.switch({
defaultValue: true,
withDescription: true,
}),
showDocumentsInbox: factory.switch({
defaultValue: true,
withDescription: true,
}),
showCorrespondents: factory.switch({
defaultValue: true,
withDescription: true,
}),
showTags: factory.switch({
defaultValue: true,
withDescription: true,
}),
showDocumentTypes: factory.switch({
defaultValue: true,
withDescription: true,
}),
}));
},
errors: {
INTERNAL_SERVER_ERROR: {
icon: IconServerOff,
message: (t) => t("widget.paperlessNgx.error.internalServerError"),
},
},
}).withDynamicImport(() => import("./component"));