mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
Update tray.js (#193)
This commit is contained in:
parent
236075a1f8
commit
96a90eea25
1 changed files with 17 additions and 4 deletions
|
|
@ -21,7 +21,20 @@ export function createTray(win) {
|
||||||
tray.on("right-click", () => {
|
tray.on("right-click", () => {
|
||||||
const contextMenu = Menu.buildFromTemplate([
|
const contextMenu = Menu.buildFromTemplate([
|
||||||
{
|
{
|
||||||
label: "Quit",
|
label: "播放/暂停",
|
||||||
|
click: () => {
|
||||||
|
win.webContents.send("play");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "下一首",
|
||||||
|
accelerator: "CmdOrCtrl+Right",
|
||||||
|
click: () => {
|
||||||
|
win.webContents.send("next");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "退出",
|
||||||
click: () => {
|
click: () => {
|
||||||
app.exit();
|
app.exit();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue