mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
Add the link icon (node docs) to the nodes tab
This commit is contained in:
@@ -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 = $('<div>',{class:"red-ui-palette-module-header"}).appendTo(container);
|
||||
var titleRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-name"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
|
||||
$('<span>').text(entry.name).appendTo(titleRow);
|
||||
|
||||
if (entry.url) {
|
||||
// Add the link icon to the node documentation
|
||||
$('<a target="_blank" class="red-ui-palette-module-link"><i class="fa fa-external-link"></i></a>').attr('href', entry.url).appendTo(titleRow);
|
||||
}
|
||||
|
||||
var metaRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow);
|
||||
var versionSpan = $('<span>').text(entry.version).appendTo(metaRow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user