mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: added status widget
This commit is contained in:
parent
189dd05445
commit
58882ad5ca
@ -139,6 +139,16 @@ export const BotBadgeType = (data: Bot) => {
|
||||
votes: {
|
||||
label: '하트',
|
||||
status: `${formatNumber(data.votes)}`
|
||||
},
|
||||
status: {
|
||||
label: '상태',
|
||||
status: Status[data.status]?.text || '알 수 없음',
|
||||
color: {
|
||||
online: '34d399',
|
||||
idle: 'fcd34d',
|
||||
dnd: 'ef4444',
|
||||
streaming: '8b5cf6'
|
||||
}[data.status] || '6b7280'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ type ImageSize = '128' | '256' | '512'
|
||||
export const WidgetOptionsSchema: Yup.SchemaOf<WidgetOptions> = Yup.object({
|
||||
id: Yup.string().required(),
|
||||
ext: Yup.mixed<widgetExt>().oneOf(['svg']).required(),
|
||||
type: Yup.mixed<widgetType>().oneOf(['votes', 'servers']).required(),
|
||||
type: Yup.mixed<widgetType>().oneOf(['votes', 'servers', 'status']).required(),
|
||||
scale: Yup.number().positive().min(0.5).max(3).required(),
|
||||
style: Yup.mixed<'flat'|'classic'>().oneOf(['flat', 'classic']).default('flat')
|
||||
})
|
||||
@ -54,7 +54,7 @@ interface WidgetOptions {
|
||||
style: 'flat' | 'classic'
|
||||
}
|
||||
|
||||
type widgetType = 'votes' | 'servers'
|
||||
type widgetType = 'votes' | 'servers' | 'status'
|
||||
type widgetExt = 'svg'
|
||||
|
||||
export const PageCount = Yup.number().integer().positive().required()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user