1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #2217 from node-red/svg-icons

Update all node icons and editor images to SVG
This commit is contained in:
Nick O'Leary 2019-06-21 22:08:34 +01:00 committed by GitHub
commit 8c68e76c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
163 changed files with 197 additions and 97 deletions

View File

@ -28,7 +28,7 @@ var defaultContext = {
}, },
header: { header: {
title: "Node-RED", title: "Node-RED",
image: "red/images/node-red.png" image: "red/images/node-red.svg"
}, },
asset: { asset: {
red: (process.env.NODE_ENV == "development")? "red/red.js":"red/red.min.js", red: (process.env.NODE_ENV == "development")? "red/red.js":"red/red.min.js",

View File

@ -25,7 +25,7 @@ var theme = require("./theme");
var runtimeAPI; var runtimeAPI;
var editorClientDir = path.dirname(require.resolve("@node-red/editor-client")); var editorClientDir = path.dirname(require.resolve("@node-red/editor-client"));
var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.png"); var defaultNodeIcon = path.join(editorClientDir,"public","red","images","icons","arrow-in.svg");
var editorTemplatePath = path.join(editorClientDir,"templates","index.mst"); var editorTemplatePath = path.join(editorClientDir,"templates","index.mst");
var editorTemplate; var editorTemplate;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

View File

@ -0,0 +1 @@
<svg width="27" height="18" xmlns="http://www.w3.org/2000/svg"><g color="#000"><path fill="#fff" d="M0 5.002h10v5H0zM17 .002h10v5H17z"/><path d="M17 13.002h10v5H17z"/></g><path d="M9.5 7.502h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

View File

@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path color="#000" fill="#8c101c" d="M0 .002h32v32H0z"/><g color="#000"><path fill="#fff" d="M2 13.002h10v5H2zM19 8.002h10v5H19z"/><path d="M19 21.002h10v5H19z"/></g><path d="M11.5 15.502h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

View File

@ -0,0 +1 @@
<svg width="27" height="18" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" color="#000"><path d="M0 5h10v5H0zM17 0h10v5H17zM17 13h10v5H17z"/></g><path d="M9.5 7.5h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

View File

@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path color="#000" fill="#8c101c" d="M0 0h32v32H0z"/><g fill="#fff" color="#000"><path d="M2 13h10v5H2zM19 8h10v5H19zM19 21h10v5H19z"/></g><path d="M11.5 15.5h2l4-5h2" fill="none" stroke="#fff" stroke-width="1.5"/></svg>

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

View File

@ -0,0 +1 @@
<svg width="27" height="18" xmlns="http://www.w3.org/2000/svg"><path color="#000" d="M0 5.002h10v5H0zM17 13.002h10v5H17z"/><path d="M9.5 7.502h2l4-5h2" fill="none" stroke="#000" stroke-width="1.5"/><path color="#000" fill="#fff" d="M17 .002h10v5H17z"/></svg>

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

View File

@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><path color="#000" fill="#8c101c" d="M0 .002h32v32H0z"/><path color="#000" d="M2 13.002h10v5H2zM19 21.002h10v5H19z"/><path d="M11.5 15.502h2l4-5h2" fill="none" stroke="#000" stroke-width="1.5"/><path color="#000" fill="#fff" d="M19 8.002h10v5H19z"/></svg>

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1015 B

View File

@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><g color="#000"><path fill="#8c101c" d="M0 .006h32v32H0z"/><path d="M11.81 25.429a10.02 10.02 0 0 0 4.19.914c5.562 0 10.107-4.545 10.107-10.106S21.562 6.131 16 6.131 5.895 10.676 5.895 16.237h3.368c0-3.74 2.997-6.737 6.738-6.737s6.737 2.996 6.737 6.737-2.996 6.738-6.737 6.738a6.775 6.775 0 0 1-2.533-.486l1.43-3.48-6.947 1.317 2.13 8.485z" fill="#fff" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/></g></svg>

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M18 5v12H7v26h11v12l14-25z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 B

View File

@ -0,0 +1 @@
<svg width="46.994" height="18.006" xmlns="http://www.w3.org/2000/svg"><g stroke="#d6d6d6"><g fill="#9e3131" stroke-linejoin="round" stroke-width="3.847" transform="matrix(.25848 0 0 .2614 -63.87 -108.483)"><rect x="249.04" y="435.92" width="50.294" height="22.953" ry="6.608"/><rect x="345.63" y="416.93" width="50.294" height="22.953" ry="6.608"/><rect x="376.71" y="459.01" width="50.294" height="22.953" ry="6.608"/></g><path d="M301.04 447.43c24.406.184 7.107-18.84 42.708-19.03M374.82 470.48c-46.966.538-28.989-22.664-73.619-22.944" fill="none" stroke-width="5.771" transform="matrix(.25848 0 0 .2614 -63.87 -108.483)"/></g></svg>

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

View File

@ -0,0 +1 @@
<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M25 16h7c.58 0 1-.42 1-1v-2c0-.58-.42-1-1-1h-7c-.58 0-1 .42-1 1v2c0 .58.42 1 1 1zM8 28h7c.58 0 1-.42 1-1v-2c0-.58-.42-1-1-1H8c-.58 0-1 .42-1 1v2c0 .58.42 1 1 1zm-.416 11C5.624 39 4 37.375 4 35.416V4.582C4 2.622 5.625 1 7.584 1h24.832C34.376 1 36 2.623 36 4.582v30.834C36 37.376 34.375 39 32.416 39zM32 27H19c0 2.19-1.81 4-4 4H7v4.416c0 .35.235.584.584.584h24.832c.35 0 .584-.235.584-.584v-8.417zm1-2v-6h-8c-2.19 0-4-1.81-4-4h-1c-4.333-.002-8.667.004-13 0v6h8c2.19 0 4 1.81 4 4h13zm0-16V4.582c0-.35-.235-.582-.584-.582H7.584C7.234 4 7 4.233 7 4.582v8.417c4.333.002 8.667.001 13 .001h1c0-2.19 1.81-4 4-4z" color="#000" fill="#333"/></svg>

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M14.16 27.38l1.555-.144c.132.731.383 1.261.755 1.591.371.33.848.494 1.429.494.497 0 .931-.114 1.303-.341.377-.228.686-.53.926-.908.24-.383.44-.899.602-1.546a8.122 8.122 0 0 0 .233-2.3 3.732 3.732 0 0 1-1.33 1.258 3.605 3.605 0 0 1-1.815.476c-1.09 0-2.013-.395-2.768-1.186s-1.133-1.834-1.133-3.128c0-1.336.393-2.411 1.178-3.226.79-.815 1.78-1.223 2.966-1.223.856 0 1.638.231 2.345.692.713.462 1.253 1.12 1.618 1.978.372.85.557 2.085.557 3.702 0 1.684-.182 3.026-.548 4.027-.365.994-.91 1.752-1.636 2.274-.719.52-1.563.781-2.534.781-1.03 0-1.872-.284-2.525-.853-.654-.576-1.046-1.381-1.178-2.418zm6.624-5.815c0-.928-.249-1.666-.746-2.21-.492-.546-1.085-.819-1.78-.819-.719 0-1.345.294-1.878.881s-.8 1.348-.8 2.283c0 .839.252 1.522.755 2.05.51.52 1.135.781 1.878.781.75 0 1.363-.26 1.843-.782.485-.527.728-1.255.728-2.184zM4.858 10.466c0-1.558.158-2.81.476-3.757.324-.952.8-1.686 1.429-2.201.635-.516 1.432-.773 2.39-.773.708 0 1.328.143 1.861.431.533.282.974.692 1.321 1.231.348.534.62 1.187.818 1.96.198.767.297 1.803.297 3.11 0 1.545-.16 2.794-.477 3.747-.317.947-.794 1.68-1.429 2.202-.629.515-1.426.773-2.39.773-1.27 0-2.268-.456-2.993-1.366-.869-1.097-1.303-2.882-1.303-5.357zm1.662 0c0 2.163.252 3.604.755 4.323.51.713 1.136 1.07 1.879 1.07.743 0 1.366-.36 1.87-1.079.508-.719.763-2.157.763-4.314 0-2.169-.255-3.61-.764-4.323-.503-.713-1.132-1.07-1.887-1.07-.743 0-1.336.315-1.78.944-.557.803-.836 2.286-.836 4.45z" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M13.27 29.15l6.733-8.143h-6.235V19.3h8.8v1.559l-6.69 8.09h6.892v1.707h-9.5zm4.909-10.125zM6.577 12.58q0 .827.604 1.304.605.478 1.432.478 1.007 0 1.95-.467 1.59-.774 1.59-2.534V9.824q-.349.222-.9.37-.552.15-1.082.213l-1.155.148q-1.04.138-1.56.435-.88.498-.88 1.59zM11.2 8.721q.657-.085.88-.551.127-.255.127-.732 0-.975-.7-1.41-.689-.445-1.983-.445-1.495 0-2.12.805-.35.446-.456 1.326H5.167q.053-2.1 1.357-2.916 1.315-.827 3.043-.827 2.004 0 3.255.763 1.24.764 1.24 2.375v6.542q0 .297.117.477.127.18.52.18.127 0 .286-.01.159-.021.34-.053v1.41q-.446.127-.68.16-.233.031-.636.031-.986 0-1.43-.7-.234-.37-.33-1.05-.583.764-1.675 1.326t-2.407.562q-1.58 0-2.587-.954-.996-.965-.996-2.407 0-1.58.986-2.45.986-.869 2.587-1.07zm-1.58-4.75z" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M18.8 33.9c3.328 0 4.776-2.603 4.776-7.066s-1.448-7.066-4.776-7.066-4.776 2.603-4.776 7.066S15.473 33.9 18.8 33.9zm0-1.429c-2.192 0-3.073-1.781-3.073-4.522v-2.23c0-2.741.88-4.523 3.073-4.523s3.073 1.782 3.073 4.522v2.231c0 2.74-.88 4.522-3.073 4.522zm-6.306 1.194v-1.429H8.892V20.002H6.328l-3.621 3.386.959 1.038 3.445-3.21h.137v11.02H3.333v1.429zm11.2-17.7v-1.429h-3.602V2.302h-2.564l-3.621 3.386.959 1.038 3.445-3.21h.137v11.02h-3.915v1.429zM7.5 16.2c3.327 0 4.776-2.603 4.776-7.066S10.828 2.068 7.5 2.068 2.725 4.67 2.725 9.134 4.173 16.2 7.5 16.2zm0-1.429c-2.193 0-3.074-1.781-3.074-4.522V8.02c0-2.741.881-4.523 3.074-4.523s3.073 1.782 3.073 4.522v2.231c0 2.74-.881 4.522-3.073 4.522z" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M9.96 21.98a5 5 0 1 1 6.11-7.917zm3.035-13.973c-5.512 0-10 4.488-10 10s4.488 9.998 10 9.998 10-4.486 10-9.998-4.488-10-10-10zm0 1.816c4.53 0 8.182 3.655 8.182 8.184s-3.652 8.182-8.182 8.182-8.181-3.653-8.181-8.182 3.652-8.184 8.181-8.184z" color="#000" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M14.33 27.19q2.916-.136 4.024-2.131.58-1.024.58-2.37 0-2.132-1.569-3.24-.904-.648-3.035-1.228zM8.55 10.736q0 1.688 1.108 2.643 1.125.955 3.018 1.33V6.695q-2.234.085-3.189 1.364-.937 1.279-.937 2.677zm-3.07.205q0-2.592 1.893-4.672 1.91-2.08 5.337-2.115V1.887h1.62V4.12q3.393.239 5.2 2.012 1.825 1.757 1.91 4.655h-2.984q-.119-1.296-.699-2.233-1.074-1.723-3.427-1.808v8.287q3.956 1.108 5.371 2.08 2.302 1.603 2.302 4.74 0 4.536-2.95 6.446-1.637 1.057-4.723 1.398v3.308h-1.62v-3.308q-4.962-.324-6.735-3.513-.972-1.722-.972-4.655h3.018q.136 2.336.733 3.41 1.057 1.927 3.922 2.166v-9.293q-3.683-.699-5.44-2.336Q5.48 13.84 5.48 10.941z" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-337.103 -913.25) scale(1.2585)" fill="#444" stroke-width=".795"><circle cx="284.36" cy="733.68" r="1.5" color="#000" style="isolation:auto;mix-blend-mode:normal"/><circle cx="284.33" cy="740.74" r="1.5" color="#000" style="isolation:auto;mix-blend-mode:normal"/><path d="M276.18 727.78l4.396-1.565v18.515c-.711 2.606-2.922 4.394-5.812 5.812l-4.135 1.974-.559-1.192 3.353-1.639c1.459-.724 2.689-1.87 2.869-4.955z" fill-rule="evenodd"/></g></svg>

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M15 5.225v-1.92h2.24q.608 0 1.216.288.608.256 1.12.8.48.512.8 1.312.32.768.32 1.792v5.824q0 .832.224 1.536t.608 1.216q.352.48.832.768.48.256.992.256v2.176q-.512 0-.992.256t-.832.736q-.384.48-.608 1.184t-.224 1.568v5.792q0 1.024-.32 1.792-.32.8-.8 1.312-.512.544-1.12.8-.608.288-1.216.288H15v-1.92h1.6q.48 0 .768-.256.288-.224.48-.64.16-.384.224-.896.064-.48.064-.96v-5.824q0-1.216.352-2.016.32-.8.768-1.28.448-.512.928-.736.448-.224.736-.256v-.096q-.288-.064-.736-.32-.48-.256-.928-.768t-.768-1.28q-.352-.8-.352-1.92V7.977q0-.512-.064-.992-.064-.512-.224-.896-.192-.384-.48-.608-.288-.256-.768-.256zm-3.648 0v-1.92h-2.24q-.608 0-1.216.288-.608.256-1.12.8-.48.512-.8 1.312-.32.768-.32 1.792v5.824q0 .832-.224 1.536t-.608 1.216q-.352.48-.832.768-.48.256-.992.256v2.176q.512 0 .992.256t.832.736q.384.48.608 1.184t.224 1.568v5.792q0 1.024.32 1.792.32.8.8 1.312.512.544 1.12.8.608.288 1.216.288h2.24v-1.92h-1.6q-.48 0-.768-.256-.288-.224-.48-.64-.16-.384-.224-.896-.064-.48-.064-.96v-5.824q0-1.216-.352-2.016-.32-.8-.768-1.28-.448-.512-.928-.736-.448-.224-.736-.256v-.096q.288-.064.736-.32.48-.256.928-.768t.768-1.28q.352-.8.352-1.92V7.977q0-.512.064-.992.064-.512.224-.896.192-.384.48-.608.288-.256.768-.256z" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M2 19h5v5H2zm16.099-3.304v-5.659h-2.654v5.66l-5.309-2.004-.901 2.404L14.543 18l-3.255 4.557 2.254 1.553 3.255-4.808 3.455 4.808 2.054-1.553L19 18l5.46-1.903-1.002-2.404z" color="#000" fill="#444444"/></svg>

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 B

View File

@ -0,0 +1 @@
<svg width="26" height="36" xmlns="http://www.w3.org/2000/svg"><path d="M11 5v5.77a7.542 7.542 0 0 0-5.234 5.25L1 16c-1.432 1.397-1.232 2.722 0 4l4.75-.078a7.542 7.542 0 0 0 5.22 5.297L11 31c1.316 1.303 2.649 1.363 4 0l.009-5.775A7.542 7.542 0 0 0 20.228 20H25c1.261-1.294 1.404-2.623 0-4l-4.774-.01a7.542 7.542 0 0 0-5.23-5.22L15 5c-1.3-1.273-2.63-1.393-4 0zm2 7.499c3.05 0 5.5 2.45 5.5 5.5s-2.45 5.5-5.5 5.5-5.5-2.45-5.5-5.5 2.45-5.5 5.5-5.5z" color="#000" fill="#444"/></svg>

After

Width:  |  Height:  |  Size: 479 B

View File

@ -362,7 +362,7 @@ RED.nodes = (function() {
name:{value:""}, name:{value:""},
env:{value:[]} env:{value:[]}
}, },
icon: function() { return sf.icon||"subflow.png" }, icon: function() { return sf.icon||"subflow.svg" },
category: sf.category || "subflows", category: sf.category || "subflows",
inputs: sf.in.length, inputs: sf.in.length,
outputs: sf.out.length, outputs: sf.out.length,
@ -583,7 +583,7 @@ RED.nodes = (function() {
node.outputLabels = n.outputLabels.slice(); node.outputLabels = n.outputLabels.slice();
} }
if (n.icon) { if (n.icon) {
if (n.icon !== "node-red/subflow.png") { if (n.icon !== "node-red/subflow.svg") {
node.icon = n.icon; node.icon = n.icon;
} }
} }

View File

@ -71,7 +71,7 @@ RED.menu = (function() {
} }
if (opt.icon !== undefined) { if (opt.icon !== undefined) {
if (/\.png/.test(opt.icon)) { if (/\.(png|svg)/.test(opt.icon)) {
linkContent += '<img src="'+opt.icon+'"/> '; linkContent += '<img src="'+opt.icon+'"/> ';
} else { } else {
linkContent += '<i class="'+(opt.icon?opt.icon:'" style="display: inline-block;"')+'"></i> '; linkContent += '<i class="'+(opt.icon?opt.icon:'" style="display: inline-block;"')+'"></i> ';

View File

@ -32,6 +32,12 @@
return v; return v;
} }
} }
var mapDeprecatedIcon = function(icon) {
if (/^red\/images\/typedInput\/.+\.png$/.test(icon)) {
icon = icon.replace(/.png$/,".svg");
}
return icon;
}
var allOptions = { var allOptions = {
msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression}, msg: {value:"msg",label:"msg.",validate:RED.utils.validatePropertyExpression},
flow: {value:"flow",label:"flow.",hasValue:true, flow: {value:"flow",label:"flow.",hasValue:true,
@ -46,13 +52,13 @@
parse: contextParse, parse: contextParse,
export: contextExport export: contextExport
}, },
str: {value:"str",label:"string",icon:"red/images/typedInput/az.png"}, str: {value:"str",label:"string",icon:"red/images/typedInput/az.svg"},
num: {value:"num",label:"number",icon:"red/images/typedInput/09.png",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/}, num: {value:"num",label:"number",icon:"red/images/typedInput/09.svg",validate:/^[+-]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?$/},
bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.png",options:["true","false"]}, bool: {value:"bool",label:"boolean",icon:"red/images/typedInput/bool.svg",options:["true","false"]},
json: { json: {
value:"json", value:"json",
label:"JSON", label:"JSON",
icon:"red/images/typedInput/json.png", icon:"red/images/typedInput/json.svg",
validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}}, validate: function(v) { try{JSON.parse(v);return true;}catch(e){return false;}},
expand: function() { expand: function() {
var that = this; var that = this;
@ -74,12 +80,12 @@
}) })
} }
}, },
re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.png"}, re: {value:"re",label:"regular expression",icon:"red/images/typedInput/re.svg"},
date: {value:"date",label:"timestamp",hasValue:false}, date: {value:"date",label:"timestamp",hasValue:false},
jsonata: { jsonata: {
value: "jsonata", value: "jsonata",
label: "expression", label: "expression",
icon: "red/images/typedInput/expr.png", icon: "red/images/typedInput/expr.svg",
validate: function(v) { try{jsonata(v);return true;}catch(e){return false;}}, validate: function(v) { try{jsonata(v);return true;}catch(e){return false;}},
expand:function() { expand:function() {
var that = this; var that = this;
@ -94,7 +100,7 @@
bin: { bin: {
value: "bin", value: "bin",
label: "buffer", label: "buffer",
icon: "red/images/typedInput/bin.png", icon: "red/images/typedInput/bin.svg",
expand: function() { expand: function() {
var that = this; var that = this;
RED.editor.editBuffer({ RED.editor.editBuffer({
@ -108,12 +114,12 @@
env: { env: {
value: "env", value: "env",
label: "env variable", label: "env variable",
icon: "red/images/typedInput/env.png" icon: "red/images/typedInput/env.svg"
}, },
node: { node: {
value: "node", value: "node",
label: "node", label: "node",
icon: "red/images/typedInput/target.png", icon: "red/images/typedInput/target.svg",
valueLabel: function(container,value) { valueLabel: function(container,value) {
var node = RED.nodes.node(value); var node = RED.nodes.node(value);
var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).css({ var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).css({
@ -353,7 +359,7 @@
if (opt.icon.indexOf("<") === 0) { if (opt.icon.indexOf("<") === 0) {
$(opt.icon).prependTo(op); $(opt.icon).prependTo(op);
} else if (opt.icon.indexOf("/") !== -1) { } else if (opt.icon.indexOf("/") !== -1) {
$('<img>',{src:opt.icon,style:"margin-right: 4px; height: 18px;"}).prependTo(op); $('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px; height: 18px;"}).prependTo(op);
} else { } else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op); $('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(op);
} }
@ -507,7 +513,7 @@
$(o.icon).prependTo(this.optionSelectLabel); $(o.icon).prependTo(this.optionSelectLabel);
} else if (o.icon.indexOf("/") !== -1) { } else if (o.icon.indexOf("/") !== -1) {
// url // url
$('<img>',{src:o.icon,style:"height: 18px;"}).prependTo(this.optionSelectLabel); $('<img>',{src:mapDeprecatedIcon(o.icon),style:"height: 18px;"}).prependTo(this.optionSelectLabel);
} else { } else {
// icon class // icon class
$('<i>',{class:"red-ui-typedInput-icon "+o.icon}).prependTo(this.optionSelectLabel); $('<i>',{class:"red-ui-typedInput-icon "+o.icon}).prependTo(this.optionSelectLabel);
@ -619,8 +625,8 @@
else if (opt.icon.indexOf("/") !== -1) { else if (opt.icon.indexOf("/") !== -1) {
image = new Image(); image = new Image();
image.name = opt.icon; image.name = opt.icon;
image.src = opt.icon; image.src = mapDeprecatedIcon(opt.icon);
$('<img>',{src:opt.icon,style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel); $('<img>',{src:mapDeprecatedIcon(opt.icon),style:"margin-right: 4px;height: 18px;"}).prependTo(this.selectLabel);
} }
else { else {
$('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(this.selectLabel); $('<i>',{class:"red-ui-typedInput-icon "+opt.icon}).prependTo(this.selectLabel);

View File

@ -17,9 +17,9 @@
RED.deploy = (function() { RED.deploy = (function() {
var deploymentTypes = { var deploymentTypes = {
"full":{img:"red/images/deploy-full-o.png"}, "full":{img:"red/images/deploy-full-o.svg"},
"nodes":{img:"red/images/deploy-nodes-o.png"}, "nodes":{img:"red/images/deploy-nodes-o.svg"},
"flows":{img:"red/images/deploy-flows-o.png"} "flows":{img:"red/images/deploy-flows-o.svg"}
} }
var ignoreDeployWarnings = { var ignoreDeployWarnings = {
@ -44,7 +44,7 @@ RED.deploy = (function() {
* type: "default" - Button with drop-down options - no further customisation available * type: "default" - Button with drop-down options - no further customisation available
* type: "simple" - Button without dropdown. Customisations: * type: "simple" - Button without dropdown. Customisations:
* label: the text to display - default: "Deploy" * label: the text to display - default: "Deploy"
* icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.png" * icon : the icon to use. Null removes the icon. default: "red/images/deploy-full-o.svg"
*/ */
function init(options) { function init(options) {
options = options || {}; options = options || {};
@ -54,7 +54,7 @@ RED.deploy = (function() {
$('<li><span class="red-ui-deploy-button-group button-group">'+ $('<li><span class="red-ui-deploy-button-group button-group">'+
'<a id="red-ui-header-button-deploy" class="red-ui-deploy-button disabled" href="#">'+ '<a id="red-ui-header-button-deploy" class="red-ui-deploy-button disabled" href="#">'+
'<span class="red-ui-deploy-button-content">'+ '<span class="red-ui-deploy-button-content">'+
'<img id="red-ui-header-button-deploy-icon" src="red/images/deploy-full-o.png"> '+ '<img id="red-ui-header-button-deploy-icon" src="red/images/deploy-full-o.svg"> '+
'<span>'+RED._("deploy.deploy")+'</span>'+ '<span>'+RED._("deploy.deploy")+'</span>'+
'</span>'+ '</span>'+
'<span class="red-ui-deploy-button-spinner hide">'+ '<span class="red-ui-deploy-button-spinner hide">'+
@ -65,17 +65,17 @@ RED.deploy = (function() {
'</span></li>').prependTo(".red-ui-header-toolbar"); '</span></li>').prependTo(".red-ui-header-toolbar");
RED.menu.init({id:"red-ui-header-button-deploy-options", RED.menu.init({id:"red-ui-header-button-deploy-options",
options: [ options: [
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}}, {id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.svg",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}},
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}}, {id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.svg",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}},
{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}}, {id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.svg",label:RED._("deploy.modifiedNodes"),sublabel:RED._("deploy.modifiedNodesDesc"),onselect:function(s) { if(s){changeDeploymentType("nodes")}}},
null, null,
{id:"deploymenu-item-reload", icon:"red/images/deploy-reload.png",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"}, {id:"deploymenu-item-reload", icon:"red/images/deploy-reload.svg",label:RED._("deploy.restartFlows"),sublabel:RED._("deploy.restartFlowsDesc"),onselect:"core:restart-flows"},
] ]
}); });
} else if (type == "simple") { } else if (type == "simple") {
var label = options.label || RED._("deploy.deploy"); var label = options.label || RED._("deploy.deploy");
var icon = 'red/images/deploy-full-o.png'; var icon = 'red/images/deploy-full-o.svg';
if (options.hasOwnProperty('icon')) { if (options.hasOwnProperty('icon')) {
icon = options.icon; icon = options.icon;
} }

View File

@ -399,7 +399,7 @@ RED.diff = (function() {
diff: localDiff, diff: localDiff,
def: { def: {
defaults:{}, defaults:{},
icon:"subflow.png", icon:"subflow.svg",
category: "subflows", category: "subflows",
color: "#da9" color: "#da9"
}, },
@ -422,7 +422,7 @@ RED.diff = (function() {
diff: localDiff, diff: localDiff,
def: { def: {
defaults:{}, defaults:{},
icon:"subflow.png", icon:"subflow.svg",
category: "subflows", category: "subflows",
color: "#da9" color: "#da9"
}, },
@ -443,7 +443,7 @@ RED.diff = (function() {
remoteDiff: remoteDiff, remoteDiff: remoteDiff,
def: { def: {
defaults:{}, defaults:{},
icon:"subflow.png", icon:"subflow.svg",
category: "subflows", category: "subflows",
color: "#da9" color: "#da9"
}, },
@ -549,7 +549,7 @@ RED.diff = (function() {
if (def === undefined) { if (def === undefined) {
if (/^subflow:/.test(node.type)) { if (/^subflow:/.test(node.type)) {
def = { def = {
icon:"subflow.png", icon:"subflow.svg",
category: "subflows", category: "subflows",
color: "#da9", color: "#da9",
defaults:{name:{value:""}} defaults:{name:{value:""}}

View File

@ -2156,7 +2156,7 @@ RED.editor = (function() {
changed = true; changed = true;
} }
var icon = $("#red-ui-editor-node-icon").text()||""; var icon = $("#red-ui-editor-node-icon").text()||"";
if ((editing_node.icon === undefined && icon !== "node-red/subflow.png") || if ((editing_node.icon === undefined && icon !== "node-red/subflow.svg") ||
(editing_node.icon !== undefined && editing_node.icon !== icon)) { (editing_node.icon !== undefined && editing_node.icon !== icon)) {
changes.icon = editing_node.icon; changes.icon = editing_node.icon;
editing_node.icon = icon; editing_node.icon = icon;

View File

@ -802,13 +802,13 @@ RED.utils = (function() {
function getDefaultNodeIcon(def,node) { function getDefaultNodeIcon(def,node) {
var icon_url; var icon_url;
if (node && node.type === "subflow") { if (node && node.type === "subflow") {
icon_url = "node-red/subflow.png"; icon_url = "node-red/subflow.svg";
} else if (typeof def.icon === "function") { } else if (typeof def.icon === "function") {
try { try {
icon_url = def.icon.call(node); icon_url = def.icon.call(node);
} catch(err) { } catch(err) {
console.log("Definition error: "+def.type+".icon",err); console.log("Definition error: "+def.type+".icon",err);
icon_url = "arrow-in.png"; icon_url = "arrow-in.svg";
} }
} else { } else {
icon_url = def.icon; icon_url = def.icon;
@ -838,11 +838,11 @@ RED.utils = (function() {
function getNodeIcon(def,node) { function getNodeIcon(def,node) {
if (def.category === 'config') { if (def.category === 'config') {
return RED.settings.apiRootUrl+"icons/node-red/cog.png" return RED.settings.apiRootUrl+"icons/node-red/cog.svg"
} else if (node && node.type === 'tab') { } else if (node && node.type === 'tab') {
return RED.settings.apiRootUrl+"icons/node-red/subflow.png" return RED.settings.apiRootUrl+"icons/node-red/subflow.svg"
} else if (node && node.type === 'unknown') { } else if (node && node.type === 'unknown') {
return RED.settings.apiRootUrl+"icons/node-red/alert.png" return RED.settings.apiRootUrl+"icons/node-red/alert.svg"
} else if (node && node.icon) { } else if (node && node.icon) {
var iconPath = separateIconPath(node.icon); var iconPath = separateIconPath(node.icon);
if (isIconExists(iconPath)) { if (isIconExists(iconPath)) {
@ -851,6 +851,11 @@ RED.utils = (function() {
} else { } else {
return RED.settings.apiRootUrl+"icons/" + node.icon; return RED.settings.apiRootUrl+"icons/" + node.icon;
} }
} else if (iconPath.module !== "font-awesome" && /.png$/i.test(iconPath.file)) {
iconPath.file = iconPath.file.replace(/.png$/,".svg");
if (isIconExists(iconPath)) {
return RED.settings.apiRootUrl+"icons/" + node.icon.replace(/.png$/,".svg");
}
} }
} }
@ -861,17 +866,32 @@ RED.utils = (function() {
} else { } else {
return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
} }
} else { }
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. // This could be a non-core node trying to use a core icon.
iconPath.module = 'node-red'; iconPath.module = 'node-red';
if (isIconExists(iconPath)) { if (isIconExists(iconPath)) {
return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file; return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
} else if (def.category === 'subflows') { }
return RED.settings.apiRootUrl+"icons/node-red/subflow.png"; if (/.png$/i.test(iconPath.file)) {
} else { iconPath.file = iconPath.file.replace(/.png$/,".svg");
return RED.settings.apiRootUrl+"icons/node-red/arrow-in.png"; if (isIconExists(iconPath)) {
return RED.settings.apiRootUrl+"icons/"+iconPath.module+"/"+iconPath.file;
} }
} }
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) { function getNodeLabel(node,defaultLabel) {
@ -1007,7 +1027,7 @@ RED.utils = (function() {
return; return;
} }
// If the specified name is not defined in font-awesome, show arrow-in icon. // If the specified name is not defined in font-awesome, show arrow-in icon.
iconUrl = RED.settings.apiRootUrl+"icons/node-red/arrow-in.png" iconUrl = RED.settings.apiRootUrl+"icons/node-red/arrow-in.svg"
} }
var imageIconElement = $('<div/>',{class:"red-ui-palette-icon"}).appendTo(iconContainer); var imageIconElement = $('<div/>',{class:"red-ui-palette-icon"}).appendTo(iconContainer);
imageIconElement.css("backgroundImage", "url("+iconUrl+")"); imageIconElement.css("backgroundImage", "url("+iconUrl+")");

View File

@ -2463,14 +2463,22 @@ RED.view = (function() {
.attr("class","red-ui-flow-node-icon") .attr("class","red-ui-flow-node-icon")
.attr("x",0) .attr("x",0)
.attr("width","30") .attr("width","30")
.attr("height","30"); .attr("height","30")
.style("display","none");
var img = new Image(); var img = new Image();
img.src = iconUrl; img.src = iconUrl;
img.onload = function() { img.onload = function() {
icon.attr("width",Math.min(img.width,30)); var largestEdge = Math.max(img.width,img.height);
icon.attr("height",Math.min(img.height,30)); var scaleFactor = 1;
icon.attr("x",15-Math.min(img.width,30)/2); if (largestEdge > 30) {
scaleFactor = 30/largestEdge;
}
var width = img.width * scaleFactor;
var height = img.height * scaleFactor;
icon.attr("width",width);
icon.attr("height",height);
icon.attr("x",15-width/2);
icon.attr("xlink:href",iconUrl); icon.attr("xlink:href",iconUrl);
icon.style("display",null); icon.style("display",null);
//if ("right" == d._def.align) { //if ("right" == d._def.align) {

View File

@ -439,7 +439,7 @@ RED.workspaces = (function() {
if (!workspace_tabs.contains(id)) { if (!workspace_tabs.contains(id)) {
var sf = RED.nodes.subflow(id); var sf = RED.nodes.subflow(id);
if (sf) { if (sf) {
addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.png",label:sf.name, closeable: true}); addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.svg",label:sf.name, closeable: true});
} else { } else {
return; return;
} }

View File

@ -168,7 +168,7 @@
once: {value:false}, once: {value:false},
onceDelay: {value:0.1} onceDelay: {value:0.1}
}, },
icon: "inject.png", icon: "inject.svg",
inputs:0, inputs:0,
outputs:1, outputs:1,
outputLabels: function(index) { outputLabels: function(index) {

View File

@ -34,7 +34,7 @@
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "alert.png", icon: "alert.svg",
label: function() { label: function() {
if (this.name) { if (this.name) {
return this.name; return this.name;

View File

@ -22,14 +22,14 @@
<script type="text/javascript"> <script type="text/javascript">
RED.nodes.registerType('status',{ RED.nodes.registerType('status',{
category: 'input', category: 'input',
color:"#c0edc0", color:"#d9f4fd",
defaults: { defaults: {
name: {value:""}, name: {value:""},
scope: {value:null} scope: {value:null}
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "alert.png", icon: "alert.svg",
label: function() { label: function() {
return this.name||(this.scope?this._("status.statusNodes",{number:this.scope.length}):this._("status.status")); return this.name||(this.scope?this._("status.statusNodes",{number:this.scope.length}):this._("status.status"));
}, },

View File

@ -65,7 +65,7 @@
color:"#87a980", color:"#87a980",
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "debug.png", icon: "debug.svg",
align: "right", align: "right",
button: { button: {
toggle: "active", toggle: "active",

View File

@ -170,7 +170,7 @@
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "link-out.png", icon: "link-out.svg",
outputLabels: function(i) { outputLabels: function(i) {
return this.name||this._("link.linkIn"); return this.name||this._("link.linkIn");
}, },
@ -200,7 +200,7 @@
align:"right", align:"right",
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "link-out.png", icon: "link-out.svg",
inputLabels: function(i) { inputLabels: function(i) {
return this.name||this._("link.linkOut"); return this.name||this._("link.linkOut");
}, },

View File

@ -73,7 +73,7 @@
this._("exec.label.retcode") this._("exec.label.retcode")
][i]; ][i];
}, },
icon: "arrow-in.png", icon: "arrow-in.svg",
align: "right", align: "right",
label: function() { label: function() {
return this.name||this.command||(this.useSpawn=="true"?this._("exec.spawn"):this._("exec.exec")); return this.name||this.command||(this.useSpawn=="true"?this._("exec.spawn"):this._("exec.exec"));

View File

@ -31,7 +31,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "function.png", icon: "function.svg",
label: function() { label: function() {
return this.name||this._("function.function"); return this.name||this._("function.function");
}, },

View File

@ -63,7 +63,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "template.png", icon: "template.svg",
label: function() { label: function() {
return this.name||this._("template.template");; return this.name||this._("template.template");;
}, },

View File

@ -114,7 +114,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "timer.png", icon: "timer.svg",
label: function() { label: function() {
if (this.name) { if (this.name) {
return this.name; return this.name;

View File

@ -87,7 +87,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "trigger.png", icon: "trigger.svg",
label: function() { label: function() {
if (this.duration > 0) { if (this.duration > 0) {
return this.name|| this._("trigger.label.trigger")+" "+this.duration+this.units; return this.name|| this._("trigger.label.trigger")+" "+this.duration+this.units;

View File

@ -20,7 +20,7 @@
}, },
inputs:0, inputs:0,
outputs:0, outputs:0,
icon: "comment.png", icon: "comment.svg",
label: function() { label: function() {
return this.name||this._("comment.comment"); return this.name||this._("comment.comment");
}, },

View File

@ -57,7 +57,7 @@
color:"#d8bfd8", color:"#d8bfd8",
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "bridge.png", icon: "bridge.svg",
label: function() { label: function() {
return this.name||this.topic||"mqtt"; return this.name||this.topic||"mqtt";
}, },
@ -118,7 +118,7 @@
color:"#d8bfd8", color:"#d8bfd8",
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "bridge.png", icon: "bridge.svg",
align: "right", align: "right",
label: function() { label: function() {
return this.name||this.topic||"mqtt"; return this.name||this.topic||"mqtt";

View File

@ -77,7 +77,7 @@
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "white-globe.png", icon: "white-globe.svg",
label: function() { label: function() {
if (this.name) { if (this.name) {
return this.name; return this.name;
@ -152,7 +152,7 @@
inputs:1, inputs:1,
outputs:0, outputs:0,
align: "right", align: "right",
icon: "white-globe.png", icon: "white-globe.svg",
label: function() { label: function() {
return this.name||("http"+(this.statusCode?" ("+this.statusCode+")":"")); return this.name||("http"+(this.statusCode?" ("+this.statusCode+")":""));
}, },

View File

@ -118,7 +118,7 @@
obj: this._("httpin.label.jsonObject") obj: this._("httpin.label.jsonObject")
}[this.ret]); }[this.ret]);
}, },
icon: "white-globe.png", icon: "white-globe.svg",
label: function() { label: function() {
return this.name||this._("httpin.httpreq"); return this.name||this._("httpin.httpreq");
}, },

View File

@ -106,7 +106,7 @@
color:"rgb(215, 215, 160)", color:"rgb(215, 215, 160)",
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "white-globe.png", icon: "white-globe.svg",
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";
}, },
@ -125,7 +125,7 @@
color:"rgb(215, 215, 160)", color:"rgb(215, 215, 160)",
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "white-globe.png", icon: "white-globe.svg",
align: "right", align: "right",
labelStyle: function() { labelStyle: function() {
return this.name?"node_label_italic":""; return this.name?"node_label_italic":"";

View File

@ -42,7 +42,7 @@
color:"BurlyWood", color:"BurlyWood",
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "watch.png", icon: "watch.svg",
label: function() { label: function() {
return this.name||this.files||this._("watch.watch"); return this.name||this.files||this._("watch.watch");
}, },

View File

@ -72,7 +72,7 @@
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "bridge-dash.png", icon: "bridge-dash.svg",
label: function() { label: function() {
return this.name || "tcp:"+(this.host?this.host+":":"")+this.port; return this.name || "tcp:"+(this.host?this.host+":":"")+this.port;
}, },
@ -155,7 +155,7 @@
}, },
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "bridge-dash.png", icon: "bridge-dash.svg",
align: "right", align: "right",
label: function() { label: function() {
return this.name || "tcp:"+(this.host?this.host+":":"")+this.port; return this.name || "tcp:"+(this.host?this.host+":":"")+this.port;
@ -226,7 +226,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "bridge-dash.png", icon: "bridge-dash.svg",
label: function() { label: function() {
return this.name || "tcp:"+(this.server?this.server+":":"")+this.port; return this.name || "tcp:"+(this.server?this.server+":":"")+this.port;
}, },

View File

@ -70,7 +70,7 @@
}, },
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "bridge-dash.png", icon: "bridge-dash.svg",
label: function() { label: function() {
if (this.multicast=="false") { if (this.multicast=="false") {
return this.name||"udp "+this.port; return this.name||"udp "+this.port;
@ -173,7 +173,7 @@
}, },
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "bridge-dash.png", icon: "bridge-dash.svg",
align: "right", align: "right",
label: function() { label: function() {
return this.name||"udp "+(this.addr+":"+this.port); return this.name||"udp "+(this.addr+":"+this.port);

View File

@ -117,7 +117,7 @@
return label; return label;
} }
}, },
icon: "switch.png", icon: "switch.svg",
label: function() { label: function() {
return this.name||this._("switch.switch"); return this.name||this._("switch.switch");
}, },

View File

@ -28,7 +28,7 @@
}, },
inputs: 1, inputs: 1,
outputs: 1, outputs: 1,
icon: "swap.png", icon: "swap.svg",
label: function() { label: function() {
function prop2name(type, key) { function prop2name(type, key) {
var result = RED.utils.parseContextKey(key); var result = RED.utils.parseContextKey(key);

View File

@ -52,7 +52,7 @@
}, },
inputs: 1, inputs: 1,
outputs: 1, outputs: 1,
icon: "range.png", icon: "range.svg",
label: function() { label: function() {
if (this.minout !== "" && this.maxout !== "") { return this.name||this.minout + " - " + this.maxout; } if (this.minout !== "" && this.maxout !== "") { return this.name||this.minout + " - " + this.maxout; }
else { return this.name||this._("range.range"); } else { return this.name||this._("range.range"); }

View File

@ -61,7 +61,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "split.png", icon: "split.svg",
label: function() { label: function() {
return this.name||this._("split.split"); return this.name||this._("split.split");
}, },
@ -218,7 +218,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "join.png", icon: "join.svg",
label: function() { label: function() {
return this.name||this._("join.join"); return this.name||this._("join.join");
}, },

View File

@ -75,7 +75,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "sort.png", icon: "sort.svg",
label: function() { label: function() {
return this.name||this._("sort.sort"); return this.name||this._("sort.sort");
}, },

View File

@ -81,7 +81,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "batch.png", icon: "batch.svg",
label: function() { label: function() {
return this.name||this._("batch.batch");; return this.name||this._("batch.batch");;
}, },

View File

@ -78,7 +78,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "parser-csv.png", icon: "parser-csv.svg",
label: function() { label: function() {
return this.name||"csv"; return this.name||"csv";
}, },

View File

@ -49,7 +49,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "parser-html.png", icon: "parser-html.svg",
label: function() { label: function() {
return this.name||this.tag||"html"; return this.name||this.tag||"html";
}, },

View File

@ -37,7 +37,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "parser-json.png", icon: "parser-json.svg",
label: function() { label: function() {
return this.name||"json"; return this.name||"json";
}, },

View File

@ -32,7 +32,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "parser-xml.png", icon: "parser-xml.svg",
label: function() { label: function() {
return this.name||"xml"; return this.name||"xml";
}, },

View File

@ -20,7 +20,7 @@
}, },
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "parser-yaml.png", icon: "parser-yaml.svg",
label: function() { label: function() {
return this.name||"yaml"; return this.name||"yaml";
}, },

View File

@ -205,7 +205,7 @@
color:"BurlyWood", color:"BurlyWood",
inputs:1, inputs:1,
outputs:1, outputs:1,
icon: "file-out.png", icon: "file-out.svg",
label: function() { label: function() {
if (this.overwriteFile === "delete") { if (this.overwriteFile === "delete") {
return this.name||this._("file.label.deletelabel",{file:this.filename}); return this.name||this._("file.label.deletelabel",{file:this.filename});
@ -273,7 +273,7 @@
outputLabels: function(i) { outputLabels: function(i) {
return (this._((this.format === "utf8") ? "file.label.utf8String" : "file.label.binaryBuffer")); return (this._((this.format === "utf8") ? "file.label.utf8String" : "file.label.binaryBuffer"));
}, },
icon: "file-in.png", icon: "file-in.svg",
label: function() { label: function() {
return this.name||this.filename||this._("file.label.filelabel"); return this.name||this.filename||this._("file.label.filelabel");
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-216.74 -415.04) scale(.62143)" fill="#fff"><path d="M371.3 683.97l1.61-1.61H389l1.61 1.61-3.219 40.23-3.218 3.218h-6.437l-3.219-3.218z"/><rect x="372.91" y="735.47" width="16.092" height="16.092" ry="3.017" color="#000"/></g></svg>

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M18 5v12H7v26h11v12l14-25z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><g fill="#fff" stroke-width=".612"><path d="M34.001 27.987l-4 .004v3.997l4-.01M40.001 27.987l-4 .004v3.997l4-.01M26.001 29.987l-7-7.986v15.986M34.001 13.987l-4 .004v3.997l4-.01M40.001 13.987l-4 .004v3.997l4-.01M34.001 41.988l-4 .003v3.997l4-.01M40.001 41.988l-4 .003v3.997l4-.01M8.001 27.987l-4 .004v3.997l4-.01M14.001 27.987l-4 .004v3.997l4-.01M8.001 19.987l-4 .004v3.997l4-.01M14.001 19.987l-4 .004v3.997l4-.01M8.001 35.987l-4 .004v3.997l4-.01M14.001 35.987l-4 .004v3.997l4-.01"/></g></svg>

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M19.924 6.61c4.372 5.433 7.182 13.893 7.182 23.397 0 9.493-2.804 17.946-7.167 23.379m-4.294-38.39c5.645 9.417 7.172 20.944.024 29.993m-4.36-21.661c1.338 1.459 2.215 3.906 2.215 6.68 0 2.571-.755 4.863-1.931 6.346" fill="none" stroke="#fff" stroke-dasharray="14.096, 3.524" stroke-width="3.524"/></svg>

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M19.924 6.61c4.372 5.433 7.182 13.893 7.182 23.397 0 9.493-2.804 17.946-7.167 23.379m-4.294-38.39c5.645 9.417 7.172 20.944.024 29.993m-4.36-21.661c1.338 1.459 2.215 3.906 2.215 6.68 0 2.571-.755 4.863-1.931 6.346" fill="none" stroke="#fff" stroke-width="3.224"/></svg>

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M20 12a18 18 0 0 0-3.494.36l-1.428 5.715-5.06-3.036a18 18 0 0 0-4.946 4.917l3.045 5.078-5.765 1.442A18 18 0 0 0 2 30a18 18 0 0 0 .345 3.434l5.775 1.444-3.072 5.12a18 18 0 0 0 4.893 4.924l5.137-3.083 1.455 5.82A18 18 0 0 0 20 48a18 18 0 0 0 3.47-.353l1.452-5.807 5.128 3.076a18 18 0 0 0 4.905-4.913l-3.074-5.124 5.783-1.446A18 18 0 0 0 38 30a18 18 0 0 0-.367-3.529l-5.75-1.437 3.041-5.069a18 18 0 0 0-4.937-4.928l-5.065 3.038-1.433-5.728A18 18 0 0 0 20 12zm0 9a9 9 0 0 1 9 9 9 9 0 0 1-9 9 9 9 0 0 1-9-9 9 9 0 0 1 9-9z" color="#000" fill="#fff" opacity=".98" style="isolation:auto;mix-blend-mode:normal"/></svg>

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M36.19 28.6c0 6.088-7.289 11.024-16.28 11.024a23.98 23.98 0 0 1-2.982-.185c-1.272-.159-7.933 7.526-13.113 6.53.18-2.004 8.18-6.004 5.87-8.79C5.993 35.16 3.63 32.066 3.63 28.6c0-6.088 7.289-11.024 16.28-11.024 8.991 0 16.28 4.936 16.28 11.024z" fill="#fff" stroke="#868686" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" style="isolation:auto;mix-blend-mode:normal"/></svg>

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-355 -704.36)"><ellipse transform="matrix(1.2868 0 0 1.9263 -64.444 -607.56)" cx="341.25" cy="688.61" rx="9.84" ry="3.25" color="#000" fill="#fff"/><path d="M387.32 750.48c0 1.949-5.669 5.879-12.662 5.879s-12.662-3.93-12.662-5.879v-27.043c0 1.949 5.669 6.242 12.662 6.242s12.662-4.293 12.662-6.242v27.043" color="#000" fill="#fff"/></g></svg>

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

View File

@ -0,0 +1 @@
<svg width="40" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M10.004 14.499h20M10.004 46.503h20M10.004 22.5h20M10.004 30.501h20M10.004 38.502h20" stroke="#fff" stroke-width="2.9997000000000003"/></svg>

After

Width:  |  Height:  |  Size: 213 B

Some files were not shown because too many files have changed in this diff Show More