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

Merge pull request #3677 from Steve-Mcl/file-node-filename-ux

Further simplify file node filename entry UX (v3)
This commit is contained in:
Nick O'Leary 2022-06-16 13:13:43 +01:00 committed by GitHub
commit 22879f8c23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -198,8 +198,8 @@
category: 'storage', category: 'storage',
defaults: { defaults: {
name: {value:""}, name: {value:""},
filename: {value:"filename"}, filename: {value:""},
filenameType: {value:"msg"}, filenameType: {value:"str"},
appendNewline: {value:true}, appendNewline: {value:true},
createDir: {value:false}, createDir: {value:false},
overwriteFile: {value:"false"}, overwriteFile: {value:"false"},
@ -236,8 +236,8 @@
label: node._("file.encoding.setbymsg") label: node._("file.encoding.setbymsg")
}).text(label).appendTo(encSel); }).text(label).appendTo(encSel);
$("#node-input-filename").typedInput({ $("#node-input-filename").typedInput({
default: "msg", default: "str",
types: ["str", "msg", "jsonata", "env"], types: [{label:RED._("node-red:file.label.path"), value:"str", icon:""}, "msg", "jsonata", "env"],
typeField: $("#node-input-filenameType") typeField: $("#node-input-filenameType")
}); });
if(typeof node.filenameType == 'undefined') { if(typeof node.filenameType == 'undefined') {
@ -297,8 +297,8 @@
category: 'storage', category: 'storage',
defaults: { defaults: {
name: {value:""}, name: {value:""},
filename: {value:"filename"}, filename: {value:""},
filenameType: {value:"msg"}, filenameType: {value:"str"},
format: {value:"utf8"}, format: {value:"utf8"},
chunk: {value:false}, chunk: {value:false},
sendError: {value: false}, sendError: {value: false},
@ -341,8 +341,8 @@
label: label label: label
}).text(label).appendTo(encSel); }).text(label).appendTo(encSel);
$("#node-input-filename").typedInput({ $("#node-input-filename").typedInput({
default: "msg", default: "str",
types: ["str", "msg", "jsonata", "env"], types: [{label:RED._("node-red:file.label.path"), value:"str", icon:""}, "msg", "jsonata", "env"],
typeField: $("#node-input-filenameType") typeField: $("#node-input-filenameType")
}); });
if(typeof node.filenameType == 'undefined') { if(typeof node.filenameType == 'undefined') {

View File

@ -928,6 +928,7 @@
"write": "write file", "write": "write file",
"read": "read file", "read": "read file",
"filename": "Filename", "filename": "Filename",
"path": "path",
"action": "Action", "action": "Action",
"addnewline": "Add newline (\\n) to each payload?", "addnewline": "Add newline (\\n) to each payload?",
"createdir": "Create directory if it doesn't exist?", "createdir": "Create directory if it doesn't exist?",