@@ -24,7 +24,7 @@
:type="item.type">
+ @click="getContextMenu"><%- include("../svg/more.svg") %>
@@ -108,12 +108,11 @@
let color = `#${(this.item.attributes.artwork != null && this.item.attributes.artwork.bgColor != null) ? (this.item.attributes.artwork.bgColor) : ``}`
return color
},
- getContextMenu(item) {
- console.log(item)
- if (item.type == "artists") {
- return this.artistMenu(item)
+ getContextMenu(event) {
+ if (this.item.type == "artists") {
+ return this.artistMenu(event)
} else {
- return this.contextMenu(item)
+ return this.contextMenu(event)
}
},
getSubtitle() {
@@ -509,6 +508,7 @@
}
},
async artistMenu (event) {
+ console.debug(this.item)
let self = this
let followAction = "follow"
let followActions = {
@@ -516,21 +516,21 @@
icon: "./assets/feather/plus-circle.svg",
name: app.getLz('action.follow'),
action: ()=>{
- self.app.cfg.home.followedArtists.push(event.id)
+ self.app.cfg.home.followedArtists.push(this.item.id)
}
},
unfollow: {
icon: "./assets/feather/x-circle.svg",
name: app.getLz('action.unfollow'),
action: ()=>{
- let index = self.app.cfg.home.followedArtists.indexOf(event.id)
+ let index = self.app.cfg.home.followedArtists.indexOf(this.item.id)
if (index > -1) {
self.app.cfg.home.followedArtists.splice(index, 1)
}
}
}
}
- if(self.app.cfg.home.followedArtists.includes(event.id)) {
+ if(self.app.cfg.home.followedArtists.includes(this.item.id)) {
followAction = "unfollow"
}
app.showMenuPanel({
@@ -539,7 +539,7 @@
icon: "./assets/feather/play.svg",
name: app.getLz('action.startRadio'),
action: ()=>{
- app.mk.setStationQueue({artist:event.id}).then(()=>{
+ app.mk.setStationQueue({artist:this.item.id}).then(()=>{
app.mk.play()
})
}
@@ -549,7 +549,7 @@
icon: "./assets/feather/share.svg",
name: app.getLz('term.share'),
action: ()=>{
- self.app.copyToClipboard(event.attributes.url)
+ self.app.copyToClipboard(this.item.id.attributes.url)
}
},
{
diff --git a/src/renderer/views/components/menu-panel.ejs b/src/renderer/views/components/menu-panel.ejs
index b2f552fe..28295375 100644
--- a/src/renderer/views/components/menu-panel.ejs
+++ b/src/renderer/views/components/menu-panel.ejs
@@ -1,7 +1,7 @@
\ No newline at end of file