use placeholder proxy example

This commit is contained in:
Araxeus
2021-05-13 07:08:17 +03:00
parent 002081bcb9
commit 355f61188a

View File

@ -312,21 +312,21 @@ module.exports.setApplicationMenu = (win) => {
Menu.setApplicationMenu(menu);
};
const example = "Example: 'socks5://127.0.0.1:9999'";
async function setProxy(item, win) {
const output = await prompt({
title: 'Set Proxy',
label: 'Enter Proxy Address: (leave empty to disable)',
value: config.get("options.proxy") || example,
value: config.get("options.proxy"),
type: 'input',
inputAttrs: {
type: 'url'
type: 'url',
placeholder: "Example: 'socks5://127.0.0.1:9999"
},
width: 450,
...promptOptions()
}, win);
if (output !== null && output !== example) {
if (output) {
config.set("options.proxy", output);
item.checked = output !== "";
} else { //user pressed cancel