forked from dbroqua/MusicTopus
1.4.4 (#84)
Fonctionnalités : - #82 - Utilisateur artists plutôt que artists_sort Co-authored-by: dbroqua <contact@darkou.fr> Reviewed-on: https://git.darkou.fr/dbroqua/MusicTopus/pulls/84
This commit is contained in:
parent
fbeb1a67c5
commit
e0f227af08
4 changed files with 33 additions and 12 deletions
|
@ -21,7 +21,7 @@ Vue.createApp({
|
|||
showModalDelete: false,
|
||||
showModalShare: false,
|
||||
// eslint-disable-next-line no-undef
|
||||
shareLink: `${protocol}//${host}/collection/${userId}`,
|
||||
shareLink: `/collection/${userId}`,
|
||||
// eslint-disable-next-line no-undef
|
||||
isPublicCollection,
|
||||
// eslint-disable-next-line no-undef
|
||||
|
@ -67,7 +67,7 @@ Vue.createApp({
|
|||
|
||||
let url = `/api/v1/albums?page=${this.page}&limit=${this.limit}&sort=${this.sort}&order=${this.order}`;
|
||||
if (this.artist) {
|
||||
url += `&artists_sort=${this.formatParams(this.artist)}`;
|
||||
url += `&artist=${this.formatParams(this.artist)}`;
|
||||
}
|
||||
if (this.format) {
|
||||
url += `&format=${this.formatParams(this.format)}`;
|
||||
|
@ -218,5 +218,20 @@ Vue.createApp({
|
|||
this.toggleModalShare();
|
||||
});
|
||||
},
|
||||
renderAlbumTitle(item) {
|
||||
let render = '';
|
||||
|
||||
for ( let i = 0 ; i < item.artists.length ; i += 1 ) {
|
||||
const {
|
||||
name,
|
||||
join,
|
||||
} = item.artists[i];
|
||||
render += `${name} ${join ? `${join} ` : ''}`;
|
||||
}
|
||||
|
||||
render += `- ${item.title}`;
|
||||
|
||||
return render;
|
||||
}
|
||||
},
|
||||
}).mount("#collection");
|
Loading…
Add table
Add a link
Reference in a new issue