feat: modernize dashboard widgets

This commit is contained in:
Thomas Camlong committed 2026-08-01 21:14:33 +02:00
1 parent fcc5130068
commit d421046d15
286 files changed
+9664 -3282

No files matched your search

+17 -1
View File
@@ -1,4 +1,4 @@
import { IconReportSearch, IconServerOff } from "@tabler/icons-react";
import { IconReportSearch, IconServerOff, IconTestPipe } from "@tabler/icons-react";
import { getIntegrationKindsByCategory } from "@homarr/definitions";
@@ -7,6 +7,22 @@ import { optionsBuilder } from "../options";
export const { definition, componentLoader } = createWidgetDefinition("indexerManager", {
icon: IconReportSearch,
queryKey: [["widget", "indexerManager"]],
contextActions: ({ widgetStateRef, context }) => [
{
key: "test-all-indexers",
label: (t) => t("widget.indexerManager.testAll"),
icon: IconTestPipe,
disabled:
context.isEditMode ||
!context.canInteractWithSelectedIntegrations ||
typeof widgetStateRef.current?.testAllIndexers !== "function",
onClick: () => {
const action = widgetStateRef.current?.testAllIndexers;
if (typeof action === "function") action();
},
},
],
refetchInterval: null,
createOptions() {
return optionsBuilder.from((factory) => ({