Nightly: Sounds-Listing auf lineares Flex-Wrap umgestellt (keine Spalten, responsives Umbruch-Verhalten)
This commit is contained in:
parent
e3e341be6b
commit
17fa64c05a
2 changed files with 12 additions and 2 deletions
|
|
@ -323,7 +323,7 @@ export default function App() {
|
|||
{error && <div className="error">{error}</div>}
|
||||
{info && <div className="badge" style={{ background:'rgba(34,197,94,.18)', borderColor:'rgba(34,197,94,.35)' }}>{info}</div>}
|
||||
|
||||
<main className="flex flex-wrap gap-3">
|
||||
<main className="sounds-flow">
|
||||
{(activeFolder === '__favs__' ? filtered.filter((s) => !!favs[s.relativePath ?? s.fileName]) : filtered).map((s) => {
|
||||
const key = `${s.relativePath ?? s.fileName}`;
|
||||
const isFav = !!favs[key];
|
||||
|
|
@ -337,7 +337,7 @@ export default function App() {
|
|||
onChange={(e)=>{ e.stopPropagation(); toggleSelect(key, e.target.checked); }}
|
||||
/>
|
||||
)}
|
||||
<div className="sound-btn group rounded-xl flex items-center justify-between p-3 cursor-pointer min-w-[200px] max-w-[300px]" onClick={()=>handlePlay(s.name, s.relativePath)}>
|
||||
<div className="sound-btn group rounded-xl flex items-center justify-between p-3 cursor-pointer" onClick={()=>handlePlay(s.name, s.relativePath)}>
|
||||
<span className="text-sm font-medium truncate pr-2">{s.name}</span>
|
||||
<div className="flex items-center space-x-1 opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
<button className="text-gray-400 hover:text-[var(--accent-blue)]" onClick={(e)=>{e.stopPropagation(); setFavs(prev=>({ ...prev, [key]: !prev[key] }));}}><span className="material-icons text-xl">{isFav?'star':'star_border'}</span></button>
|
||||
|
|
|
|||
|
|
@ -532,6 +532,16 @@ header p {
|
|||
.error { background: rgba(255, 99, 99, .12); color: #ffd1d1; border: 1px solid rgba(255, 99, 99, .3); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
|
||||
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
|
||||
|
||||
/* Lineares, responsives Flow-Layout für Sounds */
|
||||
.sounds-flow {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 14px;
|
||||
}
|
||||
.sounds-flow .sound-wrap {
|
||||
flex: 0 1 220px; /* Basisbreite wie zuvor im Grid */
|
||||
}
|
||||
.sound-wrap { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
|
||||
.sound-wrap.row .sound { width: 100%; }
|
||||
.row-check { width: 18px; height: 18px; accent-color: #60a5fa; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue