Implementar sistema UUID para nombres únicos globales

- Agregado UUID persistente en base de datos local (LokiJS)
- Nombres únicos por UUID en lugar de sessionId
- Nombres persisten entre reconexiones mientras el servidor esté activo
- Migración automática de perfiles existentes
- Registrados handlers para evitar warnings de mensajes no encontrados
This commit is contained in:
2025-08-12 17:35:57 -06:00
parent 75b114d66d
commit b754ec043a
5 changed files with 122 additions and 55 deletions

View File

@@ -194,6 +194,15 @@ onMounted(() => {
room.onMessage("gameEnd", () => {
try { if (typeof window !== 'undefined') { window.localStorage.removeItem('snatch.game.rtoken'); } } catch {}
});
// Register additional message handlers to avoid warnings
room.onMessage("gamePaused", () => {
// Game paused, could update UI state if needed
});
room.onMessage("variantChanged", (data: { variant: string }) => {
currentVariant.value = data.variant as any;
});
}
});