From 356c94e356cc0771ce86af80341428e7ae912955 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Thu, 3 Feb 2022 07:06:16 +0700 Subject: [PATCH] add share button on nowplaying --- src/renderer/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/renderer/index.js b/src/renderer/index.js index c09627f5..0a940a7f 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -3394,6 +3394,13 @@ const app = new Vue({ }) } }, + { + "icon": "./assets/feather/share.svg", + "name": app.getLz('action.share'), + "action": function () { + app.mkapi( app.mk.nowPlayingItem.attributes?.playParams?.kind ?? app.mk.nowPlayingItem.type ?? 'songs', false, app.mk.nowPlayingItem._songId ?? app.mk.nowPlayingItem.id ?? '').then(u => {app.copyToClipboard((u.data.data.length && u.data.data.length > 0)? u.data.data[0].attributes.url : u.data.data.attributes.url)}) + } + } ] } }