Skip to content

Commit

Permalink
fix missing empty indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
tamland committed Oct 18, 2023
1 parent e89ac0b commit 2c37f09
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/library/favourite/Favourites.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@
</li>
</ul>
<ContentLoader v-slot :loading="details == null">
<ArtistList v-if="section === 'artists'" :items="details.artists" />
<TrackList v-else-if="section === 'tracks'" :tracks="details.tracks" />
<AlbumList v-else :items="details.albums" />
<template v-if="section === 'artists'">
<ArtistList v-if="details.artists.length > 0" :items="details.artists" />
<EmptyIndicator v-else />
</template>
<template v-else-if="section === 'tracks'">
<TrackList v-if="details.tracks.length > 0" :tracks="details.tracks" />
<EmptyIndicator v-else />
</template>
<template v-else>
<AlbumList v-if="details.albums.length > 0" :items="details.albums" />
<EmptyIndicator v-else />
</template>
</ContentLoader>
</div>
</template>
Expand Down

0 comments on commit 2c37f09

Please sign in to comment.