mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { defineComponentMetadata } from '@/components/define'
|
|
import { getNumberValidator, getUID, none } from '@/core/utils'
|
|
import { autoMatchMedal } from './auto-match'
|
|
|
|
export const component = defineComponentMetadata({
|
|
name: 'badgeHelper',
|
|
displayName: '直播勋章快速更换',
|
|
description: {
|
|
'zh-CN': '在直播区中, 可从功能面板中直接切换勋章和头衔. 默认加载 256 个 (同时也是上限), 可在选项中修改.',
|
|
},
|
|
entry: () => autoMatchMedal(),
|
|
reload: none,
|
|
unload: none,
|
|
tags: [
|
|
componentsTags.live,
|
|
],
|
|
widget: {
|
|
component: () => import('./BadgeHelper.vue').then(m => m.default),
|
|
condition: () => Boolean(getUID()),
|
|
},
|
|
options: {
|
|
autoMatchMedal: {
|
|
defaultValue: true,
|
|
displayName: '自动佩戴当前直播间勋章',
|
|
},
|
|
maxBadgeCount: {
|
|
defaultValue: 256,
|
|
displayName: '最大加载数量',
|
|
validator: getNumberValidator(1, 256),
|
|
},
|
|
defaultMedalID: {
|
|
displayName: '默认勋章ID',
|
|
hidden: true,
|
|
defaultValue: 0,
|
|
},
|
|
},
|
|
urlInclude: [
|
|
'//live.bilibili.com',
|
|
],
|
|
})
|