diff --git a/src/components/inspector.tsx b/src/components/inspector.tsx index fc08135..fbcc681 100644 --- a/src/components/inspector.tsx +++ b/src/components/inspector.tsx @@ -1,4 +1,10 @@ -import { AimOutlined, EditOutlined, MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; +import { + AimOutlined, + EditOutlined, + FormOutlined, + MinusCircleOutlined, + PlusOutlined, +} from "@ant-design/icons"; import { AutoComplete, Button, @@ -144,6 +150,8 @@ const TreeInspector: FC = () => { groupDefs: state.groupDefs, nodeDefs: state.nodeDefs, relative: state.relative, + open: state.open, + workdir: state.workdir, })) ); const { t } = useTranslation(); @@ -241,10 +249,12 @@ const TreeInspector: FC = () => { ); form.setFieldValue( "subtree", - workspace.editingTree.subtree.map((v) => ({ - name: v.name, - desc: v.desc, - count: usingCount[v.name] ?? 0, + workspace.editingTree.subtree.map((entry) => ({ + path: entry.path, + vars: entry.vars.map((v) => ({ + name: v.name, + count: usingCount[v.name] ?? 0, + })), })) ); }, [workspace.editingTree, groupDefs, usingCount]); @@ -402,12 +412,51 @@ const TreeInspector: FC = () => {

{t("tree.vars.subtree")}

- {(fields) => ( -
- {fields.map((item) => ( - - - + {(items) => ( +
+ {items.map((item) => ( + + + +