From 02cb39602fdf82bf04b00c302cc065eeb0db3e78 Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:07:10 +0300 Subject: [PATCH 1/4] alert on initial hide-menu enabled --- index.js | 8 ++++++++ menu.js | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 90096ecf60..4c8b541869 100644 --- a/index.js +++ b/index.js @@ -348,6 +348,14 @@ app.on("ready", () => { }); } + if(config.get("options.hideMenu") && !config.get("options.hideMenuWarned")) { + electron.dialog.showMessageBox(mainWindow, { + type: 'info', + title: 'Hide Menu Enabled', message: "Menu is hidden, use 'Alt' to show it (or 'Escape' if using in-app-menu)" + }); + config.set("options.hideMenuWarned", true); + } + // Optimized for Mac OS X if (is.macOS() && !config.get("options.appVisible")) { app.dock.hide(); diff --git a/menu.js b/menu.js index afea532df2..fb48c31b20 100644 --- a/menu.js +++ b/menu.js @@ -1,7 +1,7 @@ const { existsSync } = require("fs"); const path = require("path"); -const { app, Menu } = require("electron"); +const { app, Menu, dialog } = require("electron"); const is = require("electron-is"); const { getAllPlugins } = require("./plugins/utils"); @@ -95,6 +95,11 @@ const mainMenuTemplate = (win) => { checked: config.get("options.hideMenu"), click: (item) => { config.set("options.hideMenu", item.checked); + if(item.checked && !config.get("options.hideMenuWarned")) { + dialog.showMessageBox(win, { + type: 'info', + title: 'Hide Menu Enabled', message: "Menu will be hidden on next launch, use 'Alt' to show it (or 'Escape' if using in-app-menu)"}); + } }, }, ] From a70364facf809f8a2a30ec718f3be82270f06a6f Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:23:10 +0300 Subject: [PATCH 2/4] lint --- index.js | 6 +++--- menu.js | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 4c8b541869..0a5b1f5561 100644 --- a/index.js +++ b/index.js @@ -348,10 +348,10 @@ app.on("ready", () => { }); } - if(config.get("options.hideMenu") && !config.get("options.hideMenuWarned")) { + if (config.get("options.hideMenu") && !config.get("options.hideMenuWarned")) { electron.dialog.showMessageBox(mainWindow, { - type: 'info', - title: 'Hide Menu Enabled', message: "Menu is hidden, use 'Alt' to show it (or 'Escape' if using in-app-menu)" + type: 'info', title: 'Hide Menu Enabled', + message: "Menu is hidden, use 'Alt' to show it (or 'Escape' if using in-app-menu)" }); config.set("options.hideMenuWarned", true); } diff --git a/menu.js b/menu.js index fb48c31b20..0a62249bc3 100644 --- a/menu.js +++ b/menu.js @@ -95,10 +95,11 @@ const mainMenuTemplate = (win) => { checked: config.get("options.hideMenu"), click: (item) => { config.set("options.hideMenu", item.checked); - if(item.checked && !config.get("options.hideMenuWarned")) { + if (item.checked && !config.get("options.hideMenuWarned")) { dialog.showMessageBox(win, { - type: 'info', - title: 'Hide Menu Enabled', message: "Menu will be hidden on next launch, use 'Alt' to show it (or 'Escape' if using in-app-menu)"}); + type: 'info', title: 'Hide Menu Enabled', + message: "Menu will be hidden on next launch, use 'Alt' to show it (or 'Escape' if using in-app-menu)" + }); } }, }, From 3d9b495863fa8b6cff958563d0e4fde809b2bf63 Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Tue, 26 Oct 2021 19:50:15 +0300 Subject: [PATCH 3/4] Update readme.md --- readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.md b/readme.md index 49f4c0e6bc..9450319ff6 100644 --- a/readme.md +++ b/readme.md @@ -42,6 +42,7 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr - **Downloader**: downloads MP3 [directly from the interface](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) [(youtube-dl)](https://github.com/ytdl-org/youtube-dl) - **Hide video player**: no video in the interface when playing music - **In-app menu**: [gives bars a fancy, dark look](https://user-images.githubusercontent.com/78568641/112215894-923dbf00-8c29-11eb-95c3-3ce15db27eca.png) + > (see [this post](https://github.com/th-ch/youtube-music/issues/410#issuecomment-952060709) if you have problem accessing the menu after enabling this plugin and hide-menu option) - [**Last.fm**](https://www.last.fm/): scrobbles support - **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser - **No Google Login**: remove Google login buttons and links from the interface @@ -55,6 +56,8 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr - **Touchbar**: custom TouchBar layout for macOS - **Auto confirm when paused** (Always Enabled): disable the ["Continue Watching?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) popup that pause music after a certain time +> If using `Hide Menu` option - you can show the menu with the `alt` key (or `escape` if using the in-app-menu plugin) + ## Dev ```sh From b45adac8475f1a01cd797f25438b581d5b0cc1fb Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Tue, 26 Oct 2021 20:03:01 +0300 Subject: [PATCH 4/4] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 9450319ff6..2467d83bc4 100644 --- a/readme.md +++ b/readme.md @@ -46,7 +46,7 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr - [**Last.fm**](https://www.last.fm/): scrobbles support - **Navigation**: next/back navigation arrows directly integrated in the interface, like in your favorite browser - **No Google Login**: remove Google login buttons and links from the interface -- **Notifications**: display a [notification](https://user-images.githubusercontent.com/78568641/114102651-63ce0e00-98d0-11eb-9dfe-c5a02bb54f9c.png) when a song starts playing +- **Notifications**: display a notification when a song starts playing ([interactive notifications](https://user-images.githubusercontent.com/78568641/114102651-63ce0e00-98d0-11eb-9dfe-c5a02bb54f9c.png) are available on windows) - **Playback speed**: listen fast, listen slow! [Adds a slider that controls song speed](https://user-images.githubusercontent.com/61631665/129976003-e55db5ba-bf42-448c-a059-26a009775e68.png) - **Precise volume**: customizable volume steps for more comfort, allows controlling the volume precisely using mousewheel - **Quality changer**: change video quality