diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js index c11931bfb..d26ed4a4c 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/utils.js @@ -866,17 +866,32 @@ RED.utils = (function() { } else { return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; } - } else { - // This could be a non-core node trying to use a core icon. - iconPath.module = 'node-red'; + } + + if (/.png$/i.test(iconPath.file)) { + var originalFile = iconPath.file; + iconPath.file = iconPath.file.replace(/.png$/,".svg"); + if (isIconExists(iconPath)) { + return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; + } + iconPath.file = originalFile; + } + + // This could be a non-core node trying to use a core icon. + iconPath.module = 'node-red'; + if (isIconExists(iconPath)) { + return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; + } + if (/.png$/i.test(iconPath.file)) { + iconPath.file = iconPath.file.replace(/.png$/,".svg"); if (isIconExists(iconPath)) { return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; - } else if (def.category === 'subflows') { - return RED.settings.apiRootUrl+"icons/node-red/subflow.svg"; - } else { - return RED.settings.apiRootUrl+"icons/node-red/arrow-in.svg"; } } + if (def.category === 'subflows') { + return RED.settings.apiRootUrl+"icons/node-red/subflow.svg"; + } + return RED.settings.apiRootUrl+"icons/node-red/arrow-in.svg"; } function getNodeLabel(node,defaultLabel) { diff --git a/packages/node_modules/@node-red/nodes/icons/alert.png b/packages/node_modules/@node-red/nodes/icons/alert.png deleted file mode 100644 index a86311109..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/alert.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/arrow-in.png b/packages/node_modules/@node-red/nodes/icons/arrow-in.png deleted file mode 100644 index e38f39146..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/arrow-in.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/batch.png b/packages/node_modules/@node-red/nodes/icons/batch.png deleted file mode 100644 index 44803d185..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/batch.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/bridge-dash.png b/packages/node_modules/@node-red/nodes/icons/bridge-dash.png deleted file mode 100644 index 3914cb7a5..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/bridge-dash.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/bridge.png b/packages/node_modules/@node-red/nodes/icons/bridge.png deleted file mode 100644 index 2011292d6..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/bridge.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/cog.png b/packages/node_modules/@node-red/nodes/icons/cog.png deleted file mode 100644 index e84cb16b2..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/cog.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/comment.png b/packages/node_modules/@node-red/nodes/icons/comment.png deleted file mode 100644 index d64d12a7f..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/comment.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/db.png b/packages/node_modules/@node-red/nodes/icons/db.png deleted file mode 100644 index 5e74f7480..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/db.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/debug.png b/packages/node_modules/@node-red/nodes/icons/debug.png deleted file mode 100644 index 05691562d..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/debug.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/envelope.png b/packages/node_modules/@node-red/nodes/icons/envelope.png deleted file mode 100644 index fb0d36b95..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/envelope.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/feed.png b/packages/node_modules/@node-red/nodes/icons/feed.png deleted file mode 100644 index 9f2671c53..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/feed.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/file-in.png b/packages/node_modules/@node-red/nodes/icons/file-in.png deleted file mode 100644 index d3e5cd7fe..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/file-in.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/file-out.png b/packages/node_modules/@node-red/nodes/icons/file-out.png deleted file mode 100644 index 051f819c8..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/file-out.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/file.png b/packages/node_modules/@node-red/nodes/icons/file.png deleted file mode 100644 index 78ee09f79..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/file.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/function.png b/packages/node_modules/@node-red/nodes/icons/function.png deleted file mode 100644 index 909505000..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/function.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/hash.png b/packages/node_modules/@node-red/nodes/icons/hash.png deleted file mode 100644 index e68e45df1..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/hash.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/inject.png b/packages/node_modules/@node-red/nodes/icons/inject.png deleted file mode 100644 index dbf4711a3..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/inject.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/join.png b/packages/node_modules/@node-red/nodes/icons/join.png deleted file mode 100644 index d4a2cffb4..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/join.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/light.png b/packages/node_modules/@node-red/nodes/icons/light.png deleted file mode 100644 index ce21542bb..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/light.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/link-out.png b/packages/node_modules/@node-red/nodes/icons/link-out.png deleted file mode 100644 index f39ba0453..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/link-out.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/parser-csv.png b/packages/node_modules/@node-red/nodes/icons/parser-csv.png deleted file mode 100644 index 5b1c42c48..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/parser-csv.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/parser-html.png b/packages/node_modules/@node-red/nodes/icons/parser-html.png deleted file mode 100644 index fa5373713..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/parser-html.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/parser-json.png b/packages/node_modules/@node-red/nodes/icons/parser-json.png deleted file mode 100644 index 839d60dcb..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/parser-json.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/parser-xml.png b/packages/node_modules/@node-red/nodes/icons/parser-xml.png deleted file mode 100644 index fa5373713..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/parser-xml.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/parser-yaml.png b/packages/node_modules/@node-red/nodes/icons/parser-yaml.png deleted file mode 100644 index e4cb2f20b..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/parser-yaml.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/range.png b/packages/node_modules/@node-red/nodes/icons/range.png deleted file mode 100644 index 2e7183ce8..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/range.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/rpi.png b/packages/node_modules/@node-red/nodes/icons/rpi.png deleted file mode 100644 index 162b99dc1..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/rpi.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/rpi.svg b/packages/node_modules/@node-red/nodes/icons/rpi.svg new file mode 100644 index 000000000..99185f9b0 --- /dev/null +++ b/packages/node_modules/@node-red/nodes/icons/rpi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/icons/serial.png b/packages/node_modules/@node-red/nodes/icons/serial.png deleted file mode 100644 index f4bcedc3b..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/serial.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/sort.png b/packages/node_modules/@node-red/nodes/icons/sort.png deleted file mode 100644 index f0fb7ead2..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/sort.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/split.png b/packages/node_modules/@node-red/nodes/icons/split.png deleted file mode 100644 index bda78484f..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/split.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/subflow.png b/packages/node_modules/@node-red/nodes/icons/subflow.png deleted file mode 100644 index 7c1c14f38..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/subflow.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/swap.png b/packages/node_modules/@node-red/nodes/icons/swap.png deleted file mode 100644 index e9e70efbd..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/swap.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/switch.png b/packages/node_modules/@node-red/nodes/icons/switch.png deleted file mode 100644 index 4d172de66..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/switch.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/template.png b/packages/node_modules/@node-red/nodes/icons/template.png deleted file mode 100644 index 1db6f273d..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/template.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/timer.png b/packages/node_modules/@node-red/nodes/icons/timer.png deleted file mode 100644 index 4f02f4656..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/timer.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/trigger.png b/packages/node_modules/@node-red/nodes/icons/trigger.png deleted file mode 100644 index 37b60f118..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/trigger.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/twitter.png b/packages/node_modules/@node-red/nodes/icons/twitter.png deleted file mode 100644 index d06059453..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/twitter.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/watch.png b/packages/node_modules/@node-red/nodes/icons/watch.png deleted file mode 100644 index a6c1b9451..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/watch.png and /dev/null differ diff --git a/packages/node_modules/@node-red/nodes/icons/white-globe.png b/packages/node_modules/@node-red/nodes/icons/white-globe.png deleted file mode 100644 index 8a19079bf..000000000 Binary files a/packages/node_modules/@node-red/nodes/icons/white-globe.png and /dev/null differ