diff --git a/packages/webui/src/components/config/node-edit-dialog.tsx b/packages/webui/src/components/config/node-edit-dialog.tsx index a4c78900..bd908495 100644 --- a/packages/webui/src/components/config/node-edit-dialog.tsx +++ b/packages/webui/src/components/config/node-edit-dialog.tsx @@ -92,8 +92,11 @@ export function NodeEditDialog(props: NodeEditDialogProps return ( - - + +
@@ -105,90 +108,93 @@ export function NodeEditDialog(props: NodeEditDialogProps
-
- -
- -

- 关闭后保存即可保留配置但不启动该节点 -

-
- patch({ enabled: v ? undefined : false } as Partial>)} - ariaLabel="启用" - /> -
- -
-
- patch({ name: v } as Partial>)} - error={blankName ? '请填写名称' : duplicateName ? '名称与其它节点重复' : undefined} +
+
+ +
+ +

+ 关闭后保存即可保留配置但不启动该节点 +

+
+ patch({ enabled: v ? undefined : false } as Partial>)} + ariaLabel="启用" /> - -
-
+ -
-
- patch({ accessToken: v || undefined } as Partial>)} - /> -
-
- -
-
- - patch({ messageFormat: v } as Partial>)} +
+
+ patch({ name: v } as Partial>)} + error={blankName ? '请填写名称' : duplicateName ? '名称与其它节点重复' : undefined} /> - + +
+
- {isWs && ( - +
+
+ patch({ accessToken: v || undefined } as Partial>)} + /> +
+
+ +
+
+ patch({ role: v } as unknown as Partial>)} + ariaLabel="消息格式" + value={(draft.messageFormat ?? 'array') as MessageFormat} + options={FORMAT_OPTIONS} + onChange={(v) => patch({ messageFormat: v } as Partial>)} /> - )} - - patch({ reportSelfMessage: v } as Partial>)} - ariaLabel="上报自身消息" - /> - -
-
+ {isWs && ( + + patch({ role: v } as unknown as Partial>)} + /> + + )} + + + patch({ reportSelfMessage: v } as Partial>)} + ariaLabel="上报自身消息" + /> + +
+
+
- -