Enhance admin dashboard: add new player count, active sessions, and online player details; improve stats display and layout

This commit is contained in:
Alexa
2026-06-02 02:33:31 +03:00
parent 5dbcf50d37
commit 27c560906f
4 changed files with 378 additions and 81 deletions
+45 -1
View File
@@ -170,12 +170,56 @@ export interface Report {
}
export interface Stats {
players: { total: number; onlineNow: number; bannedNow: number };
players: {
total: number;
onlineNow: number;
bannedNow: number;
newToday: number;
online: Array<{
id: number;
username: string;
displayName: string;
level: number;
profileImageName: string | null;
isAdmin: boolean;
isDeveloper: boolean;
isCommunityTeam: boolean;
isJunior: boolean;
isVerified: boolean;
bannedUntil: string | null;
lastSeenAt: string;
currentRoom: null | {
roomId: number;
name: string;
subRoomId: number;
roomInstanceId: number;
photonRoomId: string;
photonRegionId: string;
isPrivate: boolean;
maxCapacity: number;
};
}>;
};
rooms: {
total: number;
totalVisits: number;
totalCheers: number;
activeSessionCount: number;
inGamePlayerCount: number;
topByVisits: Array<{ id: number; name: string; visitCount: number; visitorCount: number; cheerCount: number }>;
activeSessions: Array<{
id: number;
roomId: string;
activityLevelId: string;
region: string;
photonRoomName: string;
playerCount: number;
maxCapacity: number;
createdAt: string;
}>;
};
inventions: number;
photos: { today: number };
moderation: { openReports: number; activeIpBans: number };
recentJoins: Array<{ id: number; username: string; createdAt: string }>;
serverTime: string;