mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +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
|
// 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
|
// Prevent window being garbage collected
|
||||||
let mainWindow;
|
let mainWindow;
|
||||||
|
|||||||
6
menu.js
6
menu.js
@ -148,7 +148,7 @@ const mainMenuTemplate = (win) => [
|
|||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
checked: !!config.get("options.proxy"),
|
checked: !!config.get("options.proxy"),
|
||||||
click: (item) => {
|
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");
|
const iconPath = path.join(__dirname, "assets", "youtube-music-tray.png");
|
||||||
function setProxy(item, win) {
|
function setProxy(item) {
|
||||||
prompt({
|
prompt({
|
||||||
title: 'Set Proxy',
|
title: 'Set Proxy',
|
||||||
label: 'Enter Proxy Adress:',
|
label: 'Enter Proxy Adress:',
|
||||||
@ -325,8 +325,6 @@ function setProxy(item, win) {
|
|||||||
.then((input) => {
|
.then((input) => {
|
||||||
if(input !== null) {
|
if(input !== null) {
|
||||||
config.set("options.proxy", input);
|
config.set("options.proxy", input);
|
||||||
if(input === "")
|
|
||||||
item.checked = false;
|
|
||||||
item.checked = (input === "") ? false : true;
|
item.checked = (input === "") ? false : true;
|
||||||
} else { //user pressed cancel
|
} else { //user pressed cancel
|
||||||
item.checked = !item.checked; //reset checkbox
|
item.checked = !item.checked; //reset checkbox
|
||||||
|
|||||||
Reference in New Issue
Block a user