Bilibili-Evolved/src/components/built-in-components.ts
2023-02-04 22:53:11 +08:00

20 lines
636 B
TypeScript

import { ComponentMetadata } from './types'
import { component as SettingsPanel } from './settings-panel'
import { component as LaunchBar } from './launch-bar'
import { component as I18n } from './i18n'
import { component as AutoUpdate } from './auto-update'
import { component as NotifyNewVersion } from './notify-new-version'
import { component as Bisector } from './bisector'
export const getBuiltInComponents = (): ComponentMetadata[] => [
SettingsPanel,
LaunchBar,
I18n,
AutoUpdate,
NotifyNewVersion,
Bisector,
]
export const isBuiltInComponent = (name: string) =>
getBuiltInComponents().some(c => c.name === name)