attempting to fix the scuffed admin

master
dudleycu 3 years ago
parent 68984c7831
commit 8068d0f274
  1. 22
      backup_class_selctor_stuff_lol
  2. 4
      src/App.js

@ -28,4 +28,24 @@ function ClassSelectorWindow(p) {
{Object.keys(p.GetData("class")).map((cl)=><li className={className===cl?"treeListMain":subclassName===cl?"treeListSub":""}><img alt="" src={p.GetData("class")[cl].icon} />{cl}</li>)}
</ul>
</div>
</div>
</div>
function ClassSelector(p){
const CLASSES = p.GetData("class")
const wrapperRef = useRef(null);
useOutsideAlerter(wrapperRef,p.setEdit);
return <><div className="popup2" ref={wrapperRef}>
Class Selector<hr/>
<div className="popup">
{Object.keys(CLASSES).map((cl,i)=>{
return <button id={i} className="rounded" onClick={()=>{p.setClassName(cl);p.setEdit(false)}}><img alt="" src={process.env.PUBLIC_URL+CLASSES[cl].icon}/><br/>{CLASSES[cl].name}</button>
})}
</div>
</div>
</>
}

@ -379,7 +379,7 @@ function AdminPanel(p) {
return <div className="main">
{!verified?
<div className="w-75">
<div style={{gridColumn:"1 / span 3"}}>
<img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/>
<input type="password" value={password} onChange={(f)=>{setPassword(f.currentTarget.value)}} onKeyDown={(e)=>{
if (e.key==="Enter") {
@ -398,7 +398,7 @@ function AdminPanel(p) {
<img src={process.env.PUBLIC_URL+"/spinner.gif"} alt=""/>
</div>:<>
<Box title="Navigation">
<div className="w-25">Testing Mode <Toggle checked={p.TESTMODE} onChange={(f)=>{p.setTESTMODE(f.target.checked)}}/> {p.TESTMODE?<b>ON</b>:<b>OFF</b>}<br/>
<div>Testing Mode <Toggle checked={p.TESTMODE} onChange={(f)=>{p.setTESTMODE(f.target.checked)}}/> {p.TESTMODE?<b>ON</b>:<b>OFF</b>}<br/>
<Table classes="adminNav">
{navigationData.map((nav)=>(nav.hr)?<hr/>:<><Link to={process.env.PUBLIC_URL+nav.url}>{nav.page}</Link><br/></>)}
<Link to={process.env.PUBLIC_URL+"/admin/database_manager"}>Database Manager</Link><br/>

Loading…
Cancel
Save