From 8d1e0a201cf7d8e5af1d702719680d3ccbbe37e5 Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Mon, 9 Aug 2021 21:25:22 +0900 Subject: [PATCH 1/3] Tooltips for Dudley Co-authored-by: dudleycu --- src/TestPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TestPanel.js b/src/TestPanel.js index 33d93a2..dbafcfa 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -465,7 +465,7 @@ useEffect(()=>{ } }} displayFunction={(item)=>{ - return
  • {item[1].name} {item[0].name}
    {item[1].atk} {item[2].name} {item[3].map((pot,i)=><>{(i!==0)&&
    }{pot.name}: {pot.description.replace("\\n","\n")})}
  • }} + return
  • {item[1].name} {item[0].name}
    {item[1].atk} {item[2].name} {item[3].map((pot,i)=><>{(i!==0)&&
    }{pot.name}: {pot.description.split("\\n").map((text)=><>{text}
    )})}
  • }} /> From 47e0bc745839c36b97c6403cf5b77eee1d6ff369 Mon Sep 17 00:00:00 2001 From: dudleycu <87256142+dudleycu@users.noreply.github.com> Date: Mon, 9 Aug 2021 21:59:02 +0900 Subject: [PATCH 2/3] Update README.md spinner.gif intensifies --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bae8f62..e84a53b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # NGS Planner -![](https://cdn.discordapp.com/attachments/746396256842022984/872804680730816552/unknown.png "") +![](https://ngsplanner.com/spinner.gif "") This tool was created for Phantasy Star Online 2: New Genesis. It is used to therorycraft builds and share them with other players! From 9f020d4ae8efca52f89ca94ce126ac9202e82f65 Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Tue, 10 Aug 2021 00:11:12 +0900 Subject: [PATCH 3/3] Provide secured frontend access to secured backend Co-authored-by: dudleycu --- src/App.js | 101 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 39 deletions(-) diff --git a/src/App.js b/src/App.js index 4fd5bb5..f049ace 100644 --- a/src/App.js +++ b/src/App.js @@ -451,7 +451,7 @@ function TableEditor(p) { function SubmitBoxes() { if (!lockSubmission) { setLockSubmission(true) - axios.post(p.BACKENDURL+p.path,submitVals) + axios.post(p.BACKENDURL+p.path,{...submitVals,pass:p.password}) .then(()=>{ setSubmitVal("Clear") setUpdate(true) @@ -476,7 +476,7 @@ function TableEditor(p) { useEffect(()=>{ var promises=[] parse(fileData,{columns:true,skip_empty_lines:true}).forEach((entry)=>{ - promises.push(axios.post(p.BACKENDURL+p.path,entry)) + promises.push(axios.post(p.BACKENDURL+p.path,{...entry,pass:p.password})) }) Promise.allSettled(promises) .then(()=>{ @@ -497,7 +497,7 @@ function TableEditor(p) { if (update) { setLoading(true) var dependency_map = {} - axios.get(p.BACKENDURL+p.path) + axios.get(p.BACKENDURL+p.path+"?pass="+p.password) .then((data)=>{ var cols = data.data.fields var rows = data.data.rows @@ -507,7 +507,7 @@ function TableEditor(p) { var promise_list = [] cols.filter((col)=>col.name!=="id"&&col.name.includes("_id")).forEach((col)=>{ - promise_list.push(axios.get(p.BACKENDURL+"/"+col.name.replace("_id","")) + promise_list.push(axios.get(p.BACKENDURL+"/"+col.name.replace("_id","")+"?pass="+p.password) .then((data)=>{ dependency_map[col.name]=data.data.rows.sort((a,b)=>b.id-a.id) })) @@ -544,11 +544,12 @@ function TableEditor(p) { {{fields.map((col,i)=>{{setSubmitVal({field:col.name,value:f});}}/>})}{SubmitBoxes()}} className="submitbutton"/>} {data.map((dat)=> - {axios.delete(p.BACKENDURL+p.path,{data:{id:dat.id}}).then(()=>{setUpdate(true)}).catch((err)=>{alert(err.response.data)})}}/>{fields.map((col,i)=> + {axios.delete(p.BACKENDURL+p.path,{data:{id:dat.id,pass:p.password}}).then(()=>{setUpdate(true)}).catch((err)=>{alert(err.response.data)})}}/>{fields.map((col,i)=> { return axios.patch(p.BACKENDURL+p.path,{ [col.name]:value, - id:dat.id + id:dat.id, + pass:p.password }) }} value={String(dat[col.name])}/>)})} @@ -565,7 +566,7 @@ function DatabaseEditor(p) { useEffect(()=>{ if (update) { - axios.get(p.BACKENDURL+"/databases") + axios.get(p.BACKENDURL+"/databases?pass="+p.password) .then((data)=>{ setDatabases(data.data) }) @@ -584,7 +585,7 @@ function DatabaseEditor(p) {