show starred artists and albums
This commit is contained in:
@@ -1,22 +1,39 @@
|
||||
<template>
|
||||
<TrackList v-if="items" :tracks="items" />
|
||||
<div v-if="result">
|
||||
<div v-if="result.albums.length > 0" class="mb-4">
|
||||
<h1>Albums</h1>
|
||||
<AlbumList :items="result.albums" />
|
||||
</div>
|
||||
<div v-if="result.artists.length > 0" class="mb-4">
|
||||
<h1>Artists</h1>
|
||||
<ArtistList :items="result.artists" />
|
||||
</div>
|
||||
<div v-if="result.tracks.length > 0" class="mb-4">
|
||||
<h1>Tracks</h1>
|
||||
<TrackList :tracks="result.tracks" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import Vue from 'vue'
|
||||
import AlbumList from '@/library/album/AlbumList.vue'
|
||||
import ArtistList from '@/library/artist/ArtistList.vue'
|
||||
import TrackList from '@/library/TrackList.vue'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
AlbumList,
|
||||
ArtistList,
|
||||
TrackList,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: null as any,
|
||||
result: null as any,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$api.getStarred().then(result => {
|
||||
this.items = result
|
||||
this.result = result
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user