Add an Albums column to the dashboard's Most played pane
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 12s
CI / federation-interop (push) Successful in 1m38s
CI / test (push) Failing after 3m7s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 12s
CI / federation-interop (push) Successful in 1m38s
CI / test (push) Failing after 3m7s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
Top albums were already available from the API (/me/top/albums, same shape as artists/tracks) but never surfaced in the UI. Reuses the existing renderRanking() helper; the charts grid is auto-fit, so the third column drops in with no CSS changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
1 parent
dfdb5285da
commit
b307b11440
2 files changed
+4
-1
No files matched your search
@@ -23,6 +23,7 @@
|
||||
</div>
|
||||
<div class="charts">
|
||||
<div><h3 class="muted">Artists</h3><ol class="ranking" id="top-artists"></ol></div>
|
||||
<div><h3 class="muted">Albums</h3><ol class="ranking" id="top-albums"></ol></div>
|
||||
<div><h3 class="muted">Tracks</h3><ol class="ranking" id="top-tracks"></ol></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -199,11 +199,13 @@ function renderPeriodSelector() {
|
||||
}
|
||||
|
||||
async function loadTop(period) {
|
||||
const [artists, tracks] = await Promise.all([
|
||||
const [artists, albums, tracks] = await Promise.all([
|
||||
api(`/me/top/artists?period=${period}&limit=10`),
|
||||
api(`/me/top/albums?period=${period}&limit=10`),
|
||||
api(`/me/top/tracks?period=${period}&limit=10`),
|
||||
]);
|
||||
renderRanking(document.getElementById("top-artists"), artists.items, false);
|
||||
renderRanking(document.getElementById("top-albums"), albums.items, true);
|
||||
renderRanking(document.getElementById("top-tracks"), tracks.items, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user