1. Server stats: now shows player count, latency (rounded), uptime hours
2. Rares/Kills counters: fixed API response fields (all_time/total)
3. Chat send: wired socket.send with v1 envelope { player_name, command }
4. Stats button: opens Grafana iframe grid (4 panels, time range selector)
5. Char button: opens character window with attributes/skills/vitals from
/character-stats/{name} API, structured display with sections
6. Inventory button: full inventory window with equipment table (material,
set, imbue, AL, dmg, work, tink) + pack contents pill grid + filter
7. Radar button: opens radar window, sends start/stop commands via socket
8. Sidebar links: added Inventory Search, Suitbuilder, Player Debug
9. Color palette: expanded from 30 to 60 distinct colors matching v1
10. Window types properly routed: stats- prefix → Grafana, char- → character
data, inv- → inventory, radar- → radar with socket commands
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
953 B
TypeScript
21 lines
953 B
TypeScript
import { apiFetch } from './client';
|
|
import type { TelemetrySnapshot, CombatStatsMessage, ServerHealth } from '../types';
|
|
|
|
interface LiveResponse {
|
|
players: TelemetrySnapshot[];
|
|
}
|
|
|
|
interface CombatStatsResponse {
|
|
stats: CombatStatsMessage[];
|
|
}
|
|
|
|
// v1 response shapes: /total-rares → { all_time, today }, /total-kills → { total }
|
|
interface RaresResponse { all_time: number; today: number; }
|
|
interface KillsResponse { total: number; }
|
|
|
|
export const getLive = () => apiFetch<LiveResponse>('/live');
|
|
export const getCombatStats = () => apiFetch<CombatStatsResponse>('/combat-stats');
|
|
export const getServerHealth = () => apiFetch<ServerHealth>('/server-health');
|
|
export const getTotalRares = () => apiFetch<RaresResponse>('/total-rares');
|
|
export const getTotalKills = () => apiFetch<KillsResponse>('/total-kills');
|
|
export const getCharacterStats = (name: string) => apiFetch<Record<string, unknown>>(`/character-stats/${encodeURIComponent(name)}`);
|