Added plugin menu entries

This commit is contained in:
booploops 2022-02-18 23:23:47 -08:00
parent f83e53770d
commit 3ef3c7757a
2 changed files with 17 additions and 0 deletions

View file

@ -15,6 +15,19 @@ const MusicKitObjects = {
}
}
const CiderFrontAPI = {
Objects: {
MenuEntry: function () {
this.id = ""
this.name = ""
this.onClick = ()=>{}
}
},
AddMenuEntry(entry) {
app.pluginMenuEntries.push(entry)
}
}
const MusicKitTools = {
getHeader() {
return new Headers({
@ -63,6 +76,7 @@ const app = new Vue({
platform: "",
mk: {},
quickPlayQuery: "",
pluginMenuEntries: [],
lz: ipcRenderer.sendSync("get-i18n", "en_US"),
lzListing: ipcRenderer.sendSync("get-i18n-listing"),
search: {

View file

@ -114,6 +114,9 @@
style="right:2.5px;"><%- include("../svg/log-out.svg") %></span>
<span class="usermenu-item-name">{{$root.getLz('term.logout')}}</span>
</button>
<button class="usermenu-item" @click="entry.onClick()" v-for="entry in pluginMenuEntries">
{{ entry.name }}
</button>
</div>
</div>
</transition>