Skip to content

Commit

Permalink
use placeholder proxy example
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed May 13, 2021
1 parent 002081b commit 355f611
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 355f611

Please sign in to comment.