mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
disable dev tools on electron-prompt
This commit is contained in:
4
index.js
4
index.js
@ -37,7 +37,9 @@ if (config.get("options.proxy")) {
|
||||
}
|
||||
|
||||
// Adds debug features like hotkeys for triggering dev tools and reload
|
||||
require("electron-debug")();
|
||||
require("electron-debug")({
|
||||
showDevTools: false //disable dev tools on electron-prompt
|
||||
});
|
||||
|
||||
// Prevent window being garbage collected
|
||||
let mainWindow;
|
||||
|
||||
6
menu.js
6
menu.js
@ -148,7 +148,7 @@ const mainMenuTemplate = (win) => [
|
||||
type: "checkbox",
|
||||
checked: !!config.get("options.proxy"),
|
||||
click: (item) => {
|
||||
setProxy(item, win);
|
||||
setProxy(item);
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -310,7 +310,7 @@ module.exports.setApplicationMenu = (win) => {
|
||||
};
|
||||
|
||||
const iconPath = path.join(__dirname, "assets", "youtube-music-tray.png");
|
||||
function setProxy(item, win) {
|
||||
function setProxy(item) {
|
||||
prompt({
|
||||
title: 'Set Proxy',
|
||||
label: 'Enter Proxy Adress:',
|
||||
@ -325,8 +325,6 @@ function setProxy(item, win) {
|
||||
.then((input) => {
|
||||
if(input !== null) {
|
||||
config.set("options.proxy", input);
|
||||
if(input === "")
|
||||
item.checked = false;
|
||||
item.checked = (input === "") ? false : true;
|
||||
} else { //user pressed cancel
|
||||
item.checked = !item.checked; //reset checkbox
|
||||
|
||||
Reference in New Issue
Block a user