mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 11:01:45 +00:00
feat: refactor plugin utils (#1391)
This commit is contained in:
16
src/plugins/utils/main/plugin.ts
Normal file
16
src/plugins/utils/main/plugin.ts
Normal 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;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user