diff --git a/package.json b/package.json index dd1ccea..b392c05 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "lint": "eslint .", "pretest": "npm run lint", "test": "node ./test/runTest.js", + "dev": "webpack --watch", "webpack": "webpack" }, "devDependencies": { diff --git a/src/webview/Flow.jsx b/src/webview/Flow.jsx index 065a130..96be6ec 100644 --- a/src/webview/Flow.jsx +++ b/src/webview/Flow.jsx @@ -73,9 +73,9 @@ const OverviewFlow = () => { nodeBorderRadius={2} /> -
+
-

Client: 00

+

Client: 00

Server: 00

diff --git a/src/webview/flowBuilder.js b/src/webview/flowBuilder.js index a96906a..62fd030 100644 --- a/src/webview/flowBuilder.js +++ b/src/webview/flowBuilder.js @@ -17,26 +17,27 @@ class FlowBuilder { buildNodesArray(parsedData, x = this.x, y = this.y) { if (!parsedData) return; + parsedData.forEach((item) => { const node = { id: (++this.id).toString(), data: { label: ( -
-
-
{item.fileName}
-
-
+
{item.fileName}
) }, // type: item.depth === 0 ? 'input' : '', - // type: item.isClientComponent ? 'input' : 'output', type: 'default', position: { x: x += 40, y: y += 30 }, style: { - border: 'none', - borderRadius: "6px" - } + borderRadius: '6px', + borderWidth: '2px', + borderColor: '#6b7280', + display: 'flex', + justifyContent: 'center', + placeItems: 'center', + backgroundColor: `${(item.isClientComponent) ? '#fdba74' : '#93C5FD'}`, + }, }; this.initialNodes.push(node); if (item.children) {