mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
🔷 add PlayingFrom component to right sidebar
🔷 move upNext card into separate component 🔷 a lot of refactors
This commit is contained in:
@@ -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;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user