chore: more responsive track display; remove unused data calculations
This commit is contained in:
parent
dbf2700462
commit
c7bf949098
5 changed files with 13 additions and 14 deletions
|
@ -145,14 +145,7 @@ export default async function() {
|
|||
|
||||
const recentData = await fetchDataForPeriod(DateTime.now().minus({ days: 7 }), selectFields, 'listens')
|
||||
|
||||
results['recent'] = {
|
||||
artists: await aggregateData(recentData, 'artist_name', 'artists'),
|
||||
albums: await aggregateData(recentData, 'album_name', 'albums'),
|
||||
tracks: await aggregateData(recentData, 'track_name', 'track'),
|
||||
tracksChronological: (await buildRecents(recentData)).sort((a, b) => b.timestamp - a.timestamp),
|
||||
genres: await aggregateGenres(recentData),
|
||||
totalTracks: recentData?.length?.toLocaleString('en-US')
|
||||
}
|
||||
results['recent'] = (await buildRecents(recentData)).sort((a, b) => b.timestamp - a.timestamp)
|
||||
|
||||
return results
|
||||
}
|
|
@ -116,8 +116,14 @@
|
|||
width: calc(80% - var(--sizing-lg));
|
||||
}
|
||||
|
||||
& .item .meta-text {
|
||||
max-width: 85%;
|
||||
& .item {
|
||||
& .meta {
|
||||
width: calc(75% - var(--sizing-lg));
|
||||
}
|
||||
|
||||
& .meta-text {
|
||||
max-width: 85%;
|
||||
}
|
||||
}
|
||||
|
||||
&.grid {
|
||||
|
|
|
@ -70,7 +70,7 @@ schema: music-index
|
|||
</div>
|
||||
</div>
|
||||
<div id="tracks-recent">
|
||||
{% render "partials/media/music/recent", data:music.recent.tracksChronological %}
|
||||
{% render "partials/media/music/recent", data:music.recent %}
|
||||
</div>
|
||||
<div class="hidden" id="tracks-window">
|
||||
{% render "partials/media/music/chart.liquid", data:music.week.tracks, mostPlayed:music.week.tracks[0].plays, count: 10 %}
|
||||
|
|
Reference in a new issue