major refactors

- remove jpgs
- add new album header
- remove duplicate components
- display album bio on client
- add a route loader module
- change color scheme
- other minor changes
This commit is contained in:
geoffrey45
2022-01-18 20:51:22 +03:00
parent 2ee8d27bf0
commit 1d1e697fd2
38 changed files with 327 additions and 465 deletions
+43
View File
@@ -0,0 +1,43 @@
import Router from "@/router";
import album from "./album.js";
import state from "./state.js";
function toAlbum(title, artist) {
album
.getAlbumTracks(title, artist)
.then((data) => {
state.album_song_list.value = data.songs;
state.album_info.value = data.info;
})
.then(
album.getAlbumArtists(title, artist).then((data) => {
state.album_artists.value = data;
})
)
.then(
album.getAlbumBio(title, artist).then((data) => {
if (data == "None") {
state.album_bio.value = null;
} else {
state.album_bio.value = data;
}
})
)
.then(
Router.push({
name: "AlbumView",
params: {
album: title,
artist: artist,
},
})
)
.catch((error) => {
console.log(error);
});
}
export default {
toAlbum,
};