added sharing to playlist menu, making vue based context menu WIP
This commit is contained in:
parent
5f24bf0259
commit
a5a8a09d04
5 changed files with 192 additions and 0 deletions
|
@ -74,6 +74,14 @@
|
|||
@click="(!inLibrary) ? addToLibrary(data.attributes.playParams.id.toString()) : removeFromLibrary(data.attributes.playParams.id.toString()) ">
|
||||
Confirm?
|
||||
</button>
|
||||
<button class="playlist-more" @click="menu">
|
||||
<div style=" margin-top: -1px;
|
||||
margin-left: -5px;
|
||||
width: 36px;
|
||||
height: 36px;">
|
||||
<%- include("../svg/more.svg") %>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -311,6 +319,24 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
menu() {
|
||||
app.showMenuPanel({
|
||||
name: this.data.attributes ? (this.data.attributes.name ??
|
||||
(this.data.attributes.title ?? '') ?? '') : '',
|
||||
items: {
|
||||
"share": {
|
||||
name: "Share",
|
||||
icon: "./assets/feather/share.svg",
|
||||
action: () => {
|
||||
app.mk.api.v3.music(`/v1/me/library/playlists/${this.data.id}/catalog`).then(res=>{
|
||||
console.log(res.data.data[0].attributes.url)
|
||||
app.copyToClipboard(res.data.data[0].attributes.url)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getItemParent: function (data) {
|
||||
kind = data.attributes.playParams.kind;
|
||||
id = data.attributes.playParams.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue