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 }) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mosswart Overlord v2</title>
|
||||
<link rel="icon" type="image/png" href="/icons/7735.png" />
|
||||
<script type="module" crossorigin src="/v2/assets/index-Nz88Zp1N.js"></script>
|
||||
<script type="module" crossorigin src="/v2/assets/index-DUtm0DVs.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/v2/assets/index-Ba_QIbRB.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue