feat(widgets): add missing & queued media widget for Radarr and Sonarr (#6078)
Co-authored-by: Thomas <thomas@ajnart.fr>
This commit is contained in:
1 parent
713fcd6f3f
commit
9fb2e37605
26 files changed
+930
-10
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { IconMovie } from "@tabler/icons-react";
|
||||
|
||||
import { getIntegrationKindsByCategory } from "@homarr/definitions";
|
||||
|
||||
import { createWidgetDefinition } from "../definition";
|
||||
import { optionsBuilder } from "../options";
|
||||
|
||||
const pageSizeOptions = ["10", "20", "30", "50"] as const;
|
||||
|
||||
export const { componentLoader, definition } = createWidgetDefinition("mediaMissing", {
|
||||
icon: IconMovie,
|
||||
createOptions() {
|
||||
return optionsBuilder.from((factory) => ({
|
||||
showMissing: factory.switch({ defaultValue: true }),
|
||||
showQueued: factory.switch({ defaultValue: true }),
|
||||
pageSize: factory.select({
|
||||
defaultValue: "10",
|
||||
options: pageSizeOptions.map((value) => ({
|
||||
value,
|
||||
label: value,
|
||||
})),
|
||||
}),
|
||||
}));
|
||||
},
|
||||
supportedIntegrations: getIntegrationKindsByCategory("mediaOrganizer"),
|
||||
}).withDynamicImport(() => import("./component"));
|
||||
Reference in new issue
Block a user