feat: refactor plugin utils (#1391)

This commit is contained in:
JellyBrick
2023-11-09 11:06:06 +09:00
committed by GitHub
parent 269352af97
commit 47cccbce7c
31 changed files with 68 additions and 65 deletions

View File

@ -0,0 +1,16 @@
import is from 'electron-is';
import defaultConfig from '../../../config/defaults';
export const getAvailablePluginNames = () => {
return Object.keys(defaultConfig.plugins).filter((name) => {
if (is.windows() && name === 'touchbar') {
return false;
} else if (is.macOS() && name === 'taskbar-mediacontrol') {
return false;
} else if (is.linux() && (name === 'taskbar-mediacontrol' || name === 'touchbar')) {
return false;
}
return true;
});
};