1- import { useState , useRef , useEffect } from "react" ;
1+ import React , { useEffect , useRef , useState } from "react" ;
22import { Link } from "react-router-dom" ;
3- import { LinkColor } from "./link" ;
4- import { NameExpand } from "./nameExpand" ;
53import type { User } from "../types/global" ;
4+ import { NameExpand } from "./nameExpand" ;
65
76interface NavDropdownProps {
87 label : string ;
@@ -28,14 +27,15 @@ function NavDropdown({ label, children }: NavDropdownProps) {
2827 < button
2928 type = "button"
3029 onClick = { ( ) => setIsOpen ( ! isOpen ) }
31- className = "text-cyan-400 hover:text-cyan-300 hover:underline flex items-center gap-1"
30+ className = "text-gray-300 hover:text-white hover:underline flex items-center gap-1"
3231 >
3332 { label }
3433 < svg
3534 className = { `w-3 h-3 transition-transform ${ isOpen ? "rotate-180" : "" } ` }
3635 fill = "none"
3736 stroke = "currentColor"
3837 viewBox = "0 0 24 24"
38+ aria-hidden = "true"
3939 >
4040 < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M19 9l-7 7-7-7" />
4141 </ svg >
@@ -60,7 +60,7 @@ function NavDropdownItem({ to, children, onClick }: NavDropdownItemProps) {
6060 < Link
6161 to = { to }
6262 onClick = { onClick }
63- className = "block px-3 py-1.5 text-cyan-400 hover:text-cyan-300 hover:bg-gray-700/50"
63+ className = "block px-3 py-1.5 text-gray-300 hover:text-white hover:bg-gray-700/50"
6464 >
6565 { children }
6666 </ Link >
@@ -81,46 +81,48 @@ export function Navigation({ user, onLogout }: NavigationProps) {
8181 < nav className = "w-full foreground p-3" >
8282 { /* Desktop Navigation */ }
8383 < div className = "hidden md:flex flex-row items-center gap-3" >
84- < LinkColor >
85- < Link to = "/" className = "underline font-bold" >
86- [cmdb]
87- </ Link >
88- </ LinkColor >
84+ < Link to = "/" className = "text-white hover:underline font-bold" >
85+ [cmdb]
86+ </ Link >
8987
9088 < span className = "text-gray-500" > |</ span >
9189
92- { /* Players Dropdown */ }
93- < NavDropdown label = "Players " >
90+ { /* Bans Dropdown */ }
91+ < NavDropdown label = "Bans " >
9492 < NavDropdownItem to = "/bans" > Active Bans</ NavDropdownItem >
9593 < NavDropdownItem to = "/ban-history" > Ban History</ NavDropdownItem >
9694 { user ?. isStaff && (
97- < >
98- < NavDropdownItem to = "/user" > User Lookup</ NavDropdownItem >
99- < NavDropdownItem to = "/new_players" > New Players</ NavDropdownItem >
100- < NavDropdownItem to = "/whitelists" > Whitelists</ NavDropdownItem >
101- </ >
95+ < NavDropdownItem to = "/sticky" > Stickybans</ NavDropdownItem >
10296 ) }
10397 </ NavDropdown >
10498
10599 { user ?. isStaff && (
106100 < >
107101 < span className = "text-gray-500" > |</ span >
108102
109- { /* Admin Tools Dropdown */ }
110- < NavDropdown label = "Admin" >
103+ { /* Lookup Dropdown */ }
104+ < NavDropdown label = "Lookup" >
105+ < NavDropdownItem to = "/user" > Player Lookup</ NavDropdownItem >
106+ < NavDropdownItem to = "/authentik" > User Lookup</ NavDropdownItem >
107+ </ NavDropdown >
108+
109+ < span className = "text-gray-500" > |</ span >
110+
111+ { /* Administrative Dropdown */ }
112+ < NavDropdown label = "Administrative" >
111113 < NavDropdownItem to = "/ticket" > Tickets</ NavDropdownItem >
112- < NavDropdownItem to = "/sticky" > Stickybans </ NavDropdownItem >
113- < NavDropdownItem to = "/authentik" > Authentik </ NavDropdownItem >
114+ < NavDropdownItem to = "/new_players" > New Players </ NavDropdownItem >
115+ < NavDropdownItem to = "/whitelists" > Whitelists </ NavDropdownItem >
114116 </ NavDropdown >
115117 </ >
116118 ) }
117119
118120 { user ?. manageable ?. length ? (
119121 < >
120122 < span className = "text-gray-500" > |</ span >
121- < LinkColor >
122- < Link to = "/user_manager" > User Manager</ Link >
123- </ LinkColor >
123+ < Link to = "/user_manager" className = "text-gray-300 hover:text-white hover:underline" >
124+ User Manager
125+ </ Link >
124126 </ >
125127 ) : null }
126128
@@ -132,9 +134,9 @@ export function Navigation({ user, onLogout }: NavigationProps) {
132134 { user . isStaff ? < NameExpand name = { user . ckey } /> : user . ckey }
133135 )
134136 </ span >
135- < LinkColor >
136- < Link to = "/account" > Account</ Link >
137- </ LinkColor >
137+ < Link to = "/account" className = "text-gray-300 hover:text-white hover:underline" >
138+ Account
139+ </ Link >
138140 < button
139141 type = "button"
140142 onClick = { onLogout }
@@ -148,11 +150,9 @@ export function Navigation({ user, onLogout }: NavigationProps) {
148150
149151 { /* Mobile Navigation */ }
150152 < div className = "md:hidden flex items-center justify-between" >
151- < LinkColor >
152- < Link to = "/" className = "underline font-bold" >
153- [cmdb]
154- </ Link >
155- </ LinkColor >
153+ < Link to = "/" className = "text-white hover:underline font-bold" >
154+ [cmdb]
155+ </ Link >
156156
157157 < button
158158 type = "button"
@@ -161,11 +161,11 @@ export function Navigation({ user, onLogout }: NavigationProps) {
161161 aria-label = "Toggle menu"
162162 >
163163 { mobileMenuOpen ? (
164- < svg className = "w-6 h-6" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
164+ < svg className = "w-6 h-6" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" aria-hidden = "true" >
165165 < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M6 18L18 6M6 6l12 12" />
166166 </ svg >
167167 ) : (
168- < svg className = "w-6 h-6" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
168+ < svg className = "w-6 h-6" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" aria-hidden = "true" >
169169 < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = { 2 } d = "M4 6h16M4 12h16M4 18h16" />
170170 </ svg >
171171 ) }
@@ -181,46 +181,46 @@ export function Navigation({ user, onLogout }: NavigationProps) {
181181 </ div >
182182 ) }
183183
184- < div className = "text-gray-500 text-xs uppercase mt-2" > Players </ div >
185- < Link to = "/bans" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
184+ < div className = "text-gray-500 text-xs uppercase mt-2" > Bans </ div >
185+ < Link to = "/bans" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
186186 Active Bans
187187 </ Link >
188- < Link to = "/ban-history" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
188+ < Link to = "/ban-history" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
189189 Ban History
190190 </ Link >
191191 { user ?. isStaff && (
192- < >
193- < Link to = "/user" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
194- User Lookup
195- </ Link >
196- < Link to = "/new_players" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
197- New Players
198- </ Link >
199- < Link to = "/whitelists" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
200- Whitelists
201- </ Link >
202- </ >
192+ < Link to = "/sticky" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
193+ Stickybans
194+ </ Link >
203195 ) }
204196
205197 { user ?. isStaff && (
206198 < >
207- < div className = "text-gray-500 text-xs uppercase mt-3" > Admin</ div >
208- < Link to = "/ticket" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
199+ < div className = "text-gray-500 text-xs uppercase mt-3" > Lookup</ div >
200+ < Link to = "/user" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
201+ Player Lookup
202+ </ Link >
203+ < Link to = "/authentik" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
204+ User Lookup
205+ </ Link >
206+
207+ < div className = "text-gray-500 text-xs uppercase mt-3" > Administrative</ div >
208+ < Link to = "/ticket" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
209209 Tickets
210210 </ Link >
211- < Link to = "/sticky " onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
212- Stickybans
211+ < Link to = "/new_players " onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
212+ New Players
213213 </ Link >
214- < Link to = "/authentik " onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
215- Authentik
214+ < Link to = "/whitelists " onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
215+ Whitelists
216216 </ Link >
217217 </ >
218218 ) }
219219
220220 { user ?. manageable ?. length ? (
221221 < >
222222 < div className = "text-gray-500 text-xs uppercase mt-3" > Management</ div >
223- < Link to = "/user_manager" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
223+ < Link to = "/user_manager" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
224224 User Manager
225225 </ Link >
226226 </ >
@@ -229,7 +229,7 @@ export function Navigation({ user, onLogout }: NavigationProps) {
229229 { user && (
230230 < >
231231 < div className = "text-gray-500 text-xs uppercase mt-3" > Account</ div >
232- < Link to = "/account" onClick = { closeMobileMenu } className = "text-cyan-400 hover:text-cyan-300 pl-2" >
232+ < Link to = "/account" onClick = { closeMobileMenu } className = "text-gray-300 hover:text-white pl-2" >
233233 Settings
234234 </ Link >
235235 < button
0 commit comments