Skip to content

Commit 5c0e9d2

Browse files
committed
Co-authored-by: ChristinaRaether <ChristinaRaether@users.noreply.github.com>
1 parent d6d392a commit 5c0e9d2

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/webview/Flow.jsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect } from "react";
22
import ReactFlow, {
33
addEdge,
44
MiniMap,
5+
Panel,
56
Controls,
67
Background,
78
useNodesState,
@@ -59,22 +60,31 @@ const OverviewFlow = () => {
5960
<MiniMap
6061
nodeStrokeColor={(n) => {
6162
if (n.style?.background) return n.style.background;
62-
if (n.type === "input") return "#0041d0";
63-
if (n.type === "output") return "#ff0072";
63+
if (n.type === "input") return "#fdba74";
64+
if (n.type === "output") return "#93C5FD";
6465
if (n.type === "default") return "#1a192b";
6566

6667
return "#eee";
6768
}}
6869
nodeColor={(n) => {
6970
if (n.style?.background) return n.style.background;
70-
7171
return "#fff";
7272
}}
7373
nodeBorderRadius={2}
7474
/>
75+
<Panel position="top-left">
76+
<div className="border-1 border-gray-500">
77+
<div className="flex justify-end place-items-end shadow-lg bg-slate-50 w-20 h-15">
78+
<p className="pl-2 pr-2 py-2">Client: <span className="border-1 border-gray-500 bg-orange-300 text-transparent rounded-full">00</span></p>
79+
</div>
80+
<div className="flex justify-end place-items-end shadow-lg bg-slate-50 w-20 h-15">
81+
<p className="pl-2 pr-2 pb-2">Server: <span className="bg-blue-300 text-transparent rounded-full">00</span></p>
82+
</div>
83+
</div>
84+
</Panel >
7585
<Controls />
7686
<Background color="#aaa" gap={16} />
77-
</ReactFlow>
87+
</ReactFlow >
7888
);
7989
};
8090

src/webview/flowBuilder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class FlowBuilder {
3232
)
3333
},
3434
// type: item.depth === 0 ? 'input' : '',
35-
type: 'default',
35+
type: item.isClientComponent ? 'input' : 'output',
36+
// type: 'default',
3637
position: { x: 0, y: 0 },
3738
style: {
3839
border: 'none',

0 commit comments

Comments
 (0)