added app.openAppleMusicURL(url) function

This commit is contained in:
booploops 2022-01-13 01:59:40 -08:00
parent a5a8a09d04
commit 12be6212e8
2 changed files with 242 additions and 191 deletions

View file

@ -138,12 +138,14 @@
let followAction = "follow"
let followActions = {
follow: {
icon: "./assets/feather/plus-circle.svg",
name: "Follow Artist",
action: ()=>{
self.app.cfg.home.followedArtists.push(self.data.id)
}
},
unfollow: {
icon: "./assets/feather/x-circle.svg",
name: "Unfollow Artist",
action: ()=>{
let index = self.app.cfg.home.followedArtists.indexOf(self.data.id)
@ -156,9 +158,11 @@
if(this.app.cfg.home.followedArtists.includes(self.data.id)) {
followAction = "unfollow"
}
CiderContextMenu.Create(event, {
app.showMenuPanel({
name: self.data.attributes.name,
items: [
{
icon: "./assets/feather/play.svg",
name: "Play Artist Radio",
action: ()=>{
app.mk.setStationQueue({artist:self.data.id}).then(()=>{
@ -168,6 +172,7 @@
},
followActions[followAction],
{
icon: "./assets/feather/share.svg",
name: "Share",
action: ()=>{
self.app.copyToClipboard(self.data.attributes.url)