Added Most Streamed Albums to Home Tab

This commit is contained in:
RemixDev 2020-05-10 14:57:53 +02:00
parent 9cae0b4210
commit 0c74cc3123
4 changed files with 23 additions and 3 deletions

View File

@ -295,6 +295,22 @@ <h3 class="section_heading">Popular playlists</h3>
</div>
</div>
</section>
<section v-if="albums.length" class="home_section">
<h3 class="section_heading">Most streamed albums</h3>
<div class="release_grid">
<div v-for="release in albums" class="release clickable" @click="albumView"
:data-id="release.id">
<div class="cover_container">
<img class="rounded coverart" :src="release.cover_medium">
<div role="button" aria-label="download" @contextmenu.prevent="openQualityModal"
@click.stop="addToQueue" :data-link="release.link" class="download_overlay"><i
class="material-icons">get_app</i></div>
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">{{ 'by '+release.artist.name+' - '+release.nb_tracks+' tracks' }}</p>
</div>
</div>
</section>
</div>
<div id="charts_tab" class="main_tabcontent">

View File

@ -41366,7 +41366,8 @@ const LinkAnalyzerTab = new Vue({
const HomeTab = new Vue({
data() {
return {
playlists: []
playlists: [],
albums: []
}
},
methods: {
@ -41385,6 +41386,7 @@ const HomeTab = new Vue({
},
initHome(data) {
this.playlists = data.playlists.data;
this.albums = data.albums.data;
}
},
mounted() {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,8 @@ import Utils from '../utils.js'
const HomeTab = new Vue({
data() {
return {
playlists: []
playlists: [],
albums: []
}
},
methods: {
@ -28,6 +29,7 @@ const HomeTab = new Vue({
},
initHome(data) {
this.playlists = data.playlists.data
this.albums = data.albums.data
}
},
mounted() {