diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 64e74ae..8719ccf 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -485,20 +485,65 @@ function QuickLinks({ toast, mobile }) { {/* Link-Grid */} {links.length === 0 && !editMode ?
Links können unter Einstellungen → Dashboard hinzugefügt werden.
+ : mobile ? (() => { + // Mobile: max 2 Zeilen, dann horizontal scrollbar + // Berechne Icons pro Zeile anhand der Viewport-Breite + const iconW = 58 + 6; // minWidth + gap + const containerW = window.innerWidth - 28 - 28; // padding links+rechts (S.card=14px*2) + const perRow = Math.max(3, Math.floor(containerW / iconW)); + const maxVisible = perRow * 2; + const needsScroll = links.length > maxVisible; + const pages = needsScroll + ? Math.ceil(links.length / maxVisible) + : 1; + // Gruppen zu je maxVisible Icons + const groups = []; + for (let i = 0; i < links.length; i += maxVisible) groups.push(links.slice(i, i + maxVisible)); + return ( +
+ {groups.map((group, gi) => ( +
+ {group.map(l => ( +
+ + {l.icon && l.icon.startsWith('http') + ? e.target.style.display='none'}/> + : {l.icon}} + {l.title} + +
+ ))} +
+ ))} +
+ ); + })() :
{links.map(l => (
- + textDecoration:'none', height:58, cursor:'pointer' }}> {l.icon && l.icon.startsWith('http') - ? e.target.style.display='none'}/> - : {l.icon}} + ? e.target.style.display='none'}/> + : {l.icon}} {l.title}