make albums on artist page reactive

+ show artist name on artist album component on album page
+ attach artist page link to artist card
+ use small artist page on album header
+ use album color on genre banner on album page
This commit is contained in:
geoffrey45
2022-12-04 19:35:16 +03:00
committed by Mungai Njoroge
parent 075765088f
commit e54fea2d4d
14 changed files with 104 additions and 60 deletions
+17 -11
View File
@@ -47,30 +47,36 @@ interface ScrollerItem {
id: string | number;
component: any;
props?: Record<string, unknown>;
// size: number;
}
const header: ScrollerItem = {
id: "artist-header",
component: Header,
// size: 16 * 19,
};
const top_tracks: ScrollerItem = {
id: "artist-top-tracks",
component: TopTracks,
// size: 16 * 25,
};
const artistAlbums: ScrollerItem = {
id: "artist-albums",
component: ArtistAlbums,
// size: 16 * 16,
props: { title: "Albums", albums: artistStore.albums },
};
const scrollerItems = computed(() => {
return [header, top_tracks, artistAlbums];
let components = [header];
if (artistStore.tracks.length > 0) {
components.push(top_tracks);
}
if (artistStore.albums.length > 0) {
const artistAlbums: ScrollerItem = {
id: "artist-albums",
component: ArtistAlbums,
props: { title: "Albums", albums: artistStore.albums },
};
components.push(artistAlbums);
}
return components;
});
onBeforeRouteUpdate((to, from, next) => {