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) => { ...getAllPlugins().map((plugin) => {
const pluginPath = path.join(__dirname, "plugins", plugin, "menu.js") const pluginPath = path.join(__dirname, "plugins", plugin, "menu.js")
if (existsSync(pluginPath)) { if (existsSync(pluginPath)) {
let pluginLabel = plugin;
if (pluginLabel === "crossfade") {
pluginLabel = "crossfade [beta]";
}
if (!config.plugins.isEnabled(plugin)) { if (!config.plugins.isEnabled(plugin)) {
return pluginEnabledMenu(plugin, "", true, refreshMenu); return pluginEnabledMenu(plugin, pluginLabel, true, refreshMenu);
} }
const getPluginMenu = require(pluginPath); const getPluginMenu = require(pluginPath);
return { return {
label: plugin, label: pluginLabel,
submenu: [ submenu: [
pluginEnabledMenu(plugin, "Enabled", true, refreshMenu), pluginEnabledMenu(plugin, "Enabled", true, refreshMenu),
{ type: "separator" }, { type: "separator" },
@ -58,13 +62,7 @@ const mainMenuTemplate = (win) => {
], ],
}; };
} }
return pluginEnabledMenu(plugin);
let pluginLabel = plugin;
if (pluginLabel === "crossfade") {
pluginLabel = "crossfade [beta]";
}
return pluginEnabledMenu(plugin, pluginLabel);
}), }),
], ],
}, },