mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 11:51:47 +00:00
move prompt to provide
This commit is contained in:
19
menu.js
19
menu.js
@ -6,7 +6,7 @@ const is = require("electron-is");
|
|||||||
|
|
||||||
const { getAllPlugins } = require("./plugins/utils");
|
const { getAllPlugins } = require("./plugins/utils");
|
||||||
const config = require("./config");
|
const config = require("./config");
|
||||||
const prompt = require('./prompt');
|
const prompt = require('./providers/prompt');
|
||||||
|
|
||||||
const pluginEnabledMenu = (win, plugin, label = "", hasSubmenu = false) => ({
|
const pluginEnabledMenu = (win, plugin, label = "", hasSubmenu = false) => ({
|
||||||
label: label || plugin,
|
label: label || plugin,
|
||||||
@ -321,13 +321,18 @@ function setProxy(item, win) {
|
|||||||
},
|
},
|
||||||
type: 'input',
|
type: 'input',
|
||||||
icon: iconPath,
|
icon: iconPath,
|
||||||
customStylesheet: path.join(__dirname, "prompt", "darkPrompt.css"),
|
customStylesheet: path.join(__dirname, "providers", "prompt", "darkPrompt.css"),
|
||||||
frame: false,
|
|
||||||
customScript: path.join(__dirname, "prompt", "customTitlebar.js"),
|
|
||||||
enableRemoteModule: true,
|
|
||||||
height: 200,
|
|
||||||
width: 450,
|
|
||||||
};
|
};
|
||||||
|
//TODO: custom bar on prompt need testing on macOS
|
||||||
|
if(!is.macOS()) {
|
||||||
|
Object.assign(options, {
|
||||||
|
frame: false,
|
||||||
|
customScript: path.join(__dirname, "providers", "prompt", "customTitlebar.js"),
|
||||||
|
enableRemoteModule: true,
|
||||||
|
height: 200,
|
||||||
|
width: 450,
|
||||||
|
});
|
||||||
|
}
|
||||||
prompt(options, win)
|
prompt(options, win)
|
||||||
.then((input) => {
|
.then((input) => {
|
||||||
if (input !== null && input !== example) {
|
if (input !== null && input !== example) {
|
||||||
|
|||||||
Reference in New Issue
Block a user