refactor(core): CORE-12 type template resources and verify bundled notices

This commit is contained in:
Harvey Zhao committed 2026-09-11 03:50:33 +08:00
1 parent b8039ad1f1
commit 9eb7c945ca
101 files changed
+7363 -664

No files matched your search

@@ -1,4 +1,3 @@
import { def, getIcon } from '../utils'
import airplay from './airplay.svg?raw'
import arrowLeft from './arrow-left.svg?raw'
import arrowRight from './arrow-right.svg?raw'
@@ -27,43 +26,32 @@ import unlock from './unlock.svg?raw'
import volumeClose from './volume-close.svg?raw'
import volume from './volume.svg?raw'
export default class Icons {
constructor(art) {
const icons = {
loading,
state,
play,
pause,
check,
volume,
volumeClose,
screenshot,
setting,
pip,
arrowLeft,
arrowRight,
playbackRate,
aspectRatio,
config,
lock,
flip,
unlock,
fullscreenOff,
fullscreenOn,
fullscreenWebOff,
fullscreenWebOn,
switchOn,
switchOff,
error,
close,
airplay,
...art.option.icons,
}
for (const key in icons) {
def(this, key, {
get: () => getIcon(key, icons[key]),
})
}
}
export default {
loading,
state,
play,
pause,
check,
volume,
volumeClose,
screenshot,
setting,
pip,
arrowLeft,
arrowRight,
playbackRate,
aspectRatio,
config,
lock,
flip,
unlock,
fullscreenOff,
fullscreenOn,
fullscreenWebOff,
fullscreenWebOn,
switchOn,
switchOff,
error,
close,
airplay,
}
+15
View File
@@ -0,0 +1,15 @@
import { def, getIcon } from '../utils'
import defaults from './defaults'
export default class Icons {
readonly [key: string]: HTMLElement
constructor(art: { option: { icons: Record<string, string | HTMLElement> } }) {
const icons: Record<string, string | HTMLElement | undefined> = { ...defaults, ...art.option.icons }
for (const key in icons) {
def(this, key, {
get: (): HTMLElement => getIcon(key, icons[key]),
})
}
}
}