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.
This commit is contained in:
@@ -28,6 +28,8 @@ 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 {
|
||||
@@ -36,6 +38,8 @@ export interface Character {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user