Files
homarr/packages/widgets/src/media-transcoding/index.ts
Meier Lukas c43a2f0488 refactor: move zod import from validation package to zod (#2111)
* refactor: move zod import from validation package to zod

* refactor: move missing zod imports
2025-01-26 22:16:27 +01:00

22 lines
779 B
TypeScript

import { IconTransform } from "@tabler/icons-react";
import { z } from "zod";
import { createWidgetDefinition } from "../definition";
import { optionsBuilder } from "../options";
export const { componentLoader, definition } = createWidgetDefinition("mediaTranscoding", {
icon: IconTransform,
options: optionsBuilder.from((factory) => ({
defaultView: factory.select({
defaultValue: "statistics",
options: [
{ label: "Workers", value: "workers" },
{ label: "Queue", value: "queue" },
{ label: "Statistics", value: "statistics" },
],
}),
queuePageSize: factory.number({ defaultValue: 10, validate: z.number().min(1).max(30) }),
})),
supportedIntegrations: ["tdarr"],
}).withDynamicImport(() => import("./component"));