Merge pull request #1101 from Araxeus/fix-crossfade-beta-tag

This commit is contained in:
Araxeus
2023-04-14 22:25:25 +03:00
committed by GitHub

16
menu.js
View File

@ -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);
}),
],
},