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