mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2024-12-24 14:34:39 +03:00
Open window button in tray
In case click is not work in some distros
This commit is contained in:
parent
3eb7fe7816
commit
bea5319901
@ -1,5 +1,4 @@
|
|||||||
diff --git a/package.json b/package.json
|
diff --git a/package.json b/package.json
|
||||||
index 5844bdb..c1bab0e 100644
|
|
||||||
--- a/package.json
|
--- a/package.json
|
||||||
+++ b/package.json
|
+++ b/package.json
|
||||||
@@ -39,5 +39,6 @@
|
@@ -39,5 +39,6 @@
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
diff --git a/package.json b/package.json
|
diff --git a/package.json b/package.json
|
||||||
index c1bab0e..d66268b 100644
|
|
||||||
--- a/package.json
|
--- a/package.json
|
||||||
+++ b/package.json
|
+++ b/package.json
|
||||||
@@ -40,5 +40,9 @@
|
@@ -40,5 +40,9 @@
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
diff --git a/main/lib/createTray.js b/main/lib/createTray.js
|
diff --git a/main/lib/createTray.js b/main/lib/createTray.js
|
||||||
index e69de29..c8b9f0d 100644
|
|
||||||
--- a/main/lib/createTray.js
|
--- a/main/lib/createTray.js
|
||||||
+++ b/main/lib/createTray.js
|
+++ b/main/lib/createTray.js
|
||||||
@@ -0,0 +1,19 @@
|
@@ -0,0 +1,20 @@
|
||||||
+const { app, Menu, Tray, nativeImage } = require('electron');
|
+const { app, Menu, Tray, nativeImage } = require('electron');
|
||||||
+const path = require('path');
|
+const path = require('path');
|
||||||
+
|
+
|
||||||
@ -10,7 +9,8 @@ index e69de29..c8b9f0d 100644
|
|||||||
+ const iconPath = path.join(__dirname, '../../build/next-desktop/favicon.png');
|
+ const iconPath = path.join(__dirname, '../../build/next-desktop/favicon.png');
|
||||||
+ const tray = new Tray(iconPath);
|
+ const tray = new Tray(iconPath);
|
||||||
+ const contextMenu = Menu.buildFromTemplate([
|
+ const contextMenu = Menu.buildFromTemplate([
|
||||||
+ {label: 'Quit YandexMusic', click: app.quit}
|
+ {label: 'Open Window', click: () => window.show()},
|
||||||
|
+ {label: 'Quit YandexMusic', click: () => app.quit()}
|
||||||
+ ]);
|
+ ]);
|
||||||
+ tray.setToolTip('This is my application.');
|
+ tray.setToolTip('This is my application.');
|
||||||
+ tray.setContextMenu(contextMenu);
|
+ tray.setContextMenu(contextMenu);
|
||||||
@ -24,7 +24,6 @@ index e69de29..c8b9f0d 100644
|
|||||||
+exports.createTray = createTray;
|
+exports.createTray = createTray;
|
||||||
|
|
||||||
diff --git a/main/index.js b/main/index.js
|
diff --git a/main/index.js b/main/index.js
|
||||||
index 28710d3..a4b3f87 100644
|
|
||||||
--- a/main/index.js
|
--- a/main/index.js
|
||||||
+++ b/main/index.js
|
+++ b/main/index.js
|
||||||
@@ -23,6 +23,7 @@ const handleMetrikaRequests_js_1 = require("./lib/handlers/handleMetrikaRequests
|
@@ -23,6 +23,7 @@ const handleMetrikaRequests_js_1 = require("./lib/handlers/handleMetrikaRequests
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
diff --git a/main/lib/createWindow.js b/main/lib/createWindow.js
|
diff --git a/main/lib/createWindow.js b/main/lib/createWindow.js
|
||||||
index 771e24c..e3794a7 100644
|
|
||||||
--- a/main/lib/createWindow.js
|
--- a/main/lib/createWindow.js
|
||||||
+++ b/main/lib/createWindow.js
|
+++ b/main/lib/createWindow.js
|
||||||
@@ -16,8 +16,6 @@ const createWindow = async () => {
|
@@ -16,8 +16,6 @@ const createWindow = async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user