From 8a57a44f025d7639cedb58c92b5d9d2522a03b26 Mon Sep 17 00:00:00 2001 From: Dicken Date: Mon, 25 May 2026 15:35:16 +0200 Subject: [PATCH] frontend/src/App.jsx aktualisiert --- frontend/src/App.jsx | 125 +++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 70 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index e01ad9e..ed89251 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -178,88 +178,72 @@ function Sidebar({ active, setActive, user, onLogout, updateInfo, onUpdateClick } // ── Mobile Bottom Navigation ────────────────────────────────────────────────── -function BottomNav({ active, setActive, user, updateInfo, onUpdateClick }) { +function BottomNav({ active, setActive, user, onLogout, updateInfo, onUpdateClick }) { const [menuOpen, setMenuOpen] = useState(false); + const NAV_H = 56; const mainNav = [ { id:'dashboard', icon:'⬡', label:'Home' }, - ...TOOLS.slice(0,3).map(t => ({ id:t.id, icon:t.icon, label:t.label.length>8?t.label.slice(0,7)+'…':t.label })), + ...TOOLS.slice(0,3).map(t => ({ id:t.id, icon:t.icon, label:t.label.length>7?t.label.slice(0,6)+'…':t.label })), { id:'_menu', icon:'⋯', label:'Mehr' }, ]; - + const MI = ({icon,label,onClick,color='#fff'}) => ( + + ); return ( <> - {/* Menu Overlay */} {menuOpen && ( -
setMenuOpen(false)}> -
setMenuOpen(false)}> +
e.stopPropagation()}> - {/* Update badge */} - {updateInfo?.hasUpdate && ( - - )} - {/* Extra tools */} - {TOOLS.slice(3).map(t => ( - - ))} - {user?.role==='admin' && ( - - )} +
+ {updateInfo?.hasUpdate && {setMenuOpen(false);onUpdateClick();}} color="#ffe66d"/>} + {TOOLS.slice(3).map(t=>{setActive(t.id);setMenuOpen(false);}}/>)} + {user?.role==='admin' && {setActive('admin');setMenuOpen(false);}}/>} +
+ {}} color="rgba(255,255,255,0.35)"/> + {onLogout();setMenuOpen(false);}} color="#ff6b9d"/> +
)} - - {/* Bottom Bar */} ); @@ -534,7 +518,7 @@ export default function App() { const activeTool = TOOLS.find(t=>t.id===active); // Mobile padding bottom für fixed nav - const mainStyle = { flex:1, overflowY:'auto', ...(mobile ? { paddingBottom:64 } : {}) }; + const mainStyle = { flex:1, overflowY:'auto', ...(mobile ? { paddingBottom:'calc(56px + env(safe-area-inset-bottom, 0px))' } : {}) }; return( <> @@ -562,6 +546,7 @@ export default function App() {
{mobile && ( {localStorage.removeItem('sk_token');setUser(null);}} updateInfo={updateInfo} onUpdateClick={()=>setShowUpd(true)}/> )}