mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-03-05 02:11:13 +08:00
Update tray.js (#193)
This commit is contained in:
parent
236075a1f8
commit
96a90eea25
@ -21,11 +21,24 @@ export function createTray(win) {
|
||||
tray.on("right-click", () => {
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: "Quit",
|
||||
click: () => {
|
||||
app.exit();
|
||||
label: "播放/暂停",
|
||||
click: () => {
|
||||
win.webContents.send("play");
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "下一首",
|
||||
accelerator: "CmdOrCtrl+Right",
|
||||
click: () => {
|
||||
win.webContents.send("next");
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "退出",
|
||||
click: () => {
|
||||
app.exit();
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
tray.popUpContextMenu(contextMenu);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user