feat: radarr release type to calendar widget (#1256)
* feat: add release type * fix: type check * fix: deepSource * fix: new approach * fix: deepSource * fix: typecheck * fix: reviewed changes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { IconCalendar } from "@tabler/icons-react";
|
||||
|
||||
import { getIntegrationKindsByCategory } from "@homarr/definitions";
|
||||
import { radarrReleaseTypes } from "@homarr/integrations/types";
|
||||
import { z } from "@homarr/validation";
|
||||
|
||||
import { createWidgetDefinition } from "../definition";
|
||||
@@ -9,6 +10,13 @@ import { optionsBuilder } from "../options";
|
||||
export const { definition, componentLoader } = createWidgetDefinition("calendar", {
|
||||
icon: IconCalendar,
|
||||
options: optionsBuilder.from((factory) => ({
|
||||
releaseType: factory.multiSelect({
|
||||
defaultValue: ["inCinemas", "digitalRelease"],
|
||||
options: radarrReleaseTypes.map((value) => ({
|
||||
value,
|
||||
label: (t) => t(`widget.calendar.option.releaseType.options.${value}`),
|
||||
})),
|
||||
}),
|
||||
filterPastMonths: factory.number({
|
||||
validate: z.number().min(2).max(9999),
|
||||
defaultValue: 2,
|
||||
|
||||
Reference in New Issue
Block a user