use text area for description

This commit is contained in:
codetypes committed 2024-05-05 11:37:49 +08:00
1 parent 06f9665d6d
commit fa5d48d80c
4 files changed
+11 -12

No files matched your search

+1 -1
View File
@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1603437237518" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1263" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M195.776 194.688a448.064 448.064 0 0 1 760.768 261.312H846.08a336.064 336.064 0 0 0-569.408-181.12l182.08 180.672H183.488l-0.064 0.448H67.456l0.064-0.448H64V64l131.776 130.688z m632.448 634.624A448.064 448.064 0 0 1 67.456 568H177.92a336.064 336.064 0 0 0 569.408 181.12L565.248 568.384h275.264l0.064-0.448h115.968l-0.064 0.448H960V960l-131.776-130.688z" fill="#000000" p-id="1264"></path></svg>
<svg stroke="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" style="width:12px;height:12px" color="#fff"><path d="M2.273 9.53a2.273 2.273 0 100-4.546 2.273 2.273 0 000 4.547zm9.467-4.984a2.273 2.273 0 100-4.546 2.273 2.273 0 000 4.546M7.4 13.108a5.54 5.54 0 01-3.775-2.88 3.27 3.27 0 01-1.944.24 7.4 7.4 0 005.328 4.465c.53.113 1.072.169 1.614.166a3.25 3.25 0 01-.666-1.9 6 6 0 01-.557-.091m3.828 2.285a2.273 2.273 0 100-4.546 2.273 2.273 0 000 4.546m3.163-3.108a7.44 7.44 0 00.373-8.726 3.3 3.3 0 01-1.278 1.498 5.57 5.57 0 01-.183 5.535 3.26 3.26 0 011.088 1.693M2.098 3.998a3.3 3.3 0 011.897.486 5.54 5.54 0 014.464-2.388c.037-.67.277-1.313.69-1.843a7.47 7.47 0 00-7.051 3.745" stroke="none"/></svg>

Before

Width:  |  Height:  |  Size: 772 B

After

Width:  |  Height:  |  Size: 765 B

-2
View File
@@ -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) {
+4 -3
View File
@@ -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 && (
+6 -6
View File
@@ -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;