Update all node icons to SVG

When listing icons provided by a module, if there is a png and svg
with the same name, only the svg will be listed.

If a node asks for a png icon which is not known, but there is a
corresponding svg, that will be used instead.
This commit is contained in:
Nick O'Leary
2019-06-21 12:36:20 +01:00
parent 92cb57eb7b
commit d623848c87
81 changed files with 127 additions and 66 deletions

View File

@@ -33,7 +33,7 @@ describe("api/editor/ui", function() {
nodes: {
getIcon: function(opts) {
return new Promise(function(resolve,reject) {
fs.readFile(NR_TEST_UTILS.resolve("@node-red/editor-client/src/images/icons/arrow-in.png"), function(err,data) {
fs.readFile(NR_TEST_UTILS.resolve("@node-red/editor-client/src/images/icons/arrow-in.svg"), function(err,data) {
resolve(data);
})
});
@@ -94,7 +94,7 @@ describe("api/editor/ui", function() {
}
}
it('returns the requested icon', function(done) {
var defaultIcon = fs.readFileSync(NR_TEST_UTILS.resolve("@node-red/editor-client/src/images/icons/arrow-in.png"));
var defaultIcon = fs.readFileSync(NR_TEST_UTILS.resolve("@node-red/editor-client/src/images/icons/arrow-in.svg"));
request(app)
.get("/icons/module/icon.png")
.expect("Content-Type", /image\/png/)