Fixed more autocompletion pieces for the code editor and added header field parsing

This commit is contained in:
frikky
2022-07-22 16:47:16 +02:00
parent 32a0508a12
commit b4cb785651
9 changed files with 587 additions and 43 deletions
+5 -3
View File
@@ -3765,6 +3765,7 @@ const Admin = (props) => {
uploadFiles(files);
};
const filesView =
curTab === 3 ? (
<Dropzone
@@ -3965,6 +3966,8 @@ const Admin = (props) => {
bgColor = "#1f2023";
}
const isDisabledButton = isCloud || file.filesize < 100000 && file.status === ("active") && allowedFileTypes.includes(file.filename.split(".")[1]) === true
return (
<ListItem
key={index}
@@ -4079,7 +4082,7 @@ const Admin = (props) => {
>
<span>
<IconButton
disabled={isCloud || file.filesize < 100000 && file.status === ("active") && allowedFileTypes.includes(file.filename.split(".")[1]) === true ? false: true}
disabled={isDisabledButton ? false : true}
style = {{padding: "6px"}}
onClick={() => {
setOpenEditor(true)
@@ -4089,8 +4092,7 @@ const Admin = (props) => {
>
<EditIcon
style={{
color:
file.filesize < 100000 && file.status === ("active") && allowedFileTypes.includes(file.filename.split(".")[1]) === true
color: isDisabledButton === true
? "white"
: "grey",
}}
+1 -1
View File
@@ -1259,7 +1259,7 @@ const AngularWorkflow = (defaultprops) => {
}
for (var key in workflow.errors) {
alert.info(workflow.errors[key]);
//alert.info(workflow.errors[key]);
}
setWorkflow(workflow);
-4
View File
@@ -412,7 +412,6 @@ export const validateJson = (showResult) => {
jsonvalid = false
}
} catch (e) {
console.log("Bug1: ", e)
showResult = showResult.split("'").join('"');
try {
@@ -420,7 +419,6 @@ export const validateJson = (showResult) => {
jsonvalid = false;
}
} catch (e) {
console.log("Bug2: ", e)
jsonvalid = false;
}
@@ -430,7 +428,6 @@ export const validateJson = (showResult) => {
try {
result = jsonvalid ? JSON.parse(showResult, {"storeAsString": true}) : showResult;
} catch (e) {
console.log("Bug3: ", e)
////console.log("Failed parsing JSON even though its valid: ", e)
jsonvalid = false;
}
@@ -448,7 +445,6 @@ export const validateJson = (showResult) => {
result = JSON.parse(newstr)
jsonvalid = true
} catch (e) {
console.log("Bug4: ", e)
//console.log("Failed parsing JSON even though its valid (2): ", e)
jsonvalid = false