From e1e68c7898a73adf9d9c02180e83f66c0ac7bd4f Mon Sep 17 00:00:00 2001 From: dudleycu Date: Thu, 19 Aug 2021 06:57:47 +0900 Subject: [PATCH] admin panel redesign --- src/App.js | 53 +++++++++++++++++++++++++++++------------ src/style.css | 65 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 83 insertions(+), 35 deletions(-) diff --git a/src/App.js b/src/App.js index 7b91fe4..a377418 100644 --- a/src/App.js +++ b/src/App.js @@ -200,8 +200,8 @@ function TableEditor(p) { return <> {!loading? -
- +
+
{importAllowed&&
{ const reader = new FileReader() reader.onload=(ev)=>{ @@ -377,9 +377,9 @@ function AdminPanel(p) { {page:"Database Audit",url:"/admin/database_audit",table:"/database_audit"}, ] - return
+ return
{!verified? -
+
{setPassword(f.currentTarget.value)}} onKeyDown={(e)=>{ if (e.key==="Enter") { @@ -397,26 +397,50 @@ function AdminPanel(p) { })}}}>
:<> - -
Testing Mode {p.setTESTMODE(f.target.checked)}}/> {p.TESTMODE?ON:OFF}
+ +
+
+

Navigation

+
+

Testing Mode {p.setTESTMODE(f.target.checked)}}/> {p.TESTMODE?ON:OFF}

+
{navigationData.map((nav)=>(nav.hr)?
:<>{nav.page}
)} Database Manager
-
-
+
+
+ + + + + {navigationData.map((nav)=>(nav.duplicate===undefined&&nav.hr===undefined)&& - - +
+
+

{nav.page}

+
+ {APP_TITLE+" - Admin Panel: "+nav.page} {nav.render??} - )} +
)} + - +
+
+

Database Editor

+
- +
+
- } + + + + + + + } } @@ -799,7 +823,6 @@ function App() { {APP_TITLE+" - Admin Panel"} - diff --git a/src/style.css b/src/style.css index 2a82799..0e57151 100644 --- a/src/style.css +++ b/src/style.css @@ -3,10 +3,6 @@ margin: 0; padding: 0; box-sizing: border-box; - -webkit-user-select: none; /* Safari */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* IE10+/Edge */ - user-select: none; /* Standard */ } @font-face { font-family: "ngs"; @@ -112,6 +108,7 @@ em { gap: 10px; margin: 0 10px; } + .box { color: #97e2fc; background-clip: padding-box; @@ -706,8 +703,9 @@ li.treeListSub:after { padding: 2px; max-height: calc(90vh - 150px); min-width: 0; -}/* -@media screen and (min-width:390px) and (max-width:860px) { +} + +/*@media screen and (min-width:390px) and (max-width:860px) { .skillTreeContainer { max-height: 300px; } @@ -930,19 +928,8 @@ button{ -webkit-font-smoothing: antialiased; text-shadow: -1px 1px 0 #000,1px 1px 0 #000,1px -1px 0 #000,-1px -1px 0 #000; } -.w-25{ - min-width:240px; - max-width:24%; - margin-right: 1%; -} -.w-75{ - min-width:75%; - max-width:75%; -} .table-responsive{ color:rgba(220,220,220); - overflow-y:hidden; - overflow-x:auto; } .table-responsive table { background-color: rgba(20,29,40,0.66); @@ -1052,12 +1039,50 @@ button{ /* Admin Panel */ -.adminNav { +.adminMain { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: grid; + justify-items: stretch; + align-items: stretch; + grid-template-columns: 250px 1fr; + grid-template-rows: minmax(10px, 1fr) max-content minmax(10px, 1fr); + grid-template-areas: + "header header" + "sidebar content" + "footer footer"; + gap: 10px; + overflow:hidden; + margin: 0 10px; +} +.boxAdminNav { + grid-area: sidebar; font-size: 12pt; line-height: 1.5em; } +.boxAdminContent { + grid-area: content; +} +.adminNavContainer { + overflow-y: scroll; + margin: 0 5px 0 10px; + padding: 2px; + height: 0; + height: 80vh; +} +.adminContainer { + overflow-x: auto; + overflow-y: scroll; + margin: 10px 5px 0 10px; + padding: 2px; + width: 84vw; + height: 85vh; +} p.adminNav hr { - border-bottom: 1px solid white; + border-bottom: 1px solid silver; margin: 10px 0; } .buttonLabel{ @@ -1279,4 +1304,4 @@ p.adminNav hr { .check:before { font-family: "Segoe UI Symbol"; content: "\2B1B" !important; -} \ No newline at end of file +}