diff --git a/README.md b/README.md index 9f3080d..0b3dea3 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,4 @@ To test you will want to add a few nodes to the database. To do so, use the upd or in the docker container running the application - docker exec -it flowlibrary_node_1 node tasks/update-one.js node-red-dashboard + docker exec -it flow-library_node_1 node tasks/update-one.js node-red-dashboard diff --git a/lib/modules.js b/lib/modules.js index 1c42a33..2f40885 100644 --- a/lib/modules.js +++ b/lib/modules.js @@ -226,6 +226,12 @@ function getNodeDefinitions(filename) { } else { errors.push({ code:"outputs-not-inline" }); } + } else if (nodeDef.key.name === 'align') { + if (nodeDef.value.type === 'Literal') { + defs[defType].align = nodeDef.value.value; + } else { + errors.push({ code:"align-not-inline" }); + } } }); } else { diff --git a/public/css/library.css b/public/css/library.css index 57d6449..6c0cce0 100644 --- a/public/css/library.css +++ b/public/css/library.css @@ -776,18 +776,30 @@ a:hover .gistbox-footer { position: absolute; top:0; bottom:0; - left:0; width: 30px; - border-right: 2px solid rgba(0,0,0,0.1); background-color: rgba(0,0,0,0.05); background-position: 50% 50%; background-size: contain; background-repeat: no-repeat; } +.palette_icon_left { + left:0; + border-right: 2px solid rgba(0,0,0,0.1); +} +.palette_icon_right { + right:0; + border-left: 2px solid rgba(0,0,0,0.1); +} .palette_label { padding: 0 10px; min-width: 90px; } +.palette_label-icon_left { + margin-left:28px; +} +.palette_label-icon_right { + margin-right:28px; +} .palette_node_config { border-color: #aaa; border-style: dashed; diff --git a/routes/nodes.js b/routes/nodes.js index 450cd37..3fdd0fd 100644 --- a/routes/nodes.js +++ b/routes/nodes.js @@ -62,6 +62,10 @@ app.get("/node/:scope(@[^\\/]{1,})?/:id([^@][^\\/]{1,})",csrfProtection,function } def.types[t].hasInputs = (def.types[t].inputs > 0); def.types[t].hasOutputs = (def.types[t].outputs > 0); + + def.types[t].leftIconAlignment = (def.types[t].align !== 'right'); + def.types[t].rightIconAlignment = (def.types[t].align === 'right'); + if (def.types[t].category == "config") { delete def.types[t].color; } diff --git a/template/_palettenode.html b/template/_palettenode.html index 19c7ee5..a3a15ee 100644 --- a/template/_palettenode.html +++ b/template/_palettenode.html @@ -1,7 +1,7 @@