瀏覽代碼

feat: US-014 - Node Registration & Editor Integration

- Categorize nodes: Database (MySQL, PostgreSQL), Data (RSS Reader),
  Security (Crypto), Media (Image), Developer (Code)
- Add rss and image icons to ICON_MAP for proper editor palette display
- Fix showWhen condition to support array of values for dynamic form updates
fszontagh 6 月之前
父節點
當前提交
444df2a1c9

+ 1 - 1
nodes/core/code.js

@@ -1,7 +1,7 @@
 /**
  * @node code
  * @name Code
- * @category core
+ * @category developer
  * @version 1.0.0
  * @description Execute custom JavaScript code with access to input data and helper utilities
  * @icon code

+ 1 - 1
nodes/crypto/crypto.js

@@ -1,7 +1,7 @@
 /**
  * @node crypto
  * @name Crypto
- * @category crypto
+ * @category security
  * @version 1.1.0
  * @description Hash data, generate HMACs, encrypt/decrypt data using AES or RSA, and generate random values
  * @icon lock

+ 1 - 1
nodes/image/image.js

@@ -1,7 +1,7 @@
 /**
  * @node image
  * @name Image
- * @category image
+ * @category media
  * @version 1.0.0
  * @description Extract image information, metadata, and EXIF data using ImageMagick
  * @icon image

+ 1 - 1
nodes/rss/rss-reader.js

@@ -1,7 +1,7 @@
 /**
  * @node rss-reader
  * @name RSS Reader
- * @category rss
+ * @category data
  * @version 1.1.0
  * @description Read and parse RSS/Atom feeds with optional filtering by keyword, date, or count. Supports stateful new item detection.
  * @icon rss

+ 6 - 1
webui/src/components/workflow/NodeConfigModal.tsx

@@ -282,7 +282,12 @@ export function NodeConfigModal({
                 const shouldShowField = (prop: any) => {
                   if (!prop.showWhen) return true
                   const { field, value } = prop.showWhen
-                  return editingConfig[field] === value
+                  const currentValue = editingConfig[field]
+                  // Support both single value and array of values
+                  if (Array.isArray(value)) {
+                    return value.includes(currentValue)
+                  }
+                  return currentValue === value
                 }
 
                 return Object.entries(properties).map(([key, prop]: [string, any]) => {

+ 2 - 0
webui/src/config/nodeCategories.ts

@@ -69,6 +69,8 @@ const ICON_MAP: Record<string, LucideIcon> = {
   'arrow-left': LucideIcons.ArrowLeft,
   'arrow-up': LucideIcons.ArrowUp,
   'arrow-down': LucideIcons.ArrowDown,
+  'rss': LucideIcons.Rss,
+  'image': LucideIcons.Image,
 }
 
 const DEFAULT_ICON = LucideIcons.Box