From 4bac3ace186c5be2cb9409d2b703f960bd662145 Mon Sep 17 00:00:00 2001 From: TC Date: Fri, 27 Nov 2020 21:39:15 +0100 Subject: [PATCH 1/2] Option to hide menu (win/linux) --- index.js | 2 ++ menu.js | 13 +++++++++++++ store/index.js | 2 ++ 3 files changed, 17 insertions(+) diff --git a/index.js b/index.js index 1f45b7bc62..4935c0080b 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ const { setApplicationMenu } = require("./menu"); const { autoUpdate, getEnabledPlugins, + hideMenu, isAppVisible, isTrayEnabled, store, @@ -85,6 +86,7 @@ function createMainWindow() { }, frame: !is.macOS(), titleBarStyle: is.macOS() ? "hiddenInset" : "default", + autoHideMenuBar: hideMenu(), }); if (windowMaximized) { win.maximize(); diff --git a/menu.js b/menu.js index b495dde1cb..0af131cb83 100644 --- a/menu.js +++ b/menu.js @@ -7,6 +7,7 @@ const { enablePlugin, disablePlugin, autoUpdate, + hideMenu, isAppVisible, isTrayEnabled, setOptions, @@ -42,6 +43,18 @@ const mainMenuTemplate = (win) => [ setOptions({ autoUpdates: item.checked }); }, }, + ...(is.windows() || is.linux() + ? [ + { + label: "Hide menu", + type: "checkbox", + checked: hideMenu(), + click: (item) => { + setOptions({ hideMenu: item.checked }); + }, + }, + ] + : []), ...(is.windows() || is.macOS() ? // Only works on Win/Mac // https://www.electronjs.org/docs/api/app#appsetloginitemsettingssettings-macos-windows diff --git a/store/index.js b/store/index.js index 703b4d8343..659d5bea32 100644 --- a/store/index.js +++ b/store/index.js @@ -13,6 +13,7 @@ const store = new Store({ tray: false, appVisible: true, autoUpdates: true, + hideMenu: false, startAtLogin: false, }, }, @@ -31,5 +32,6 @@ module.exports = { isTrayEnabled: () => store.get("options.tray"), isAppVisible: () => store.get("options.appVisible"), autoUpdate: () => store.get("options.autoUpdates"), + hideMenu: () => store.get("options.hideMenu"), startAtLogin: () => store.get("options.startAtLogin"), }; From 155ef9e5f5823e5a0bd6cb78af3928006bf9059c Mon Sep 17 00:00:00 2001 From: TC Date: Fri, 27 Nov 2020 21:39:33 +0100 Subject: [PATCH 2/2] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 25641153d9..ab7e0238ad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "youtube-music", "productName": "YouTube Music", - "version": "1.6.3", + "version": "1.6.4", "description": "YouTube Music Desktop App - including custom plugins", "license": "MIT", "repository": "th-ch/youtube-music",