mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
connect favorites data to favorites page
+ detach isSmall and isMedium classes from the v-scroll-page class + customize the TopTracks component to be usable with the favorite tracks page + add queue methods to play tracks from favorites page + handle playing from artist top tracks in parent component
This commit is contained in:
committed by
Mungai Njoroge
parent
62fb70d26c
commit
905fff04b4
+15
-1
@@ -9,6 +9,7 @@ import updateMediaNotif from "../composables/mediaNotification";
|
||||
import {
|
||||
fromAlbum,
|
||||
fromArtist,
|
||||
fromFav,
|
||||
fromFolder,
|
||||
fromPlaylist,
|
||||
fromSearch,
|
||||
@@ -24,7 +25,13 @@ function shuffle(tracks: Track[]) {
|
||||
return shuffled;
|
||||
}
|
||||
|
||||
type From = fromFolder | fromAlbum | fromPlaylist | fromSearch | fromArtist;
|
||||
type From =
|
||||
| fromFolder
|
||||
| fromAlbum
|
||||
| fromPlaylist
|
||||
| fromSearch
|
||||
| fromArtist
|
||||
| fromFav;
|
||||
|
||||
let audio = new Audio();
|
||||
audio.autoplay = false;
|
||||
@@ -189,6 +196,13 @@ export default defineStore("Queue", {
|
||||
|
||||
this.setNewQueue(tracks);
|
||||
},
|
||||
playFromFav(tracks: Track[]) {
|
||||
this.from = <fromFav>{
|
||||
type: FromOptions.favorite,
|
||||
};
|
||||
|
||||
this.setNewQueue(tracks);
|
||||
},
|
||||
addTrackToQueue(track: Track) {
|
||||
this.tracklist.push(track);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user