From a473df2afc82c9b71ca1c53d4d98c6b616b356d0 Mon Sep 17 00:00:00 2001 From: TestGifts Date: Mon, 8 Feb 2021 20:25:30 +0800 Subject: [PATCH] Revert "Expand tray menu" This reverts commit ea52c32400485d8645cc8cfe623b785b0432eec2. --- src/electron/tray.js | 30 +----------------------------- src/icon/exit.png | Bin 223 -> 0 bytes src/icon/left.png | Bin 191 -> 0 bytes src/icon/like.png | Bin 308 -> 0 bytes src/icon/play.png | Bin 396 -> 0 bytes src/icon/repeat.png | Bin 344 -> 0 bytes src/icon/right.png | Bin 218 -> 0 bytes 7 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 src/icon/exit.png delete mode 100644 src/icon/left.png delete mode 100644 src/icon/like.png delete mode 100644 src/icon/play.png delete mode 100644 src/icon/repeat.png delete mode 100644 src/icon/right.png diff --git a/src/electron/tray.js b/src/electron/tray.js index ae3152a..d06cfb1 100644 --- a/src/electron/tray.js +++ b/src/electron/tray.js @@ -22,54 +22,26 @@ export function createTray(win) { const contextMenu = Menu.buildFromTemplate([ { label: "播放/暂停", - icon: "src/icon/play.png", click: () => { win.webContents.send("play"); }, }, - { - label: "上一首", - icon: "src/icon/left.png", - accelerator: "CmdOrCtrl+Left", - click: () => { - win.webContents.send("previous"); - }, - }, { label: "下一首", - icon: "src/icon/right.png", accelerator: "CmdOrCtrl+Right", click: () => { win.webContents.send("next"); }, }, - { - label: "循环播放", - icon: "src/icon/repeat.png", - accelerator: "Alt+R", - click: () => { - win.webContents.send("repeat"); - }, - }, - { - label: "加入喜欢", - icon: "src/icon/like.png", - accelerator: "CmdOrCtrl+L", - click: () => { - win.webContents.send("like"); - }, - }, { label: "退出", - icon: "src/icon/exit.png", - accelerator: "CmdOrCtrl+W", click: () => { app.exit(); }, }, ]); - tray.popUpContextMenu(contextMenu); }); return tray; +} diff --git a/src/icon/exit.png b/src/icon/exit.png deleted file mode 100644 index 01e21b2c7f8e0e8f7e902cdd4221a7e46d5476a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 223 zcmV<503iQ~P)pf~V4a09N&=M*#sAn*(5B7o~o;61Q)fDLd?7k*H(02MF51vnWA7LbaM!1Js4 z0q7_!Kz+HvO~4odl$U%(oAF0D#0U}s^tjqN{5!<8u3n`eXXP3gfH`ua`w{KJJIO8H Z#t-s-9uZNcsP=D?O z&YZbNw0gHTNh%cYXjocWFnLEq^NeeZhniJd1T0iqEqA=S_qY82MpM2w?H9?lyY_$m1;$J5e1adJ9}ES$h{4m<&t;ucLK6T0Urqr4 diff --git a/src/icon/like.png b/src/icon/like.png deleted file mode 100644 index 4bea102372bdb0ed5f1402210278a7bbdd01f4be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 308 zcmV-40n7f0P)~6Y~%%4prrn5S+Ni$v5_4s8+ieF39_+MN~h*( zn(qHzb!Rip%=vxi%sId5={R~F_38j)m`vcOG|!~@6(9MfCEx~qgfK)eDR?T|yTwuk z$pIUf#TD)_j;$1Uf_E%n6^}TJvm6lV9UyLK8j;~%^~@abh0%W&^)EIDJmVavEs#yD zVY+<63U;xKw;_-TM4=CHT>@ggkHxHwB`4~1i9uZ#s=Xu3*FZvikDVqTRA&zu!8(3$ zfp5%}DK%O7IQ2X<;f?LOy0ra;FjHjkIjl2nfL2>{2K)l(z9xeaGOaU1GX>iBP*QK(5*4pq7 zz_rDtITR9(QmNXb*;lK{kpyEM04Xi!qmU**y_oT=%CgW-nrn#y2s28{u}1zE;M(3M zK$A+#g}Ax6j@Sd!i_)+A=3E3I&J*B+ckSPrMAi{=%vel-cN;MiAF#cN5VWPVTxtcp zebxF$E0w3fBwS16L8wb%;?q*#ubO>2opbt@mrcqjv$wLyWH8xn{sdtWHjBlkNW#BBNB7Zn zdw%@}r=Fhsa?ba>-iCilA0E;=0P7g3AUU8NAIaNOQiwEmFrIlm!YB6PEC&o@6APJg9iR(0=qv$C=&i_E z1lyP>iuYAH&m)LXLw-Wb01@&Gsy0Vx$l$&Eu>9gkd*MaEGnBHipNxG%QiHs`slH#USp}{cn+4y@eR6 qNj&2f=S4S~zJ*e+>AqD2EkWPRYcCPoeH01+000017p&dM R7!GtSgQu&X%Q~loCICFuRIdO4