dudleycu 3 years ago
commit ccab58bf0e
  1. 22
      src/App.js
  2. 2
      src/DEFAULTS.js
  3. 2
      src/TestPanel.js

@ -6,7 +6,7 @@ import Toggle from 'react-toggle' //Tooltip props: http://aaronshaf.github.io/re
import Helmet from 'react-helmet'
import { ExpandTooltip } from './components/ExpandTooltip';
import {XSquareFill, PlusCircle, LifePreserver, Server, CloudUploadFill} from 'react-bootstrap-icons'
import {XSquareFill, PlusCircle, LifePreserver, Server, CloudUploadFill, PatchCheck} from 'react-bootstrap-icons'
import {
HashRouter,
@ -119,6 +119,14 @@ function TableEditor(p) {
const [fileData,setFileData] = useState(undefined)
const [lockSubmission,setLockSubmission] = useState(false)
function patchValue(value,p,col,dat) {
return axios.patch(p.BACKENDURL+p.path,{
[col.name]:value==="null"?null:value,
id:dat.id,
pass:p.password
})
}
function SubmitBoxes() {
if (!lockSubmission) {
setLockSubmission(true)
@ -136,10 +144,6 @@ function TableEditor(p) {
}
}
useGlobalKeyDown(()=>{
SubmitBoxes()
},['Enter'])
useEffect(()=>{
setUpdate(true)
},[p.path])
@ -216,13 +220,7 @@ function TableEditor(p) {
(f)=>{setSubmitVal({field:col.name,value:f});}}/>}</td>)}<input style={{position:'absolute',top:"-1000px"}}/><PlusCircle onClick={()=>{SubmitBoxes()}} className="submitbutton"/></tr>}
{data.map((dat)=><tr key={dat.id}>
<td><XSquareFill className="webicon" onClick={()=>{axios.delete(p.BACKENDURL+p.path,{data:{id:dat.id,pass:p.password}}).then(()=>{setUpdate(true)}).catch((err)=>{alert(err.response.data)})}}/></td>{fields.map((col,i)=><td key={dat.id+"_"+i} className="table-padding table">
<InputBox lockSubmission={lockSubmission} data={dependencies[col.name]} callback={(value)=>{
return axios.patch(p.BACKENDURL+p.path,{
[col.name]:value==="null"?null:value,
id:dat.id,
pass:p.password
})
}} value={String(dat[col.name])}/></td>)}</tr>)}
<InputBox lockSubmission={lockSubmission} data={dependencies[col.name]} callback={(value)=>patchValue(value,p,col,dat)} callback2={(f,value)=>{if (f.key==='Enter') {f.currentTarget.blur()} else {return 'Chill'}}} value={String(dat[col.name])}/></td>)}</tr>)}
</tbody>
</table>
</div>:<><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/><img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/></>}

@ -2,7 +2,7 @@ const NICONICONII = process.env.PUBLIC_URL+"/icons/nicodotpng.png.png"
function DisplayIcon(icon) {
//console.log(icon)
return icon?process.env.PUBLIC_URL+icon:NICONICONII
return icon&&icon.length>0?process.env.PUBLIC_URL+icon:NICONICONII
}
export {NICONICONII,DisplayIcon};

@ -595,7 +595,7 @@ AUGMENT
</ExpandTooltip></li>}}
/>
<SelectorWindow title="Armor Selection" modalOpen={armorSelectWindowOpen} setModalOpen={setArmorSelectWindowOpen} GetData={p.GetData}
<SelectorWindow title={"Armor Selection - Slot "+armorSlotSelection} modalOpen={armorSelectWindowOpen} setModalOpen={setArmorSelectWindowOpen} GetData={p.GetData}
pageNames={[]}
sortItems={["Standard Sort","Rarity","HP","PP","Melee Potency","Range Potency","Tech Potency"]}
filter={true}

Loading…
Cancel
Save