mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
use placeholder proxy example
This commit is contained in:
8
menu.js
8
menu.js
@ -312,21 +312,21 @@ module.exports.setApplicationMenu = (win) => {
|
|||||||
Menu.setApplicationMenu(menu);
|
Menu.setApplicationMenu(menu);
|
||||||
};
|
};
|
||||||
|
|
||||||
const example = "Example: 'socks5://127.0.0.1:9999'";
|
|
||||||
async function setProxy(item, win) {
|
async function setProxy(item, win) {
|
||||||
const output = await prompt({
|
const output = await prompt({
|
||||||
title: 'Set Proxy',
|
title: 'Set Proxy',
|
||||||
label: 'Enter Proxy Address: (leave empty to disable)',
|
label: 'Enter Proxy Address: (leave empty to disable)',
|
||||||
value: config.get("options.proxy") || example,
|
value: config.get("options.proxy"),
|
||||||
type: 'input',
|
type: 'input',
|
||||||
inputAttrs: {
|
inputAttrs: {
|
||||||
type: 'url'
|
type: 'url',
|
||||||
|
placeholder: "Example: 'socks5://127.0.0.1:9999"
|
||||||
},
|
},
|
||||||
width: 450,
|
width: 450,
|
||||||
...promptOptions()
|
...promptOptions()
|
||||||
}, win);
|
}, win);
|
||||||
|
|
||||||
if (output !== null && output !== example) {
|
if (output) {
|
||||||
config.set("options.proxy", output);
|
config.set("options.proxy", output);
|
||||||
item.checked = output !== "";
|
item.checked = output !== "";
|
||||||
} else { //user pressed cancel
|
} else { //user pressed cancel
|
||||||
|
|||||||
Reference in New Issue
Block a user