feat: implement lobby functionality with user and server information retrieval

This commit is contained in:
2026-01-03 13:35:16 +00:00
parent 1988e180c5
commit 67d995c65f
14 changed files with 328 additions and 17 deletions
@@ -22,12 +22,13 @@ export type LobbyProfileStatus = {
profile: string;
scenario: string;
status: GatewayProfileStatus;
apiPort: number;
runtime: {
apiRunning: boolean;
daemonRunning: boolean;
};
map: LobbyMapSnapshot;
myGeneral: LobbyGeneralStatus;
korName: string;
color: string;
};
export interface GatewayProfileStatusService {
@@ -73,25 +74,19 @@ export class RepositoryProfileStatusService implements GatewayProfileStatusServi
row: GatewayProfileRecord,
runtimeMap: Map<string, { apiRunning: boolean; daemonRunning: boolean }>
): LobbyProfileStatus {
const meta = row.meta as Record<string, any>;
return {
profileName: row.profileName,
profile: row.profile,
scenario: row.scenario,
status: row.status,
apiPort: row.apiPort,
runtime: runtimeMap.get(row.profileName) ?? {
apiRunning: false,
daemonRunning: false,
},
map: {
updatedAt: null,
summary: null,
},
myGeneral: {
exists: false,
cityId: null,
cityName: null,
updatedAt: null,
},
korName: (meta.korName as string) ?? row.profile,
color: (meta.color as string) ?? '#ffffff',
};
}
}