From 955584275b0444b5a271ee9fda37287f9235bba3 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Mon, 24 Nov 2025 18:27:29 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20Corregir=20configuraci=C3=B3n=20de=20est?= =?UTF-8?q?ilos=20y=20componentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Agregar imports de Tailwind CSS v4 y Nuxt UI en main.css - Renombrar QueueActions.vue -> Actions.vue y QueueItem.vue -> Item.vue para evitar conflictos de nombres de componentes - Crear composable useMediaQuery para manejo de responsive - Corregir referencias a componentes en index.vue y PrintQueue.vue - Actualizar imports de servidor a rutas relativas - Instalar @iconify-json/heroicons y @iconify-json/lucide - Actualizar Jimp a sintaxis v1.x --- app/assets/css/main.css | 16 ++++++++-- .../queue/{QueueActions.vue => Actions.vue} | 0 .../queue/{QueueItem.vue => Item.vue} | 0 app/components/queue/PrintQueue.vue | 2 +- app/composables/useMediaQuery.ts | 20 +++++++++++++ app/pages/index.vue | 4 +-- package-lock.json | 24 +++++++++++++++ package.json | 4 +++ server/api/print/cut.post.ts | 4 +-- server/api/print/image.post.ts | 30 +++++++++---------- server/api/print/index.post.ts | 4 +-- server/api/print/pulse.post.ts | 4 +-- server/api/print/text.post.ts | 4 +-- 13 files changed, 87 insertions(+), 29 deletions(-) rename app/components/queue/{QueueActions.vue => Actions.vue} (100%) rename app/components/queue/{QueueItem.vue => Item.vue} (100%) create mode 100644 app/composables/useMediaQuery.ts diff --git a/app/assets/css/main.css b/app/assets/css/main.css index d79433e..2ee3f42 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -1,3 +1,6 @@ +@import "tailwindcss"; +@import "@nuxt/ui"; + /* Safe area para PWA en iOS */ .safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); @@ -19,11 +22,20 @@ } ::-webkit-scrollbar-thumb { - @apply bg-gray-300 dark:bg-gray-700 rounded-full; + background: rgb(209 213 219); /* gray-300 */ + border-radius: 9999px; } ::-webkit-scrollbar-thumb:hover { - @apply bg-gray-400 dark:bg-gray-600; + background: rgb(156 163 175); /* gray-400 */ +} + +.dark ::-webkit-scrollbar-thumb { + background: rgb(55 65 81); /* gray-700 */ +} + +.dark ::-webkit-scrollbar-thumb:hover { + background: rgb(75 85 99); /* gray-600 */ } /* Reset básico */ diff --git a/app/components/queue/QueueActions.vue b/app/components/queue/Actions.vue similarity index 100% rename from app/components/queue/QueueActions.vue rename to app/components/queue/Actions.vue diff --git a/app/components/queue/QueueItem.vue b/app/components/queue/Item.vue similarity index 100% rename from app/components/queue/QueueItem.vue rename to app/components/queue/Item.vue diff --git a/app/components/queue/PrintQueue.vue b/app/components/queue/PrintQueue.vue index 216123e..6e64939 100644 --- a/app/components/queue/PrintQueue.vue +++ b/app/components/queue/PrintQueue.vue @@ -15,7 +15,7 @@ const queue = usePrintQueue() - { + matches.value = e.matches + } + + mediaQuery.addEventListener('change', handler) + + onUnmounted(() => { + mediaQuery.removeEventListener('change', handler) + }) + } + + return matches +} diff --git a/app/pages/index.vue b/app/pages/index.vue index 32a8f0a..acb6181 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -28,7 +28,7 @@ const queue = usePrintQueue()
- +
@@ -44,7 +44,7 @@ const queue = usePrintQueue()