From 24e95a1954f33f782a2aaccf928885ee88c801d7 Mon Sep 17 00:00:00 2001 From: bennykok Date: Mon, 29 Jan 2024 13:38:00 +0800 Subject: [PATCH] fix: add machine model dialog --- web/src/components/InsertModal.tsx | 3 ++- web/src/components/MachineList.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/components/InsertModal.tsx b/web/src/components/InsertModal.tsx index 7df456a..523bbc8 100644 --- a/web/src/components/InsertModal.tsx +++ b/web/src/components/InsertModal.tsx @@ -31,6 +31,7 @@ export function InsertModal< tooltip?: string; disabled?: boolean; title: React.ReactNode; + buttonTitle?: React.ReactNode; description: string; dialogClassName?: string; serverAction: (data: z.infer) => Promise; @@ -54,7 +55,7 @@ export function InsertModal< setOpen(true); }} > - {props.title} + {props.buttonTitle ?? props.title} diff --git a/web/src/components/MachineList.tsx b/web/src/components/MachineList.tsx index 4e8ca1d..5b5d5cb 100644 --- a/web/src/components/MachineList.tsx +++ b/web/src/components/MachineList.tsx @@ -396,11 +396,12 @@ export function MachineList({ ? `Max ${machineMaxCount} ComfyUI machine for your account, upgrade to unlock more cnfiguration.` : `Max ${machineMaxCount} ComfyUI machine for your account` } - title={ + buttonTitle={ <> New Machine {locked ? : } } + title={"New Machine"} description="Add custom ComfyUI machines to your account." serverAction={addCustomMachine} formSchema={addCustomMachineSchema}