From 0b6b707ccd5478880e1e6c1a88e3e87f0618681a Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Wed, 5 Apr 2023 13:40:32 +0300 Subject: [PATCH] fix crossfade beta tag --- menu.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/menu.js b/menu.js index 6decc015..189623d3 100644 --- a/menu.js +++ b/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); }), ], },