Merge pull request #5237 from GogoVega/fix-node-docs-icon

Fix node documentation icon for long catalog loading
pull/5263/head
Nick O'Leary 2025-08-28 13:53:02 +01:00 committed by GitHub
commit 9ad329e5a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -336,6 +336,16 @@ RED.palette.editor = (function() {
const moduleInfo = nodeEntries[module].info;
const nodeEntry = nodeEntries[module].elements;
if (!moduleInfo.url) {
if (loadedIndex[module] && loadedIndex[module].url) {
// Add the link to the node documentation if the catalog contains it
moduleInfo.url = loadedIndex[module].url;
const titleRow = $(nodeEntry.container).find("div.red-ui-palette-module-header > div.red-ui-palette-module-meta.red-ui-palette-module-name");
$('<a target="_blank" class="red-ui-palette-module-link"><i class="fa fa-external-link"></i></a>').attr('href', moduleInfo.url).appendTo(titleRow);
}
}
if (nodeEntry) {
const setCount = [];