implement track favoriting

update img route
This commit is contained in:
geoffrey45
2022-12-17 22:42:11 +03:00
committed by Mungai Njoroge
parent 35a8446f8b
commit c7cc687286
12 changed files with 141 additions and 31 deletions
+4 -1
View File
@@ -5,7 +5,7 @@ import { getArtistAlbums } from "@/composables/fetch/artists";
export default defineStore("artistDiscography", {
state: () => ({
artist: <string>"",
artistname: <string>"",
page: discographyAlbumTypes.all,
toShow: <Album[]>[],
@@ -17,6 +17,7 @@ export default defineStore("artistDiscography", {
}),
actions: {
setAlbums(page: discographyAlbumTypes) {
this.setPage(page);
switch (page) {
case discographyAlbumTypes.albums:
this.toShow = this.albums;
@@ -48,6 +49,7 @@ export default defineStore("artistDiscography", {
this.eps = data.eps;
this.singles = data.singles;
this.appearances = data.appearances;
this.artistname = data.artistname;
})
.then(() => this.setAlbums(this.page));
},
@@ -58,6 +60,7 @@ export default defineStore("artistDiscography", {
this.appearances = [];
this.toShow = [];
this.artistname = "";
},
},
});