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.sortItems.map((item)=>{item.name} )}
-
-
-
- {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}
>
+
+
+ {setSortSelector(f.currentTarget.value)}}>
+ {sortItems.map((item)=>{item.name} )}
+
+
+
+ {filterEnabled&& {setFilter(f.currentTarget.value)}} />}
+
+
- Primm Rifle 177 Recycler UnitLv.4: Potency +24%/ 20% chance of Restasigne not being consumed on use. Effect starts 10 sec after equip
- Tzvia Rifle 195 Indomitable UnitLv.4: Potency +26%/ All Down Resistances +20%
- Theseus Rifle 223 Defensive FormationLv.4: Potency +22%/ Critical Hit Rate increases based on Defense, up to a maximum of +18% at 1,000 Defense.
- Resurgir Rifle 240 Dynamo UnitLv.4: Potency +21%/ Critical Hit Rate +18% for 30 seconds after a successful Sidestep.
- Foursis Rifle 242 Bastion UnitLv.4: Potency +24%/ Creates a barrier that provides Damage Resistance +50% when at Max HP.
- Test 999 TestTest
- Test 999 TestTest
- Test 999 TestTest
+ {itemList.filter((item)=>{
+ switch (tabPage) {
+ case 2:{
+ return item[0].name==="Assault Rifle"
+ }break;
+ case 3:{
+ return item[0].name==="Launcher"
+ }break;
+ case 4:{
+ return item[0].name==="Rod"
+ }break;
+ case 5:{
+ return item[0].name==="Talis"
+ }break;
+ default:{
+ return true
+ }
+ }
+ }).filter((item)=>{
+ if (filter.length>0) {
+ return (item[1].name.toLowerCase()+" "+item[0].name.toLowerCase()).includes(filter.toLowerCase())
+ } else {
+ return true
+ }
+ }).sort((a,b)=>{
+ switch (sortSelector) {
+ case "Rarity":{
+ return b[1].rarity-a[1].rarity
+ }break;
+ case "Attack":{
+ return b[1].atk-a[1].atk
+ }break;
+ default:{
+ return 0
+ }
+ }
+ }).map((item)=>{item[1].name} {item[0].name} {item[1].atk} {item[2].name}Lv.4: Potency +24%/ 20% chance of Restasigne not being consumed on use. Effect starts 10 sec after equip )}
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;