Compare commits

...

9 Commits

Author SHA1 Message Date
TC
37cac19d9c Bump version to 1.3.3 2020-04-29 22:08:22 +02:00
TC
4824dda5d5 Move tray click callback in setUpTray 2020-04-27 12:25:24 +02:00
TC
3fa3c3ab9e Bump version to 1.3.2 2020-04-26 16:25:56 +02:00
TC
058371ace8 Show/hide window when clicking on tray 2020-04-26 16:25:37 +02:00
TC
430687f4d6 Hide the app (no quit) on close if tray enabled 2020-04-26 16:10:13 +02:00
TC
45f4b3bc28 Use is.macOS shortcut 2020-04-26 15:47:55 +02:00
7c12344d05 Merge pull request #22 from th-ch/snyk-upgrade-2844f3669e30ddb5a4f23b0caf25ece1
[Snyk] Upgrade electron-updater from 4.2.5 to 4.3.0
2020-04-26 14:51:47 +02:00
98213005d0 fix: upgrade electron-updater from 4.2.5 to 4.3.0
Snyk has created this PR to upgrade electron-updater from 4.2.5 to 4.3.0.

See this package in NPM:
https://www.npmjs.com/package/electron-updater

See this project in Snyk:
https://app.snyk.io/org/th-ch/project/81809c53-bb7b-46b9-a0d7-806d45d74ac6?utm_source=github&utm_medium=upgrade-pr
2020-04-24 04:19:57 +02:00
db61589735 fix: upgrade electron-updater from 4.2.5 to 4.3.0
Snyk has created this PR to upgrade electron-updater from 4.2.5 to 4.3.0.

See this package in NPM:
https://www.npmjs.com/package/electron-updater

See this project in Snyk:
https://app.snyk.io/org/th-ch/project/81809c53-bb7b-46b9-a0d7-806d45d74ac6?utm_source=github&utm_medium=upgrade-pr
2020-04-24 04:19:56 +02:00
4 changed files with 31 additions and 15 deletions

View File

@ -10,6 +10,7 @@ const {
autoUpdate,
getEnabledPlugins,
isAppVisible,
isTrayEnabled,
store,
} = require("./store");
const { fileExists, injectCSS } = require("./plugins/utils");
@ -183,16 +184,20 @@ app.on("ready", () => {
}
// Optimized for Mac OS X
if (process.platform === "darwin") {
if (is.macOS()) {
if (!isAppVisible()) {
app.dock.hide();
}
}
var forceQuit = false;
app.on("before-quit", () => {
forceQuit = true;
});
var forceQuit = false;
app.on("before-quit", () => {
forceQuit = true;
});
if (is.macOS() || isTrayEnabled()) {
mainWindow.on("close", (event) => {
// Hide the window instead of quitting (quit is available in tray options)
if (!forceQuit) {
event.preventDefault();
mainWindow.hide();

View File

@ -1,7 +1,7 @@
{
"name": "youtube-music",
"productName": "YouTube Music",
"version": "1.3.1",
"version": "1.3.3",
"description": "YouTube Music Desktop App - including custom plugins",
"license": "MIT",
"repository": "th-ch/youtube-music",
@ -52,7 +52,7 @@
"electron-is": "^3.0.0",
"electron-localshortcut": "^3.2.1",
"electron-store": "^5.1.1",
"electron-updater": "^4.2.2",
"electron-updater": "^4.3.0",
"node-fetch": "^2.6.0"
},
"devDependencies": {

View File

@ -22,6 +22,10 @@ module.exports.setUpTray = (app, win) => {
});
tray = new Tray(trayIcon);
tray.setToolTip("Youtube Music");
tray.setIgnoreDoubleClickEvents(true);
tray.on("click", () => {
win.isVisible() ? win.hide() : win.show();
});
const trayMenu = Menu.buildFromTemplate([
{

View File

@ -777,6 +777,14 @@ buffer@^4.3.0:
ieee754 "^1.1.4"
isarray "^1.0.0"
builder-util-runtime@8.6.1:
version "8.6.1"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.6.1.tgz#cf9a268fa51704de24f3c085aa8d1d1b3767d9ea"
integrity sha512-gwIUtMaICmc+e2EC3u3byXcwCyfhtG40LJRNnGfs8AYqacKl4ZLP50ab+uDttn7QAXe0LfMAuKz9v8bCODV0yg==
dependencies:
debug "^4.1.1"
sax "^1.2.4"
builder-util-runtime@8.6.2:
version "8.6.2"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.6.2.tgz#8270e15b012d8d3b110f3e327b0fd8b0e07b1686"
@ -1574,18 +1582,17 @@ electron-store@^5.1.1:
conf "^6.2.1"
type-fest "^0.7.1"
electron-updater@^4.2.2:
version "4.2.5"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.2.5.tgz#dbced8da6f8c6fc2dc662f2776131f5a49ce018d"
integrity sha512-ir8SI3capF5pN4LTQY79bP7oqiBKjgtdDW378xVId5VcGUZ+Toei2j+fgx1mq3y4Qg19z4HqLxEZ9FqMD0T0RA==
electron-updater@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.3.0.tgz#f66c253b25431d9aeb04fbd33c79062f33943d44"
integrity sha512-5K3vPgeiBGQaaCcZzQP00QYhGsh0l/q0mwzGWVZq1BHJ5akA+BpsY+EPiI9JzBhNVIdNlUvSKr5azUdbMwZeig==
dependencies:
"@types/semver" "^7.1.0"
builder-util-runtime "8.6.2"
fs-extra "^8.1.0"
builder-util-runtime "8.6.1"
fs-extra "^9.0.0"
js-yaml "^3.13.1"
lazy-val "^1.0.4"
lodash.isequal "^4.5.0"
pako "^1.0.11"
semver "^7.1.3"
electron@^8.2.1:
@ -4048,7 +4055,7 @@ package-json@^6.3.0:
registry-url "^5.0.0"
semver "^6.2.0"
pako@^1.0.11, pako@~1.0.2, pako@~1.0.5:
pako@~1.0.2, pako@~1.0.5:
version "1.0.11"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==