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

@@ -192,7 +192,7 @@ describe("red/nodes/registry/localfilesystem",function() {
list["node-red"].icons[0].should.have.property("path",path.join(__dirname,"resources/local/NestedDirectoryNode/NestedNode/icons"))
list["node-red"].icons[0].should.have.property("icons");
list["node-red"].icons[0].icons.should.have.length(1);
list["node-red"].icons[0].icons[0].should.eql("arrow-in.png");
list["node-red"].icons[0].icons[0].should.eql("arrow-in.svg");
done();
});
it("scans icons dir in library",function(done) {
@@ -297,7 +297,7 @@ describe("red/nodes/registry/localfilesystem",function() {
nodeModule.TestNodeModule.icons.should.have.length(1);
nodeModule.TestNodeModule.icons[0].should.have.property("path");
nodeModule.TestNodeModule.icons[0].should.have.property("icons");
nodeModule.TestNodeModule.icons[0].icons[0].should.eql("arrow-in.png");
nodeModule.TestNodeModule.icons[0].icons[0].should.eql("arrow-in.svg");
done();
});
});