Skip to content

Commit 8dc486f

Browse files
committed
remove local prompt
1 parent 5dc1179 commit 8dc486f

File tree

10 files changed

+0
-1304
lines changed

10 files changed

+0
-1304
lines changed

menu.js

-37
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const is = require("electron-is");
66

77
const { getAllPlugins } = require("./plugins/utils");
88
const config = require("./config");
9-
const prompt = require('./providers/prompt');
109

1110
const pluginEnabledMenu = (win, plugin, label = "", hasSubmenu = false) => ({
1211
label: label || plugin,
@@ -309,39 +308,3 @@ module.exports.setApplicationMenu = (win) => {
309308
const menu = Menu.buildFromTemplate(menuTemplate);
310309
Menu.setApplicationMenu(menu);
311310
};
312-
313-
const iconPath = path.join(__dirname, "assets", "youtube-music-tray.png");
314-
const example = `Example: "socks5://127.0.0.1:9999"`;
315-
function setProxy(item, win) {
316-
let options = {
317-
title: 'Set Proxy',
318-
label: 'Enter Proxy Address: (leave empty to disable)',
319-
value: config.get("options.proxy") || example,
320-
inputAttrs: {
321-
type: 'text'
322-
},
323-
type: 'input',
324-
icon: iconPath,
325-
customStylesheet: "dark",
326-
};
327-
//TODO: custom bar on prompt need testing on macOS
328-
if (!is.macOS()) {
329-
Object.assign(options, {
330-
frame: false,
331-
customScript: path.join(__dirname, "providers", "prompt", "custom-titlebar.js"),
332-
enableRemoteModule: true,
333-
height: 200,
334-
width: 450,
335-
});
336-
}
337-
prompt(options, win)
338-
.then(input => {
339-
if (input !== null && input !== example) {
340-
config.set("options.proxy", input);
341-
item.checked = input !== "";
342-
} else { //user pressed cancel
343-
item.checked = !item.checked; //reset checkbox
344-
}
345-
})
346-
.catch(console.error);
347-
}

providers/prompt/custom-titlebar.js

-14
This file was deleted.

providers/prompt/dark-prompt.css

-76
This file was deleted.

providers/prompt/index.js

-170
This file was deleted.

0 commit comments

Comments
 (0)