add featured artists to playlist page

+ fetch album bio on raising bottom container
This commit is contained in:
geoffrey45
2022-07-08 16:39:16 +03:00
parent 9d5cbfcc93
commit 09c588c856
15 changed files with 154 additions and 84 deletions
+10 -1
View File
@@ -1,11 +1,16 @@
import { Artist } from "./../../interfaces";
import { defineStore } from "pinia";
import { getPlaylist } from "../../composables/pages/playlists";
import {
getPlaylist,
getPlaylistArtists,
} from "../../composables/pages/playlists";
import { Track, Playlist } from "../../interfaces";
export default defineStore("playlist-tracks", {
state: () => ({
info: <Playlist>{},
tracks: <Track[]>[],
artists: <Artist[]>[],
}),
actions: {
/**
@@ -18,6 +23,10 @@ export default defineStore("playlist-tracks", {
this.info = playlist.info;
this.tracks = playlist.tracks;
},
async fetchArtists(playlistid: string) {
this.artists = await getPlaylistArtists(playlistid);
},
/**
* Updates the playlist header info. This is used when the playlist is
* updated.