From 25aace816f78fee091834ad8693fea5c742267d9 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Fri, 17 Oct 2025 03:26:28 -0600 Subject: [PATCH] Agregar mejoras PWA y unificar workflow a 1 job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Agregar id único (/?app=musica), launch_handler, handle_links y url_handlers - Unificar workflow de 2 jobs (build + deploy) a 1 solo job - Workaround para bug de Gitea que solo ejecuta el primer job --- .gitea/workflows/build.yml | 15 ++------------- nuxt.config.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 809b2c2..2c3b356 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -5,8 +5,8 @@ on: branches: [ main ] jobs: -#───────────────── build & push ───────────────── - build: +#───────────────── build, push & deploy (unified) ───────────────── + build-and-deploy: runs-on: docker env: REG: gitea.nucleoriofrio.com/nucleo000 @@ -25,17 +25,6 @@ jobs: docker push $REG/repodructor:${{ github.sha }} docker push $REG/repodructor:latest -#───────────────── deploy ───────────────── - deploy: - needs: build - runs-on: docker - env: - REG: gitea.nucleoriofrio.com/nucleo000 - steps: - - uses: actions/checkout@v3 - - name: Login to registry - run: docker login gitea.nucleoriofrio.com -u nucleo000 -p 7bc7b2fcd283bd6a251bef3ede368b7f897c919d - - name: Info about music directory run: | echo "ℹ️ Music directory expected at: /srv/repodructor/musica" diff --git a/nuxt.config.ts b/nuxt.config.ts index f75e31f..a736b14 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -183,6 +183,7 @@ export default defineNuxtConfig({ navigateFallback: '/' }, manifest: { + id: '/?app=musica', name: 'RepoDructor Music Player', short_name: 'RepoDructor', description: 'A beautiful glassmorphism music player for your local network', @@ -195,8 +196,17 @@ export default defineNuxtConfig({ categories: ['music', 'entertainment'], lang: 'es', dir: 'ltr', + // Control de ventanas - mantener una sola ventana + launch_handler: { + client_mode: 'navigate-existing' + }, // Capturar enlaces dentro de la app capture_links: 'existing-client-navigate', + // URL handling - nuevo estándar para manejar links a esta PWA + handle_links: 'preferred', + url_handlers: [ + { origin: 'https://musica.nucleoriofrio.com' } + ], icons: [ { src: '/logo-192.png',