Files
Nikolay Tatarinov 7bdaa6bfcc Enhance API and frontend components for character management and map visibility
- Updated API documentation to include `ownedByMe` field in character responses, indicating if a character was last updated by the current user's tokens.
- Modified MapView component to track and display the live status based on user-owned characters.
- Enhanced map data handling to exclude hidden maps for non-admin users and improved character icon representation on the map.
- Refactored character data structures to support new properties and ensure accurate rendering in the frontend.
2026-03-01 17:21:15 +03:00

53 lines
1023 B
TypeScript

export interface MeResponse {
username: string
auths: string[]
email?: string
tokens?: string[]
prefix?: string
}
export interface MapInfoAdmin {
ID: number
Name: string
Hidden: boolean
Priority: boolean
}
export interface SettingsResponse {
prefix: string
defaultHide: boolean
title: string
}
export interface ConfigResponse {
title?: string
auths?: string[]
}
export interface MapInfo {
ID: number
Name: string
size?: number
/** Present when returned by API (e.g. for admins); client should exclude Hidden maps from selectors. */
Hidden?: boolean
}
export interface Character {
name: string
id: number
map: number
position: { x: number; y: number }
type: string
/** True when this character was last updated by one of the current user's tokens. */
ownedByMe?: boolean
}
export interface Marker {
name: string
id: number
map: number
position: { x: number; y: number }
image: string
hidden: boolean
}