diff --git a/frontend/src/tools/bestellungen.jsx b/frontend/src/tools/bestellungen.jsx index bc6c883..16f54e1 100644 --- a/frontend/src/tools/bestellungen.jsx +++ b/frontend/src/tools/bestellungen.jsx @@ -444,6 +444,8 @@ function BestellungDetail({ id, toast, onBack }) { function ArchivModal({ calcId, onClose }) { const [item, setItem] = useState(null); const [lightbox, setLightbox] = useState(false); + const mobile = window.innerWidth < 768; + useEffect(() => { api('/tools/kalkulator3d').then(items => { setItem(items.find(i => i.id === calcId) || null); @@ -457,50 +459,64 @@ function ArchivModal({ calcId, onClose }) { ); + // Mobile: bottom-sheet, Desktop: centered dialog + const overlayStyle = { + position:'fixed', inset:0, background:'rgba(0,0,0,0.85)', zIndex:6000, + display:'flex', + alignItems: mobile ? 'flex-end' : 'center', + justifyContent: 'center', + padding: mobile ? 0 : 24, + }; + const dialogStyle = mobile ? { + background:'#1a1a1e', borderRadius:'16px 16px 0 0', width:'100%', maxWidth:600, + maxHeight:'85vh', overflowY:'auto', border:'1px solid rgba(255,255,255,0.1)', + } : { + background:'#1a1a1e', borderRadius:16, width:'100%', maxWidth:560, + maxHeight:'90vh', overflowY:'auto', border:'1px solid rgba(255,255,255,0.15)', + boxShadow:'0 24px 80px rgba(0,0,0,0.6)', + }; + return ( -
e.target===e.currentTarget&&onClose()}> +
e.target===e.currentTarget&&onClose()}> {lightbox &&
setLightbox(false)}>
} -
-
-
-
-
{item.name}
- +
+
+ {mobile &&
} +
+
{item.name}
+
-
+
{item.image && ( {item.name}setLightbox(true)} - style={{width:'100%',maxHeight:180,objectFit:'cover',borderRadius:8,marginBottom:12, - cursor:'pointer',border:'1px solid rgba(255,255,255,0.1)'}}/> + style={{width:'100%', maxHeight: mobile?180:260, objectFit:'cover', borderRadius:10, marginBottom:14, + cursor:'pointer', border:'1px solid rgba(255,255,255,0.1)'}}/> )} -
+
{[['Gewicht',`${item.gramm}g`],['Dauer',`${item.stunden}h`],['Farben',item.farben]].map(([l,v])=>( -
-
{l.toUpperCase()}
-
{v}
+
+
{l.toUpperCase()}
+
{v}
))}
-
+
{[['💖',item.preis_freundschaft,'#ff6b9d'],['🤝',item.preis_normal,'#4ecdc4'],['💼',item.preis_auftrag,'#ffe66d']].map(([e,v,color])=>( -
-
{e}
-
{v.toFixed(2)}€
+
+
{e}
+
{v.toFixed(2)}€
))}
{item.bemerkung && (
-
{item.bemerkung}
+ borderRadius:8,padding:'12px 14px'}}> +
{item.bemerkung}
)}