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); }), ], }, diff --git a/yarn.lock b/yarn.lock index c1f89b38..c1a4d2ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3144,6 +3144,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.4.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 853f8ebd5b425d350bffa97dd6958143179a5938352ccae092c62d1267c4e392a039be1bae7d51b6e4ffad25f51f9617531fedf5237f15df302ccfb452cbf2d7 + languageName: node + linkType: hard + "env-editor@npm:^1.0.0": version: 1.1.0 resolution: "env-editor@npm:1.1.0" @@ -4626,6 +4633,18 @@ __metadata: languageName: node linkType: hard +"htmlparser2@npm:^8.0.2": + version: 8.0.2 + resolution: "htmlparser2@npm:8.0.2" + dependencies: + domelementtype: ^2.3.0 + domhandler: ^5.0.3 + domutils: ^3.0.1 + entities: ^4.4.0 + checksum: 29167a0f9282f181da8a6d0311b76820c8a59bc9e3c87009e21968264c2987d2723d6fde5a964d4b7b6cba663fca96ffb373c06d8223a85f52a6089ced942700 + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1"