feat: show playlist description in detail view
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
729e9d260c
commit
1c59b4eccd
4 files changed
+5
-1
No files matched your search
@@ -439,6 +439,8 @@ async function loadPlaylistDetail(pl){
|
||||
const songs=full.entry||[];
|
||||
const totalMin=Math.round(songs.reduce((s,t)=>s+(t.duration||0),0)/60);
|
||||
document.getElementById('playlist-detail-stats').textContent=`${songs.length} Titel · ${totalMin} Min.`;
|
||||
const descEl=document.getElementById('playlist-detail-desc');
|
||||
if(descEl){descEl.textContent=full.comment||'';descEl.style.display=full.comment?'':'none';}
|
||||
document.getElementById('btn-play-playlist').onclick=()=>playQueue(songs,0);
|
||||
document.getElementById('btn-shuffle-playlist').onclick=()=>{
|
||||
const shuffled=[...songs].sort(()=>Math.random()-.5);
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
<div class="album-type">Playlist</div>
|
||||
<div class="album-name" id="playlist-detail-name">—</div>
|
||||
<div class="album-stats" id="playlist-detail-stats"></div>
|
||||
<div class="playlist-detail-desc" id="playlist-detail-desc"></div>
|
||||
<div class="album-actions">
|
||||
<button class="btn-play-all" id="btn-play-playlist"><svg width="13" height="13" viewBox="0 0 24 24" fill="currentColor"><polygon points="5 3 19 12 5 21 5 3"/></svg>Abspielen</button>
|
||||
<button class="btn-outline" id="btn-shuffle-playlist"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 3 21 3 21 8"/><line x1="4" y1="20" x2="21" y2="3"/><polyline points="21 16 21 21 16 21"/><line x1="15" y1="15" x2="21" y2="21"/></svg>Shuffle</button>
|
||||
|
||||
@@ -165,6 +165,7 @@ nav{flex:1;overflow-y:auto;padding:4px 10px}
|
||||
.album-artist-name{font-size:14px;color:var(--text2);margin-bottom:10px;cursor:pointer}
|
||||
.album-artist-name:hover{color:var(--accent)}
|
||||
.album-stats{font-size:12px;color:var(--text3)}
|
||||
.playlist-detail-desc{font-size:13px;color:var(--text2);line-height:1.5;margin-top:6px;max-width:480px}
|
||||
.album-actions{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}
|
||||
.btn-play-all{display:flex;align-items:center;gap:7px;padding:10px 20px;border-radius:25px;background:var(--accent);color:#000;border:none;font-family:var(--font);font-size:13px;font-weight:700;cursor:pointer;transition:opacity .15s,transform .15s}
|
||||
.btn-play-all:hover{opacity:.9;transform:scale(1.02)}
|
||||
|
||||
Reference in new issue
Block a user