diff --git a/package.json b/package.json index 8ee159c..2de4d70 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@clusterio/lib": "^2.0.0-alpha.0" }, "devDependencies": { + "@ant-design/icons": "^5.3.7", "@clusterio/web_ui": "^2.0.0-alpha.0", "@sinclair/typebox": "^0.30.4", "@swc/core": "^1.4.0", diff --git a/web/components/InputEdgeConfig.jsx b/web/components/InputEdgeConfig.jsx index da48aa5..3cc51b4 100644 --- a/web/components/InputEdgeConfig.jsx +++ b/web/components/InputEdgeConfig.jsx @@ -1,5 +1,6 @@ import React from "react"; import { Button, Select, Modal, InputNumber, Divider } from "antd"; +import PlusOutlined from "@ant-design/icons/PlusOutlined"; import { useInstance, useInstanceConfig } from "@clusterio/web_ui"; import { InstanceSelector } from "./InstanceSelector"; import { direction_to_text } from "../util"; @@ -29,15 +30,18 @@ export function InputEdgeConfig({ fieldDefinition, value, onChange }) { > {edges.map((edge, index) => <> - { - setNewValue({ - ...newValue, edges: [ - ...edges.slice(0, index), - newEdge, - ...edges.slice(index + 1), - ], - }); - }} /> + { + setNewValue({ + ...newValue, edges: [ + ...edges.slice(0, index), + newEdge, + ...edges.slice(index + 1), + ], + }); + }} /> >)} {/* Button to add new edge */} { @@ -53,7 +57,7 @@ export function InputEdgeConfig({ fieldDefinition, value, onChange }) { ], }); }}> - Add Edge + Add Edge >; @@ -124,7 +128,12 @@ function EditEdge({ edge, onChange }) { onSelect={(value) => onChange({ ...edge, target_instance: value })} /> - + Target Edge Surface {target_edge.surface} at x{target_edge.origin?.[0]}, y{target_edge.origin?.[1]} Pointing {direction_to_text(target_edge.direction)} + {status} ; }
Surface {target_edge.surface} at x{target_edge.origin?.[0]}, y{target_edge.origin?.[1]}
Pointing {direction_to_text(target_edge.direction)}
{status}