use text area for description
This commit is contained in:
1 parent
06f9665d6d
commit
fa5d48d80c
4 files changed
+11
-12
No files matched your search
@@ -709,8 +709,6 @@ export const Explorer: FC = () => {
|
||||
return arr;
|
||||
}, [t, copyFile]);
|
||||
|
||||
const nodeConfs = useMemo(() => {}, [workspace.nodeDefs]);
|
||||
|
||||
const onClick = (info: MenuInfo) => {
|
||||
const node = findFile(selectedKeys[0], workspace.fileTree!) ?? workspace.fileTree;
|
||||
if (node) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { NodeArgType, NodeModel, TreeGraphData, TreeModel } from "@/misc/b3type"
|
||||
import { Hotkey, isMacos } from "@/misc/keys";
|
||||
import Path from "@/misc/path";
|
||||
import { AutoComplete, Divider, Flex, Form, Input, InputNumber, Select, Switch } from "antd";
|
||||
import TextArea from "antd/es/input/TextArea";
|
||||
import { DefaultOptionType } from "antd/es/select";
|
||||
import { FC, useEffect, useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -52,7 +53,7 @@ const TreeInspector: FC = () => {
|
||||
<Input disabled={true} />
|
||||
</Form.Item>
|
||||
<Form.Item name="desc" label={t("tree.desc")}>
|
||||
<Input onBlur={form.submit} />
|
||||
<TextArea autoSize onBlur={form.submit} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
@@ -250,7 +251,7 @@ const NodeInspector: FC = () => {
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item name="desc" label={t("node.desc")}>
|
||||
<Input disabled={disabled} onBlur={form.submit} />
|
||||
<TextArea autoSize disabled={disabled} onBlur={form.submit} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("node.debug")} name="debug" valuePropName="checked">
|
||||
<Switch disabled={disabled && !editingNode.data.path} onChange={form.submit} />
|
||||
@@ -438,7 +439,7 @@ const NodeDefInspector: FC = () => {
|
||||
<div style={{ minWidth: "80px", justifyContent: "flex-end" }}>{t("node.desc")}</div>
|
||||
}
|
||||
>
|
||||
<Input disabled={true} />
|
||||
<TextArea autoSize disabled={true} />
|
||||
</Form.Item>
|
||||
<Markdown>{data.doc}</Markdown>
|
||||
{data.input && data.input.length > 0 && (
|
||||
|
||||
@@ -7,12 +7,12 @@ import Path from "@/misc/path";
|
||||
import G6 from "@antv/g6";
|
||||
|
||||
const NODE_COLORS: any = {
|
||||
["Composite"]: "rgb(91,237,32)",
|
||||
["Decorator"]: "rgb(218,167,16)",
|
||||
["Condition"]: "rgb(228,20,139)",
|
||||
["Action"]: "rgb(91,143,249)",
|
||||
["Other"]: "rgb(112,112,112)",
|
||||
["Error"]: "rgb(255,0,0)",
|
||||
["Composite"]: "#5aed20",
|
||||
["Decorator"]: "#faad14",
|
||||
["Condition"]: "#e4148b",
|
||||
["Action"]: "#5b90f9",
|
||||
["Other"]: "#707070",
|
||||
["Error"]: "#ff0000",
|
||||
};
|
||||
|
||||
const SELECTED_LINE_WIDTH = 4;
|
||||
|
||||
Reference in new issue
Block a user