diff --git a/web/src/components/InsertModal.tsx b/web/src/components/InsertModal.tsx index 64a5039..209433c 100644 --- a/web/src/components/InsertModal.tsx +++ b/web/src/components/InsertModal.tsx @@ -11,8 +11,12 @@ import { DialogDescription, DialogHeader, DialogTitle, - DialogTrigger, } from "@/components/ui/dialog"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import * as React from "react"; import { useState } from "react"; import type { UnknownKeysParam, ZodObject, ZodRawShape, z } from "zod"; @@ -22,6 +26,8 @@ export function InsertModal< Y extends UnknownKeysParam, Z extends ZodObject >(props: { + tooltip?: string; + disabled?: boolean; title: string; description: string; serverAction: (data: z.infer) => Promise; @@ -33,11 +39,37 @@ export function InsertModal< return ( - - + + +

{props.tooltip}

+
+ + ) : ( + -
+ )} + {/* */} {props.title} diff --git a/web/src/components/MachineList.tsx b/web/src/components/MachineList.tsx index 6360196..ea5e87c 100644 --- a/web/src/components/MachineList.tsx +++ b/web/src/components/MachineList.tsx @@ -304,13 +304,15 @@ export function MachineList({ data }: { data: Machine[] }) { />
- machine.type === "comfy-deploy-serverless" + )} + tooltip={ + data.some((machine) => machine.type === "comfy-deploy-serverless") + ? "Only one hosted machine at preview stage" + : undefined + } + title="New Machine" description="Add custom Comfyui machines to your account." serverAction={addCustomMachine} formSchema={addCustomMachineSchema} @@ -331,6 +333,12 @@ export function MachineList({ data }: { data: Machine[] }) { }, }} /> +
diff --git a/web/src/components/PaginationControl.tsx b/web/src/components/PaginationControl.tsx index b805655..b35871c 100644 --- a/web/src/components/PaginationControl.tsx +++ b/web/src/components/PaginationControl.tsx @@ -29,7 +29,7 @@ export function PaginationControl(props: { ); return ( - + , VariantProps { asChild?: boolean; + as?: React.ElementType; } const Button = React.forwardRef( - ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + ( + { className, variant, size, asChild = false, as = "button", ...props }, + ref + ) => { + const Comp = asChild ? Slot : as; return (