todo preparado como pwa con branding correcto

This commit is contained in:
2025-08-28 13:25:35 -06:00
parent 0df0157419
commit 1c50aa725f
17 changed files with 60 additions and 4 deletions

View File

@@ -2,9 +2,15 @@
<html lang="es"> <html lang="es">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" type="image/png" href="/favicon.png?v=2"> <link rel="icon" type="image/png" href="/favicon.png?v=3">
<link rel="apple-touch-icon" href="/SnatchGame.png?v=2"> <link rel="apple-touch-icon" sizes="180x180" href="/pwa_icons/icon-180x180.png">
<link rel="apple-touch-icon" sizes="167x167" href="/pwa_icons/icon-167x167.png">
<link rel="apple-touch-icon" sizes="152x152" href="/pwa_icons/icon-152x152.png">
<link rel="manifest" href="/manifest.webmanifest">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#111111">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="description" content="SnatchGame - Arena de intercambio social. Juego competitivo de estrategia y negociación."> <meta name="description" content="SnatchGame - Arena de intercambio social. Juego competitivo de estrategia y negociación.">
<meta name="keywords" content="juego, estrategia, competitivo, intercambio, social, tokens"> <meta name="keywords" content="juego, estrategia, competitivo, intercambio, social, tokens">
<meta name="author" content="SnatchGame"> <meta name="author" content="SnatchGame">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

View File

@@ -0,0 +1,26 @@
{
"name": "SnatchGame",
"short_name": "SnatchGame",
"description": "Arena de intercambio social. Juego competitivo de estrategia y negociación.",
"id": "/",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#111111",
"theme_color": "#111111",
"icons": [
{ "src": "/pwa_icons/icon-192x192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-256x256.png", "sizes": "256x256", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-384x384.png", "sizes": "384x384", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-512x512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-144x144.png", "sizes": "144x144", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-128x128.png", "sizes": "128x128", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-96x96.png", "sizes": "96x96", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-72x72.png", "sizes": "72x72", "type": "image/png", "purpose": "any" },
{ "src": "/pwa_icons/icon-48x48.png", "sizes": "48x48", "type": "image/png", "purpose": "any" }
],
"screenshots": [
{ "src": "/SnatchGame.png", "sizes": "992x1056", "type": "image/png", "form_factor": "wide", "label": "Juego - Escritorio" },
{ "src": "/SnatchGame.png", "sizes": "992x1056", "type": "image/png", "label": "Juego - General" }
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

15
client/public/sw.js Normal file
View File

@@ -0,0 +1,15 @@
// Minimal service worker to enable PWA installability
self.addEventListener("install", () => {
// Activate immediately on install
self.skipWaiting();
});
self.addEventListener("activate", (event) => {
event.waitUntil(self.clients.claim());
});
// Provide a basic fetch handler (required by some browsers for installability)
self.addEventListener("fetch", (event) => {
event.respondWith(fetch(event.request));
});

View File

@@ -7,3 +7,12 @@ const app = createApp(App);
app.use(router); app.use(router);
app.mount('#app'); app.mount('#app');
// Registrar Service Worker en producción para PWA
if ('serviceWorker' in navigator && import.meta.env.PROD) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').catch(() => {
// no-op: registro del SW falló
});
});
}