mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Enable it to store icon files in {settings.userDir}/lib/icons directory for dynamic nodes's icon feature (#1536)
This commit is contained in:
committed by
Nick O'Leary
parent
ff8773f6bd
commit
63f7d826bc
@@ -232,6 +232,12 @@ function getNodeFiles(disableNodePathScan) {
|
||||
}
|
||||
|
||||
if (settings.userDir) {
|
||||
dir = path.join(settings.userDir,"lib","icons");
|
||||
iconList = scanIconDir(dir);
|
||||
if (iconList.length > 0) {
|
||||
events.emit("node-icon-dir",{name:'Library',path:dir,icons:iconList});
|
||||
}
|
||||
|
||||
dir = path.join(settings.userDir,"nodes");
|
||||
nodeFiles = nodeFiles.concat(getLocalNodeFiles(dir));
|
||||
}
|
||||
|
Reference in New Issue
Block a user