mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
Merge pull request #1101 from Araxeus/fix-crossfade-beta-tag
This commit is contained in:
16
menu.js
16
menu.js
@ -45,12 +45,16 @@ const mainMenuTemplate = (win) => {
|
||||
...getAllPlugins().map((plugin) => {
|
||||
const pluginPath = path.join(__dirname, "plugins", plugin, "menu.js")
|
||||
if (existsSync(pluginPath)) {
|
||||
let pluginLabel = plugin;
|
||||
if (pluginLabel === "crossfade") {
|
||||
pluginLabel = "crossfade [beta]";
|
||||
}
|
||||
if (!config.plugins.isEnabled(plugin)) {
|
||||
return pluginEnabledMenu(plugin, "", true, refreshMenu);
|
||||
return pluginEnabledMenu(plugin, pluginLabel, true, refreshMenu);
|
||||
}
|
||||
const getPluginMenu = require(pluginPath);
|
||||
return {
|
||||
label: plugin,
|
||||
label: pluginLabel,
|
||||
submenu: [
|
||||
pluginEnabledMenu(plugin, "Enabled", true, refreshMenu),
|
||||
{ type: "separator" },
|
||||
@ -58,13 +62,7 @@ const mainMenuTemplate = (win) => {
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
let pluginLabel = plugin;
|
||||
if (pluginLabel === "crossfade") {
|
||||
pluginLabel = "crossfade [beta]";
|
||||
}
|
||||
|
||||
return pluginEnabledMenu(plugin, pluginLabel);
|
||||
return pluginEnabledMenu(plugin);
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user