Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
0cfc93f54d
1 changed files with 10 additions and 1 deletions
|
@ -333,7 +333,12 @@
|
||||||
"icon": "./assets/feather/share.svg",
|
"icon": "./assets/feather/share.svg",
|
||||||
"name": "Share",
|
"name": "Share",
|
||||||
"action": function () {
|
"action": function () {
|
||||||
self.app.copyToClipboard(self.item.attributes.url)
|
if (!self.item.attributes.url && self.item.relationships){
|
||||||
|
if (self.item.relationships.catalog){
|
||||||
|
app.mkapi(self.item.attributes.playParams.kind, false, self.item.relationships.catalog.data[0].id).then(u => {self.app.copyToClipboard((u.length && u.length > 0)? u[0].attributes.url : u.attributes.url)})
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
self.app.copyToClipboard(self.item.attributes.url)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -348,6 +353,7 @@
|
||||||
menus.multiple.items = menus.multiple.items.concat(this.contextExt.multiple)
|
menus.multiple.items = menus.multiple.items.concat(this.contextExt.multiple)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
try{
|
||||||
let rating = await app.getRating(self.item)
|
let rating = await app.getRating(self.item)
|
||||||
if (rating == 0) {
|
if (rating == 0) {
|
||||||
menus.normal.items.find(x => x.id == 'love').disabled = false
|
menus.normal.items.find(x => x.id == 'love').disabled = false
|
||||||
|
@ -356,6 +362,9 @@
|
||||||
menus.normal.items.find(x => x.id == 'unlove').disabled = false
|
menus.normal.items.find(x => x.id == 'unlove').disabled = false
|
||||||
} else if (rating == -1) {
|
} else if (rating == -1) {
|
||||||
menus.normal.items.find(x => x.id == 'undo_dislike').disabled = false
|
menus.normal.items.find(x => x.id == 'undo_dislike').disabled = false
|
||||||
|
}
|
||||||
|
} catch(err) {
|
||||||
|
|
||||||
}
|
}
|
||||||
CiderContextMenu.Create(event, menus[useMenu])
|
CiderContextMenu.Create(event, menus[useMenu])
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue