diff --git a/frontend/src/components/WidgetConfigDialog.tsx b/frontend/src/components/WidgetConfigDialog.tsx index f898b30..e70ff23 100644 --- a/frontend/src/components/WidgetConfigDialog.tsx +++ b/frontend/src/components/WidgetConfigDialog.tsx @@ -26,6 +26,8 @@ import { } from "../hooks/useWidgets"; import { useServiceInstances } from "../hooks/useServices"; import { useTasks } from "../hooks/useSettings"; +import { useIsMobile } from "../hooks/useIsMobile"; +import { SheetForm } from "@/components/ui/sheet-form"; import type { WidgetInstance, WidgetInstanceInput } from "../types"; import { BUILTIN_WIDGETS, @@ -277,201 +279,215 @@ export function WidgetConfigDialog({ open, onClose }: Props) { ]?.widgets.find((w) => w.kind === draft.widgetKind) : BUILTIN_WIDGETS[draft.widgetKind] : undefined; + const isMobile = useIsMobile(); const isTaskOutput = draft?.serviceId !== null && services.find((s) => s.id === draft?.serviceId)?.service_type === "ssh_tasks"; + // The draft body (Title/SortOrder/Enabled/config editor) is shared between + // the Dialog (desktop) and SheetForm (mobile). On mobile the inline + // Back/Save buttons are omitted because the SheetForm footer provides them. + const draftBody = draft ? ( +
Add widget
++ Configure services on their service pages to unlock more widgets. +
+