mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix: remove PluginBaseConfig
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
|
||||
import store from './store';
|
||||
|
||||
import { restart } from '../providers/app-controls';
|
||||
import { restart } from '@/providers/app-controls';
|
||||
|
||||
import type { PluginBaseConfig } from '../plugins/utils/builder';
|
||||
import type { PluginConfig } from '@/types/plugins';
|
||||
|
||||
export function getPlugins() {
|
||||
return store.get('plugins') as Record<string, PluginBaseConfig>;
|
||||
return store.get('plugins') as Record<string, PluginConfig>;
|
||||
}
|
||||
|
||||
export function isEnabled(plugin: string) {
|
||||
const pluginConfig = (store.get('plugins') as Record<string, PluginBaseConfig>)[plugin];
|
||||
const pluginConfig = (store.get('plugins') as Record<string, PluginConfig>)[plugin];
|
||||
return pluginConfig !== undefined && pluginConfig.enabled;
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,8 @@ import {
|
||||
getAllLoadedMainPlugins,
|
||||
loadAllMainPlugins,
|
||||
} from '@/loader/main';
|
||||
import {PluginConfig, PluginDef} from "@/types/plugins";
|
||||
|
||||
import type { PluginConfig, PluginDef } from '@/types/plugins';
|
||||
|
||||
// Catch errors and log them
|
||||
unhandled({
|
||||
|
||||
Reference in New Issue
Block a user