mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
alert on initial hide-menu enabled
This commit is contained in:
8
index.js
8
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
|
// Optimized for Mac OS X
|
||||||
if (is.macOS() && !config.get("options.appVisible")) {
|
if (is.macOS() && !config.get("options.appVisible")) {
|
||||||
app.dock.hide();
|
app.dock.hide();
|
||||||
|
|||||||
7
menu.js
7
menu.js
@ -1,7 +1,7 @@
|
|||||||
const { existsSync } = require("fs");
|
const { existsSync } = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const { app, Menu } = require("electron");
|
const { app, Menu, dialog } = require("electron");
|
||||||
const is = require("electron-is");
|
const is = require("electron-is");
|
||||||
|
|
||||||
const { getAllPlugins } = require("./plugins/utils");
|
const { getAllPlugins } = require("./plugins/utils");
|
||||||
@ -95,6 +95,11 @@ const mainMenuTemplate = (win) => {
|
|||||||
checked: config.get("options.hideMenu"),
|
checked: config.get("options.hideMenu"),
|
||||||
click: (item) => {
|
click: (item) => {
|
||||||
config.set("options.hideMenu", item.checked);
|
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)"});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user