@@ -14,9 +14,11 @@ const defaultTools = [
1414export const Menu = ( {
1515 isDark,
1616 onDarkChange,
17+ overlayMode = false ,
1718} : {
1819 isDark : boolean ;
1920 onDarkChange : ( dark : boolean ) => void ;
21+ overlayMode ?: boolean ;
2022} ) => {
2123 const { data : config } = useGetConfigQuery ( ) ;
2224 const [ showMenu , setShowMenu ] = useState ( false ) ;
@@ -39,13 +41,15 @@ export const Menu = ({
3941
4042 return (
4143 < >
42- { /* Mobile Hamburger Button */ }
44+ { /* Hamburger Button — always visible in overlay mode, mobile-only otherwise */ }
4345 < button
4446 type = "button"
45- className = { `lg:hidden fixed z-50 top-4 right-4 left-auto p-2 rounded-lg shadow-lg backdrop-blur-xs border transition-all duration-200 ${
46- showMenu
47- ? "bg-gray-800 dark:bg-gray-200 border-gray-600 dark:border-gray-400"
48- : "bg-white/90 dark:bg-gray-800/90 border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700"
47+ className = { `${ overlayMode ? "" : "lg:hidden" } fixed z-50 top-4 ${ overlayMode ? "left-4" : "right-4 left-auto" } p-2 rounded-lg shadow-lg backdrop-blur-xs border transition-all duration-200 ${
48+ showMenu
49+ ? "bg-gray-800 dark:bg-gray-200 border-gray-600 dark:border-gray-400"
50+ : overlayMode
51+ ? "bg-gray-900/80 dark:bg-gray-900/80 backdrop-blur-xl border-white/10 hover:bg-gray-900/90"
52+ : "bg-white/90 dark:bg-gray-800/90 border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700"
4953 } `}
5054 onClick = { ( ) => setShowMenu ( ! showMenu ) }
5155 aria-label = "Toggle Menu"
@@ -74,22 +78,22 @@ export const Menu = ({
7478 </ div >
7579 </ button >
7680
77- { /* Mobile Backdrop */ }
78- < div
79- className = { `lg:hidden fixed inset-0 bg-black/20 backdrop-blur-xs z-40 transition-opacity duration-200 ${
81+ { /* Backdrop — always available in overlay mode, mobile-only otherwise */ }
82+ < div
83+ className = { `${ overlayMode ? "" : " lg:hidden" } fixed inset-0 bg-black/20 backdrop-blur-xs z-40 transition-opacity duration-200 ${
8084 showMenu ? "opacity-100" : "opacity-0 pointer-events-none"
8185 } `}
8286 onClick = { ( ) => setShowMenu ( false ) }
8387 />
8488
8589 { /* Navigation Panel */ }
8690 < div
87- className = { `w-full lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-60 lg:flex-col ${
91+ className = { `w-full ${ overlayMode ? "" : " lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-60 lg:flex-col" } ${
8892 showMenu ? "" : "hidden"
89- } dark:text-gray-100 z-0 lg:z-50`}
93+ } dark:text-gray-100 z-0 ${ overlayMode ? "" : " lg:z-50" } `}
9094 >
91- { /* Mobile Drawer */ }
92- < div className = " lg:hidden fixed inset-y-0 left-0 z-50 w-80 max-w-[80vw] bg-white dark:bg-gray-900 shadow-xl border-r border-gray-200 dark:border-gray-700" >
95+ { /* Drawer (mobile always, desktop when overlayMode) */ }
96+ < div className = { ` ${ overlayMode ? "" : " lg:hidden" } fixed inset-y-0 left-0 z-50 w-80 max-w-[80vw] bg-white dark:bg-gray-900 shadow-xl border-r border-gray-200 dark:border-gray-700` } >
9397 < div className = "flex flex-col h-full overflow-hidden" >
9498 { /* Mobile Header */ }
9599 < div className = "p-4 border-b border-gray-200 dark:border-gray-700" >
@@ -114,9 +118,9 @@ export const Menu = ({
114118 </ div >
115119
116120 { /* Mobile Navigation */ }
117- < div className = "flex-1 overflow-y-auto px-2 py-3 space-y-1 " >
118- < div className = "space-y-1 " >
119- < h3 className = "text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider px-3 py-2 " > Mesh</ h3 >
121+ < div className = "flex-1 overflow-y-auto px-2 py-3 space-y-4 " >
122+ < div className = "space-y-0.5 " >
123+ < h3 className = "text-[10px] font-bold text-cyan-600 dark:text-cyan-500 uppercase tracking-widest px-3 pt-2 pb-1 " > Mesh</ h3 >
120124 < Link to = "/chat" onClick = { ( ) => setShowMenu ( false ) } className = "block" >
121125 < div className = "flex items-center gap-3 p-3 rounded-lg transition-colors hover:bg-gray-100 dark:hover:bg-gray-700/50" >
122126 < span className = "text-sm font-medium text-gray-700 dark:text-gray-200" > Chat</ span >
@@ -165,8 +169,8 @@ export const Menu = ({
165169 </ Link >
166170 </ div >
167171
168- < div className = "space-y-1 " >
169- < h3 className = "text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider px-3 py-2 " > Tools</ h3 >
172+ < div className = "space-y-0.5 " >
173+ < h3 className = "text-[10px] font-bold text-cyan-600 dark:text-cyan-500 uppercase tracking-widest px-3 pt-2 pb-1 " > Tools</ h3 >
170174 { ( config ?. mesh ?. tools ?? defaultTools ) . map ( ( tool , index ) => (
171175 < a
172176 key = { `mobile-tools-${ index } ` }
@@ -183,8 +187,8 @@ export const Menu = ({
183187 ) ) }
184188 </ div >
185189
186- < div className = "space-y-1 " >
187- < h3 className = "text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider px-3 py-2 " > Meshtastic Addons</ h3 >
190+ < div className = "space-y-0.5 " >
191+ < h3 className = "text-[10px] font-bold text-cyan-600 dark:text-cyan-500 uppercase tracking-widest px-3 pt-2 pb-1 " > Meshtastic Addons</ h3 >
188192 < a
189193 href = "https://github.com/armooo/meshtastic_dopewars"
190194 target = "_blank"
@@ -223,8 +227,8 @@ export const Menu = ({
223227 </ div >
224228 </ div >
225229
226- { /* Desktop Sidebar */ }
227- < div className = "hidden lg:flex lg:flex-col px-6 pb-4 overflow-y-auto bg-gray-300 dark:bg-gray-800 border-r-2 grow gap-y-5 border-r-cyan-600" >
230+ { /* Desktop Sidebar — hidden in overlay mode */ }
231+ < div className = { ` ${ overlayMode ? "hidden" : "hidden lg:flex lg:flex-col" } px-6 pb-4 overflow-y-auto bg-gray-300 dark:bg-gray-800 border-r-2 grow gap-y-5 border-r-cyan-600` } >
228232 < div className = "flex items-center h-24 mt-4 shrink-0" >
229233 < div className = "text-2xl" >
230234 { config ?. mesh ?. name ?. split ( " " ) . map ( ( word , index ) => (
0 commit comments