Fixed frontend vulnerabilities

This commit is contained in:
frikky
2021-02-03 03:03:50 +01:00
parent 7c0b0c8c2b
commit 11ddf604ec
5 changed files with 12 additions and 6 deletions
+2 -2
View File
@@ -1702,7 +1702,7 @@ const AppCreator = (props) => {
<FormControl style={{backgroundColor: surfaceColor, color: "white",}}>
<DialogTitle><div style={{color: "white"}}>New action</div></DialogTitle>
<DialogContent>
<a target="_blank" href="https://shuffler.io/docs/apps#actions" style={{textDecoration: "none", color: "#f85a3e"}}>Learn more about actions</Link>
<a target="_blank" href="https://shuffler.io/docs/workflows#conditions" style={{textDecoration: "none", color: "#f85a3e"}}>Learn more about actions</a>
<div style={{marginTop: "15px"}}/>
Name
<TextField
@@ -2033,7 +2033,7 @@ const AppCreator = (props) => {
<div style={{color: "white"}}>
<h2>Actions ({actions.length})</h2>
Actions are the tasks performed by an app. Read more about actions and apps
<a target="_blank" href="https://shuffler.io/docs/apps#actions" style={{textDecoration: "none", color: "#f85a3e"}}> here</Link>.
<a target="_blank" src="https://shuffler.io/docs/apps#actions" style={{textDecoration: "none", color: "#f85a3e"}}> here</a>.
<div>
{loopActions}
<div style={{display: "flex"}}>
+5
View File
@@ -168,6 +168,10 @@ const Apps = (props) => {
})
function sortByKey(array, key) {
if (array === undefined || array === null) {
return []
}
return array.sort(function(a, b) {
var x = a[key];
var y = b[key];
@@ -222,6 +226,7 @@ const Apps = (props) => {
return response.json()
})
.then((responseJson) => {
console.log("Apps: ", responseJson)
responseJson = sortByKey(responseJson, "large_image")
setApps(responseJson)