From 143efce16beabdced2da4a71aa60ea0f0d7ddc86 Mon Sep 17 00:00:00 2001 From: GogoVega <92022724+GogoVega@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:56:24 +0200 Subject: [PATCH] Add the link icon (node docs) to the nodes tab --- .../editor-client/src/js/ui/palette-editor.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js index 8b5ddc325..891819583 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/palette-editor.js @@ -249,6 +249,11 @@ RED.palette.editor = (function() { nodeEntries[module].info.pending_version = nodeInfo.pending_version; } + if (loadedIndex[module] && loadedIndex[module].url) { + // Add the link to the node documentation if the catalog contains it + nodeEntries[module].info.url = loadedIndex[module].url; + } + for (const set in nodeInfo.sets) { if (nodeInfo.sets.hasOwnProperty(set)) { index.push(set); @@ -760,6 +765,11 @@ RED.palette.editor = (function() { nodeEntries[module].info.pending_version = pluginInfo.pending_version; } + if (loadedIndex[module] && loadedIndex[module].url) { + // Add the link to the plugin documentation if the catalog contains it + nodeEntries[module].info.url = loadedIndex[module].url; + } + for (const set in pluginInfo.sets) { if (pluginInfo.sets.hasOwnProperty(set)) { index.push(set); @@ -869,6 +879,12 @@ RED.palette.editor = (function() { var headerRow = $('
',{class:"red-ui-palette-module-header"}).appendTo(container); var titleRow = $('
').appendTo(headerRow); $('').text(entry.name).appendTo(titleRow); + + if (entry.url) { + // Add the link icon to the node documentation + $('').attr('href', entry.url).appendTo(titleRow); + } + var metaRow = $('
').appendTo(headerRow); var versionSpan = $('').text(entry.version).appendTo(metaRow);