From 286393aa84b97485585d761f288c42393af065bb Mon Sep 17 00:00:00 2001 From: josedario87 Date: Thu, 28 Aug 2025 20:19:36 -0600 Subject: [PATCH] arreglados problemas de lint --- client/package-lock.json | 11 ++++ client/package.json | 1 + client/src/components/DashboardActions.vue | 10 ++-- .../src/components/SystemMessageDisplay.vue | 2 +- client/src/views/DemoGame.vue | 5 +- client/src/views/Leaderboard.vue | 56 +------------------ client/src/views/Lobby.vue | 29 ++-------- client/src/views/games/GameEndModal.vue | 13 ----- client/src/views/games/OfferControls.vue | 8 +-- 9 files changed, 34 insertions(+), 101 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index ae277fa..36deb4c 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -18,6 +18,7 @@ "devDependencies": { "@types/lokijs": "^1.5.14", "@types/node": "^24.3.0", + "@types/qrcode": "^1.5.5", "@vitejs/plugin-vue": "latest", "@vue/tsconfig": "latest", "typescript": "latest", @@ -936,6 +937,16 @@ "undici-types": "~7.10.0" } }, + "node_modules/@types/qrcode": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.5.tgz", + "integrity": "sha512-CdfBi/e3Qk+3Z/fXYShipBT13OJ2fDO2Q2w5CIP5anLTLIndQG9z6P1cnm+8zCWSpm5dnxMFd/uREtb0EXuQzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@vitejs/plugin-vue": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.1.tgz", diff --git a/client/package.json b/client/package.json index cf7aa64..64f6404 100644 --- a/client/package.json +++ b/client/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@types/lokijs": "^1.5.14", "@types/node": "^24.3.0", + "@types/qrcode": "^1.5.5", "@vitejs/plugin-vue": "latest", "@vue/tsconfig": "latest", "typescript": "latest", diff --git a/client/src/components/DashboardActions.vue b/client/src/components/DashboardActions.vue index 5273ddd..1a5c0d9 100644 --- a/client/src/components/DashboardActions.vue +++ b/client/src/components/DashboardActions.vue @@ -127,13 +127,13 @@ async function buildCsvByUuid(): Promise { } catch { history = []; } - historyCache.set(uuid, history); + historyCache.set(uuid, (history as any)); } // Build events_made generically: // - If kind starts with p1_ or p2_, include only when event.role matches P1/P2 // - Otherwise include by default (system/agnostic events) - const events = (history || []).filter((h: any) => { + const events = (history ?? []).filter((h: any) => { const kind = (h?.kind || '').toString(); if (!kind) return false; const evRole = kind.startsWith('p1_') ? 'P1' : (kind.startsWith('p2_') ? 'P2' : null); @@ -253,13 +253,13 @@ async function handleFileUpload(event: Event) { : `Estado cargado exitosamente. ${result.message || 'NameManager actualizado.'}`; alert(message); - } catch (error) { + } catch (error: any) { console.error('Error uploading nameManager state:', error); // Handle different error types - if (error.message && error.message.includes('413')) { + if (error?.message && error.message.includes('413')) { alert('Error: El archivo es demasiado grande (máximo 50MB). Considera crear un archivo de guardado más pequeño.'); - } else if (error.message && error.message.includes('400')) { + } else if (error?.message && error.message.includes('400')) { alert('Error: Archivo inválido. Asegúrate de subir un archivo .snatchSave válido.'); } else { alert('Error al cargar el estado del nameManager. Verifica que el archivo sea válido y la conexión sea estable.'); diff --git a/client/src/components/SystemMessageDisplay.vue b/client/src/components/SystemMessageDisplay.vue index 60270c7..10d242e 100644 --- a/client/src/components/SystemMessageDisplay.vue +++ b/client/src/components/SystemMessageDisplay.vue @@ -15,7 +15,7 @@