From 47e17c60efcef958f3238ca778c91d302c208090 Mon Sep 17 00:00:00 2001 From: florianbgt Date: Fri, 25 Oct 2024 19:58:33 +0200 Subject: [PATCH] more changes --- .../app/src/components/ApiTree/ApiTree.tsx | 4 +- .../ApiTree/EndpointNodeContentDialog.tsx | 136 ++++++++++++------ packages/app/src/components/GroupBadge.tsx | 10 +- packages/app/src/index.css | 15 +- packages/app/src/layout/default.tsx | 4 +- packages/app/src/main.tsx | 4 +- packages/app/src/service/dagree.ts | 2 +- packages/app/tailwind.config.js | 7 + 8 files changed, 119 insertions(+), 63 deletions(-) diff --git a/packages/app/src/components/ApiTree/ApiTree.tsx b/packages/app/src/components/ApiTree/ApiTree.tsx index f57da20..57a3104 100644 --- a/packages/app/src/components/ApiTree/ApiTree.tsx +++ b/packages/app/src/components/ApiTree/ApiTree.tsx @@ -102,7 +102,7 @@ export default function ApiTree(props: { source: parentId, target: nodeId, type: "customEdge", - animated: true, + animated: false, }); } @@ -150,7 +150,7 @@ export default function ApiTree(props: { source: parentId, target: methodNodeId, type: "step", - animated: true, + animated: false, }); }); } diff --git a/packages/app/src/components/ApiTree/EndpointNodeContentDialog.tsx b/packages/app/src/components/ApiTree/EndpointNodeContentDialog.tsx index 8073f62..b801b47 100644 --- a/packages/app/src/components/ApiTree/EndpointNodeContentDialog.tsx +++ b/packages/app/src/components/ApiTree/EndpointNodeContentDialog.tsx @@ -1,4 +1,10 @@ -import { Button, DataList, Dialog, TextField } from "@radix-ui/themes"; +import { + Button, + DataList, + Dialog, + Separator, + TextField, +} from "@radix-ui/themes"; import { FormEvent, useEffect, useState } from "react"; import { Endpoint } from "../../service/api/types"; import MethodBadge from "../MethodBadge"; @@ -12,6 +18,7 @@ export default function EndpointNodeContentDialog(props: { async function handleApply(e: FormEvent) { e.preventDefault(); + if (group === props.endpoint.group) return; props.onChangeGroup(group); } @@ -38,99 +45,148 @@ export default function EndpointNodeContentDialog(props: { - - Endpoint details + + +
+
Endpoint details
+ + + +
+
- - - Method + + + + Method - Path + Path
{props.endpoint.path}
- - Group + + Group -
+ setGroup(e.target.value)} disabled={props.busy} placeholder="Set a group name" /> - {group !== (props.endpoint.group || "") && ( - + {group === (props.endpoint.group || "") && ( + + + )}
+
+ + + - Handler File: + Source:
{props.endpoint.filePath}
- Parent Files: + + Dependants: + -