diff --git a/src/App.js b/src/App.js index 63f5281..ed4aa07 100644 --- a/src/App.js +++ b/src/App.js @@ -1007,10 +1007,12 @@ function App() { const [TESTMODE,setTESTMODE] = useState(false) const [DATA,setDATA] = useState({GetData:()=>{}}) + const [DATAID,setDATAID] = useState({GetData:()=>{}}) - function GetData(table,row,col){ - return DATA!==undefined?DATA[table]!==undefined?DATA[table][row]!==undefined?DATA[table][row][col]!==undefined?DATA[table][row][col]:DATA[table][row]:DATA[table]:DATA:"no data" + function GetData(table,row,col,id){ + var data = id?DATAID:DATA + return data!==undefined?data[table]!==undefined?data[table][row]!==undefined?data[table][row][col]!==undefined?data[table][row][col]:data[table][row]:data[table]:data:"no data" } @@ -1019,6 +1021,10 @@ function App() { .then((data)=>{ setDATA(data.data) }) + axios.get(GetBackendURL({TESTMODE:TESTMODE})+"/dataid") + .then((data)=>{ + setDATAID(data.data) + }) },[TESTMODE]) return ( diff --git a/src/TestPanel.js b/src/TestPanel.js index 5745768..be204ce 100644 --- a/src/TestPanel.js +++ b/src/TestPanel.js @@ -62,7 +62,7 @@ function EditBoxInput(p) { } function PageControlButton(p) { - return
  • {p.setCurrentPage(p.page)}} className={(p.currentPage===p.page)?"selected":""}>{p.pageName?p.pageName:p.page}
  • + return
  • {p.setCurrentPage(p.page)}} className={(p.currentPage===p.page)?"selected":"unselected"}>{p.pageName?p.pageName:p.page}
  • } function PageControl(p) { @@ -121,8 +121,6 @@ function EditableClass(p){ } function PopupWindow(p) { - const [filter,setFilter] = useState("") - const [page,setPage] = useState(1) return {p.setModalOpen(false)}} shouldFocusAfterRender={true} shouldCloseOnOverlayClick={true} shouldCloseOnEsc={true} className="modal" overlayClassName="modalOverlay">
    @@ -130,17 +128,8 @@ function PopupWindow(p) {

    {p.title}

    {p.showCloseButton&&
    {p.setModalOpen(false)}}>
    }
    - -
    -
    - -
    -
    - {p.filter&&{setFilter(f.currentTarget.value)}} />} -
    -
    + + {p.children}
    @@ -165,6 +154,15 @@ const [weaponPage,setWeaponPage] = useState(1) const [statPage,setStatPage] = useState(1) const [modalOpen,setModalOpen] = useState(true) +const [tabPage,setTabPage] = useState(1) +const [sortSelector,setSortSelector] = useState("Standard Sort") +const sortItems=[ + {name:"Standard Sort",value:"id"}, + {name:"Rarity",value:"rarity"}, + {name:"Attack",value:"atk"}, + {name:"Potency",value:"potency"}] +const [filter,setFilter] = useState("") +const filterEnabled=true useEffect(()=>{ if (p.bp>1000) { @@ -182,6 +180,20 @@ useEffect(()=>{ } },[p.bp]) +const [itemList,setItemList] = useState([]) + +useEffect(()=>{ + var dat1=p.GetData("weapon_existence_data") + if (Array.isArray(dat1)) { + setItemList(dat1.map((we)=>{ + var weapon_type=p.GetData("weapon_type",we.weapon_type_id,undefined,true) + var weapon=p.GetData("weapon",we.weapon_id,undefined,true) + var potential=p.GetData("potential",weapon.potential_id,undefined,true) + return [weapon_type,weapon,potential] + })) + } +},[p.GetData]) + //console.log(p.GetData("class",p.className,"icon")) return (<> @@ -424,7 +436,7 @@ useEffect(()=>{ -{ {name:"Potency",value:"potency"}]} filter={true} > +
    +
    + +
    +
    + {filterEnabled&&{setFilter(f.currentTarget.value)}} />} +
    +
    diff --git a/src/style.css b/src/style.css index 9cf7374..ba55ff5 100644 --- a/src/style.css +++ b/src/style.css @@ -580,6 +580,7 @@ li.r4 { text-align: center; flex-basis: 27px; white-space: nowrap; + cursor: pointer; } .boxmenu img { vertical-align: middle; @@ -597,8 +598,6 @@ li.r4 { li.selected:hover { background: linear-gradient(45deg,rgba(76,113,126,0.66),rgba(113,169,189,00.66)); border-bottom: 0; - background: linear-gradient(135deg,#60461b,#b0a34e); - border-bottom: 4px solid #ffd602; } .itemBar { justify-content: center;