From a0687ebb6e8768d25cd536b4651f695b559ec183 Mon Sep 17 00:00:00 2001 From: Dicken Date: Tue, 26 May 2026 14:21:16 +0200 Subject: [PATCH] Dateien nach "frontend/src" hochladen --- frontend/src/App.jsx | 56 +++++++++++++++++++++++++++------------- frontend/src/confirm.jsx | 16 +++++++----- 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 64bfdab..eae5a44 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -39,12 +39,16 @@ function Toast({ msg, type }) { function Modal({ title, onClose, children }) { return (
=768 ? 'center' : 'flex-end', + justifyContent:'center', padding: window.innerWidth>=768 ? 24 : 0 }} onClick={e=>e.target===e.currentTarget&&onClose()}> -
-
+
=768 ? 16 : '16px 16px 0 0', + padding:'20px 20px 40px', width:'100%', + maxWidth:600, maxHeight:'85vh', overflowY:'auto', + boxShadow: window.innerWidth>=768 ? '0 24px 80px rgba(0,0,0,0.6)' : 'none' }}> + {window.innerWidth < 768 &&
}
{title} @@ -291,20 +295,36 @@ function BottomNav({ active, setActive, user, onLogout, updateInfo, onUpdateClic ); }; - const Sheet = ({open, onClose, children}) => !open ? null : ( -
-
e.stopPropagation()}> -
- {children} -
+ const Sheet = ({open, onClose, children}) => { + if (!open) return null; + const isDesktop = window.innerWidth >= 768; + if (isDesktop) return ( +
+
e.stopPropagation()}> + {children} +
-
- ); + ); + return ( +
+
e.stopPropagation()}> +
+ {children} +
+
+
+ ); + }; const mainNav = [ { id:'dashboard', Icon:HomeIcon, label:'Home' }, diff --git a/frontend/src/confirm.jsx b/frontend/src/confirm.jsx index 6722f1e..9414824 100644 --- a/frontend/src/confirm.jsx +++ b/frontend/src/confirm.jsx @@ -19,14 +19,18 @@ export function useConfirm() { const ConfirmDialog = () => !state.open ? null : (
=768 ? 'center' : 'flex-end', + justifyContent:'center', padding: window.innerWidth>=768 ? 24 : 0 }} onClick={() => handle(false)}> -
=768 ? 16 : '16px 16px 0 0', + width:'100%', maxWidth:500, padding:'20px 20px 32px', + border:'1px solid rgba(255,255,255,0.15)', + boxShadow: window.innerWidth>=768 ? '0 24px 80px rgba(0,0,0,0.6)' : 'none' }} onClick={e => e.stopPropagation()}> -
+ {window.innerWidth < 768 &&
}

{state.msg}