follow has been migrated to favorites

This commit is contained in:
booploops 2022-06-09 21:25:38 -07:00
parent 05b6ea112e
commit d7b314e0f5
9 changed files with 257 additions and 222 deletions

View file

@ -6,8 +6,8 @@
<div class="artist-chip__name">
<span>{{ item.attributes.name }}</span>
</div>
<button @click="$root.followArtistById(artist.id, true)" title="Follow" v-if="!$root.followingArtist(artist.id)" class="artist-chip__follow codicon codicon-add"></button>
<button @click="$root.followArtistById(artist.id, false)" title="Following" v-else class="artist-chip__follow codicon codicon-check"></button>
<button @click="$root.setArtistFavorite(artist.id, true)" title="Follow" v-if="!$root.followingArtist(artist.id)" class="artist-chip__follow codicon codicon-add"></button>
<button @click="$root.setArtistFavorite(artist.id, false)" title="Following" v-else class="artist-chip__follow codicon codicon-check"></button>
</div>
</script>

View file

@ -534,19 +534,16 @@
let followActions = {
follow: {
icon: "./assets/feather/plus-circle.svg",
name: app.getLz('action.follow'),
name: app.getLz('action.favorite'),
action: () => {
self.app.cfg.home.followedArtists.push(this.item.id)
self.$root.setArtistFavorite(this.item.id, true)
}
},
unfollow: {
icon: "./assets/feather/x-circle.svg",
name: app.getLz('action.unfollow'),
name: app.getLz('action.removeFavorite'),
action: () => {
let index = self.app.cfg.home.followedArtists.indexOf(this.item.id)
if (index > -1) {
self.app.cfg.home.followedArtists.splice(index, 1)
}
self.$root.setArtistFavorite(this.item.id, false)
}
}
}