🔷 add PlayingFrom component to right sidebar

🔷 move upNext card into separate component
🔷 a lot of refactors
This commit is contained in:
geoffrey45
2022-04-03 21:47:57 +03:00
parent 334cf0fce1
commit 6cf9a58d6d
26 changed files with 425 additions and 220 deletions
+5 -3
View File
@@ -1,15 +1,17 @@
import { defineStore } from "pinia";
import { getPlaylist, getPTracks } from "../composables/playlists";
import { getPlaylist } from "../composables/playlists";
import { Track, Playlist } from "../interfaces";
export default defineStore("playlist-tracks", {
state: () => ({
playlist: <Playlist>{},
info: <Playlist>{},
tracks: <Track[]>[],
}),
actions: {
async fetchAll(playlistid: string) {
const playlist = await getPlaylist(playlistid);
this.playlist = playlist;
this.info = playlist.info;
this.tracks = playlist.tracks;
},
},
});