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

Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary 2023-02-20 18:17:16 +00:00
commit 196773d6ba
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
9 changed files with 53 additions and 14 deletions

View File

@ -699,7 +699,10 @@
"triggerAction": "Trigger action", "triggerAction": "Trigger action",
"find": "Find in workspace", "find": "Find in workspace",
"copyItemUrl": "Copy item url", "copyItemUrl": "Copy item url",
"copyURL2Clipboard": "Copied url to clipboard" "copyURL2Clipboard": "Copied url to clipboard",
"showFlow": "Show",
"hideFlow": "Hide",
"find": "Find in workspace"
}, },
"help": { "help": {
"name": "Help", "name": "Help",

View File

@ -699,7 +699,10 @@
"triggerAction": "アクションを実行", "triggerAction": "アクションを実行",
"find": "ワークスペース内を検索", "find": "ワークスペース内を検索",
"copyItemUrl": "要素のURLをコピー", "copyItemUrl": "要素のURLをコピー",
"copyURL2Clipboard": "URLをクリップボードにコピーしました" "copyURL2Clipboard": "URLをクリップボードにコピーしました",
"showFlow": "表示",
"hideFlow": "非表示",
"find": "ワークスペース内を検索"
}, },
"help": { "help": {
"name": "ヘルプ", "name": "ヘルプ",

View File

@ -135,6 +135,10 @@ RED.sidebar.info.outliner = (function() {
RED.workspaces.show(n.id, null, true); RED.workspaces.show(n.id, null, true);
} }
}); });
RED.popover.tooltip(toggleVisibleButton, function () {
var isHidden = !div.hasClass("red-ui-info-outline-item-hidden");
return RED._("sidebar.info." + (isHidden ? "hideFlow" : "showFlow"));
});
} }
if (n.type !== 'subflow') { if (n.type !== 'subflow') {
var toggleButton = $('<button type="button" class="red-ui-info-outline-item-control-disable red-ui-button red-ui-button-small"><i class="fa fa-circle-thin"></i><i class="fa fa-ban"></i></button>').appendTo(controls).on("click",function(evt) { var toggleButton = $('<button type="button" class="red-ui-info-outline-item-control-disable red-ui-button red-ui-button-small"><i class="fa fa-circle-thin"></i><i class="fa fa-ban"></i></button>').appendTo(controls).on("click",function(evt) {
@ -633,6 +637,9 @@ RED.sidebar.info.outliner = (function() {
objects[n.id].children = missingParents[n.id]; objects[n.id].children = missingParents[n.id];
delete missingParents[n.id] delete missingParents[n.id]
} }
if (objects[n.id].children.length === 0) {
objects[n.id].children.push(getEmptyItem(n.id));
}
} }
var parent = n.g||n.z||"__global__"; var parent = n.g||n.z||"__global__";

View File

@ -32,7 +32,7 @@
color: var(--red-ui-primary-text-color); color: var(--red-ui-primary-text-color);
border: 1px solid var(--red-ui-notification-border-default); border: 1px solid var(--red-ui-notification-border-default);
border-left-width: 16px; border-left-width: 16px;
overflow: scroll; overflow: auto;
max-height: 80vh; max-height: 80vh;
.ui-dialog-buttonset { .ui-dialog-buttonset {
margin-top: 20px; margin-top: 20px;

View File

@ -18,7 +18,16 @@
color:"#c0edc0", color:"#c0edc0",
defaults: { defaults: {
name: {value:""}, name: {value:""},
scope: {value:[], type:"*[]"}, scope: {
value: [],
type: "*[]",
validate: function (v, opt) {
if (v.length > 0) {
return true;
}
return RED._("node-red:complete.errors.scopeUndefined");
}
},
uncaught: {value:false} uncaught: {value:false}
}, },
inputs:0, inputs:0,

View File

@ -1,4 +1,3 @@
<script type="text/html" data-template-name="link in"> <script type="text/html" data-template-name="link in">
<div class="form-row"> <div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label> <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
@ -272,7 +271,17 @@
color:"#ddd",//"#87D8CF", color:"#ddd",//"#87D8CF",
defaults: { defaults: {
name: { value: "" }, name: { value: "" },
links: { value: [], type:"link in[]" }, links: {
value: [],
type: "link in[]",
validate: function (v, opt) {
if ((this.linkType === "static" && v.length > 0)
|| this.linkType === "dynamic") {
return true;
}
return RED._("node-red:link.errors.linkUndefined");
}
},
linkType: { value:"static" }, linkType: { value:"static" },
timeout: { timeout: {
value: "30", value: "30",

View File

@ -164,10 +164,10 @@ module.exports = function(RED) {
if (returnNode && returnNode.returnLinkMessage) { if (returnNode && returnNode.returnLinkMessage) {
returnNode.returnLinkMessage(messageEvent.id, msg); returnNode.returnLinkMessage(messageEvent.id, msg);
} else { } else {
node.warn(RED._("link.error.missingReturn")) node.warn(RED._("link.errors.missingReturn"));
} }
} else { } else {
node.warn(RED._("link.error.missingReturn")) node.warn(RED._("link.errors.missingReturn"));
} }
done(); done();
} else if (mode === "link") { } else if (mode === "link") {

View File

@ -119,7 +119,10 @@
} }
}, },
"complete": { "complete": {
"completeNodes": "complete: __number__" "completeNodes": "complete: __number__",
"errors": {
"scopeUndefined": "scope undefined"
}
}, },
"debug": { "debug": {
"output": "Output", "output": "Output",
@ -181,8 +184,9 @@
"staticLinkCall": "Fixed target", "staticLinkCall": "Fixed target",
"dynamicLinkCall": "Dynamic target (msg.target)", "dynamicLinkCall": "Dynamic target (msg.target)",
"dynamicLinkLabel": "Dynamic", "dynamicLinkLabel": "Dynamic",
"error": { "errors": {
"missingReturn": "Missing return node information" "missingReturn": "Missing return node information",
"linkUndefined": "link undefined"
} }
}, },
"tls": { "tls": {

View File

@ -119,7 +119,10 @@
} }
}, },
"complete": { "complete": {
"completeNodes": "complete: __number__" "completeNodes": "complete: __number__",
"errors": {
"scopeUndefined": "スコープが未定義"
}
}, },
"debug": { "debug": {
"output": "対象", "output": "対象",
@ -181,8 +184,9 @@
"staticLinkCall": "対象を固定で指定", "staticLinkCall": "対象を固定で指定",
"dynamicLinkCall": "対象を動的に指定 (msg.target)", "dynamicLinkCall": "対象を動的に指定 (msg.target)",
"dynamicLinkLabel": "動的", "dynamicLinkLabel": "動的",
"error": { "errors": {
"missingReturn": "返却するノードの情報が存在しません" "missingReturn": "返却するノードの情報が存在しません",
"linkUndefined": "リンクが未定義"
} }
}, },
"tls": { "tls": {