fix(v2): recognize Hunt/Default VTank states + show unknown states
vt_state values from plugins include "Hunt", "combat", "Default", "turn_in_quests" etc. Previously only "combat" showed as green badge, everything else was "Idle". Now Hunt shows green, unknown states show their actual name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e58c05c895
commit
69ead07051
3 changed files with 13 additions and 11 deletions
|
|
@ -8,9 +8,11 @@ interface Props {
|
|||
|
||||
const vtankBadge = (state: string) => {
|
||||
const s = (state || 'idle').toLowerCase();
|
||||
if (s === 'combat') return { label: 'Combat', cls: 'badge-combat' };
|
||||
if (s === 'combat' || s === 'hunt') return { label: s === 'combat' ? 'Combat' : 'Hunt', cls: 'badge-combat' };
|
||||
if (s === 'nav' || s === 'navigation') return { label: 'Nav', cls: 'badge-nav' };
|
||||
return { label: 'Idle', cls: 'badge-idle' };
|
||||
if (s === 'default' || s === 'idle' || s === '') return { label: 'Idle', cls: 'badge-idle' };
|
||||
// Show the actual state name for anything else (e.g. turn_in_quests)
|
||||
return { label: state, cls: 'badge-nav' };
|
||||
};
|
||||
|
||||
export const CharacterCard: React.FC<Props> = React.memo(({ character }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue