mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 04:11:47 +00:00
Create readme.md
refactor and css fix xo --fix add inline doc fix typo
This commit is contained in:
9
menu.js
9
menu.js
@ -12,6 +12,7 @@ const pluginEnabledMenu = (win, plugin, label = "", hasSubmenu = false) => ({
|
||||
label: label || plugin,
|
||||
type: "checkbox",
|
||||
checked: config.plugins.isEnabled(plugin),
|
||||
//Submenu check used in in-app-menu
|
||||
hasSubmenu: hasSubmenu || undefined,
|
||||
click: (item) => {
|
||||
if (item.checked) {
|
||||
@ -321,13 +322,13 @@ function setProxy(item, win) {
|
||||
},
|
||||
type: 'input',
|
||||
icon: iconPath,
|
||||
customStylesheet: path.join(__dirname, "providers", "prompt", "darkPrompt.css"),
|
||||
customStylesheet: path.join(__dirname, "providers", "prompt", "dark-prompt.css"),
|
||||
};
|
||||
//TODO: custom bar on prompt need testing on macOS
|
||||
if(!is.macOS()) {
|
||||
Object.assign(options, {
|
||||
frame: false,
|
||||
customScript: path.join(__dirname, "providers", "prompt", "customTitlebar.js"),
|
||||
customScript: path.join(__dirname, "providers", "prompt", "custom-titlebar.js"),
|
||||
enableRemoteModule: true,
|
||||
height: 200,
|
||||
width: 450,
|
||||
@ -337,10 +338,10 @@ function setProxy(item, win) {
|
||||
.then((input) => {
|
||||
if (input !== null && input !== example) {
|
||||
config.set("options.proxy", input);
|
||||
item.checked = (input === "") ? false : true;
|
||||
item.checked = input !== "";
|
||||
} else { //user pressed cancel
|
||||
item.checked = !item.checked; //reset checkbox
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user