arreglados problemas de lint
All checks were successful
build-and-deploy / build (push) Successful in 54s
build-and-deploy / deploy (push) Successful in 11s

This commit is contained in:
2025-08-28 20:19:36 -06:00
parent 04b53a755c
commit 286393aa84
9 changed files with 34 additions and 101 deletions

View File

@@ -178,7 +178,7 @@ const playerColor = computed(() => colyseusService.playerColor.value);
const previewPlayer = computed(() => ({
sessionId: 'preview',
name: playerName.value || 'invitado',
role: 'P1',
role: 'P1' as const,
pavoTokens: 10,
eloteTokens: 0,
shameTokens: 0,
@@ -238,7 +238,7 @@ onMounted(async () => {
if (guardResume()) return;
const tryJoin = async (attempt = 1): Promise<void> => {
try {
const gameRoom = await colyseusService.joinGameRoom(data.roomId);
await colyseusService.joinGameRoom(data.roomId);
if (colyseusService.lobbyRoom.value) {
colyseusService.lobbyRoom.value.leave();
colyseusService.lobbyRoom.value = null;
@@ -274,7 +274,7 @@ onMounted(async () => {
const tryJoin = async (attempt = 1): Promise<void> => {
try {
// Join with shuffle flag to bypass normal restrictions
const gameRoom = await colyseusService.joinShuffledGameRoom(
await colyseusService.joinShuffledGameRoom(
data.roomId,
data.role,
data.playerName,
@@ -287,7 +287,6 @@ onMounted(async () => {
}
await router.push(`/${routeUuid.value}/demo`);
} catch (error: any) {
const msg = String(error?.message || error);
if (attempt < 3) {
setTimeout(() => tryJoin(attempt + 1), 500);
return;
@@ -384,8 +383,8 @@ async function handleQuickPlay() {
isJoining.value = true;
console.log('Starting quickPlay...');
try {
const gameRoom = await colyseusService.quickPlay();
console.log('Game room joined. Full room object:', gameRoom);
const _gameRoom = await colyseusService.quickPlay();
console.log('Game room joined. Full room object:', _gameRoom);
// Leave the lobby room before navigating
if (colyseusService.lobbyRoom.value) {
@@ -403,23 +402,7 @@ async function handleQuickPlay() {
}
}
async function joinRoom(roomId: string) {
if (!colyseusService.nameConfirmed.value) return;
isJoining.value = true;
try {
// For direct room joining, we can use joinGameRoom directly
const gameRoom = await colyseusService.joinGameRoom(roomId);
// Leave the lobby room before navigating
if (colyseusService.lobbyRoom.value) {
colyseusService.lobbyRoom.value.leave();
colyseusService.lobbyRoom.value = null;
}
router.push(`/${routeUuid.value}/demo`);
} catch (error) {
console.error('Failed to join room:', error);
isJoining.value = false;
}
}
// QR Code functions
async function generateQRCode() {