Create readme.md

refactor and css fix

xo --fix

add inline doc

fix typo
This commit is contained in:
Araxeus
2021-04-06 21:57:16 +03:00
parent 6d44a579a4
commit 980ffb45e9
11 changed files with 306 additions and 183 deletions

View File

@ -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);
}
}