From a0056eb14cfaa6c128e2d76bc01aa7be8bf7d606 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Thu, 8 May 2025 18:23:08 +0800 Subject: [PATCH] perf: dynamic and pipeline config ui --- .../dynamic-form/DynamicFormItemComponent.tsx | 18 +++++++------ .../pipeline-form/PipelineChildFormEntity.ts | 19 -------------- .../pipeline-form/PipelineFormEntity.ts | 0 web/src/app/home/pipelines/page.tsx | 25 ++----------------- 4 files changed, 13 insertions(+), 49 deletions(-) delete mode 100644 web/src/app/home/pipelines/components/pipeline-form/PipelineChildFormEntity.ts delete mode 100644 web/src/app/home/pipelines/components/pipeline-form/PipelineFormEntity.ts diff --git a/web/src/app/home/components/dynamic-form/DynamicFormItemComponent.tsx b/web/src/app/home/components/dynamic-form/DynamicFormItemComponent.tsx index be745a2f..0a20df0d 100644 --- a/web/src/app/home/components/dynamic-form/DynamicFormItemComponent.tsx +++ b/web/src/app/home/components/dynamic-form/DynamicFormItemComponent.tsx @@ -4,7 +4,7 @@ import { } from '@/app/infra/entities/form/dynamic'; import { Input } from "@/components/ui/input" import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "@/components/ui/select" -import { Checkbox } from "@/components/ui/checkbox" +import { Switch } from "@/components/ui/switch" import { ControllerRenderProps } from "react-hook-form"; import { Button } from "@/components/ui/button"; @@ -31,7 +31,7 @@ export default function DynamicFormItemComponent({ case DynamicFormItemType.BOOLEAN: return ( - @@ -41,8 +41,9 @@ export default function DynamicFormItemComponent({ return (
{field.value.map((item: string, index: number) => ( -
+
{ const newValue = [...field.value]; @@ -50,15 +51,18 @@ export default function DynamicFormItemComponent({ field.onChange(newValue); }} /> - + + + +
))}