@@ -6,7 +6,6 @@ const is = require("electron-is");
6
6
7
7
const { getAllPlugins } = require ( "./plugins/utils" ) ;
8
8
const config = require ( "./config" ) ;
9
- const prompt = require ( './providers/prompt' ) ;
10
9
11
10
const pluginEnabledMenu = ( win , plugin , label = "" , hasSubmenu = false ) => ( {
12
11
label : label || plugin ,
@@ -309,39 +308,3 @@ module.exports.setApplicationMenu = (win) => {
309
308
const menu = Menu . buildFromTemplate ( menuTemplate ) ;
310
309
Menu . setApplicationMenu ( menu ) ;
311
310
} ;
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
- }
0 commit comments