credit encore 1

This commit is contained in:
Patrick
2025-04-02 21:54:43 +02:00
parent 753da9e9a1
commit 07b6629d10
2 changed files with 6 additions and 8 deletions

View File

@@ -40,7 +40,6 @@
<div class="results-grid">
<div class="card" each="{item in searchs.items}">
<!-- Afficher l'étoile avec la musique immédiatement -->
{console.log(item.isFavorite)}
<a if={authUser && this.searchs.type !== "artist"} onclick={() => item.isFavorite ? this.removeFavoris(item.id, item.type) : this.addFavoris(item.id, item.type)}>
<button><i class={item.isFavorite ? "fa-solid fa-star" : "fa-regular fa-star"}></i></button>
</a>
@@ -92,7 +91,6 @@
const query = e?.target?.query?.value || this.searchs.query;
const result = await window.discogsearch(query, type, page);
console.log(result);
const favoritePromises = result.results.map(item => window.isFavorite(item.id, item.type));
const favoritesResults = await Promise.all(favoritePromises);

View File

@@ -50,18 +50,18 @@
async onMounted() {
const id = this.props.Id
if(this.props.Type === "release"){
this.state.release = await window.getReleaseDetails(id)
this.state.release = await window.getReleaseDetails(id);
// Récupérer les extra-artists depuis leur URL
const response = await fetch(artist.resource_url);
this.state.resource = response.json();
this.update();
}
else if (this.props.Type === "master"){
this.state.release = await window.getMasterDetails(id)
}
else{
this.state.release = await window.getArtistDetails(id)
// Récupérer les extra-artists depuis leur URL
const response = await fetch(artist.resource_url);
this.state.resource = response.json();
this.update();
}
this.update()