colores asignados al azar y simulador de jugadores en el dashboard

This commit is contained in:
2025-08-15 19:09:49 -06:00
parent 310fb3455a
commit 5e42eb7d54
5 changed files with 131 additions and 11 deletions

View File

@@ -331,6 +331,17 @@ class ColyseusService {
return room;
}
async fetchAllowedUuids(): Promise<string[]> {
try {
const res = await fetch(`${this.apiBase}/admin/uuids`);
const data = await res.json();
return Array.isArray(data?.uuids) ? data.uuids : [];
} catch (e) {
console.error('Failed to fetch allowed UUIDs', e);
return [];
}
}
private getUuidFromPath(): string {
if (typeof window === 'undefined') return '';
const path = window.location.pathname.replace(/^\/+/, '');