Move core node icons into node package

This commit is contained in:
Nick O'Leary
2018-08-15 23:12:51 +01:00
parent a3aec6b939
commit a747d8c2d5
55 changed files with 30 additions and 26 deletions

View File

@@ -241,14 +241,12 @@ function getNodeFiles(disableNodePathScan) {
var nodeFiles = [];
var results;
var dir = path.resolve(__dirname + '/../../public/icons');
var iconList = [{path:dir,icons:scanIconDir(dir)}];
var dir;
var iconList = [];
if (settings.coreNodesDir) {
results = getLocalNodeFiles(path.resolve(settings.coreNodesDir));
nodeFiles = nodeFiles.concat(results.files);
iconList = iconList.concat(results.icons);
var defaultLocalesPath = path.join(settings.coreNodesDir,"core","locales");
i18n.registerMessageCatalog("node-red",defaultLocalesPath,"messages.json");
}

View File

@@ -555,11 +555,8 @@ function setModulePendingUpdated(module,version) {
});
}
var icon_paths = {
"node-red":[path.resolve(__dirname + '/../editor/public/icons')]
};
var icon_paths = { };
var iconCache = {};
var defaultIcon = path.join(icon_paths['node-red'][0],'arrow-in.png');
function getNodeIconPath(module,icon) {
if (/\.\./.test(icon)) {
@@ -585,8 +582,7 @@ function getNodeIconPath(module,icon) {
if (module !== "node-red") {
return getNodeIconPath("node-red", icon);
}
return defaultIcon;
return null;
}
}