17 lines
618 B
TypeScript
17 lines
618 B
TypeScript
import { IconVideo } from "@tabler/icons-react";
|
|
|
|
import { getIntegrationKindsByCategory } from "@homarr/definitions";
|
|
|
|
import { createWidgetDefinition } from "../definition";
|
|
import { optionsBuilder } from "../options";
|
|
|
|
export const { componentLoader, definition } = createWidgetDefinition("mediaServer", {
|
|
icon: IconVideo,
|
|
createOptions() {
|
|
return optionsBuilder.from((factory) => ({
|
|
showOnlyPlaying: factory.switch({ defaultValue: true, withDescription: true }),
|
|
}));
|
|
},
|
|
supportedIntegrations: getIntegrationKindsByCategory("mediaService"),
|
|
}).withDynamicImport(() => import("./component"));
|