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

Further simplify file node filename entry UX (v3)

fixes #3668
This commit is contained in:
Steve-Mcl 2022-06-16 11:38:19 +01:00
parent 59690328e2
commit 62a2a4a9f5
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?",