refactor(ui): Rediseño completo de UI con Nuxt UI 4
- Nuevo layout responsivo mobile-first con tabs inferiores - Sidebar colapsable en desktop con cola de impresión - Sistema de templates reutilizables con localStorage - Soporte Dark/Light mode con UColorModeButton - Composables usePrintQueue y useTemplates para estado global - Componentes modulares: CommandBuilder, QuickActions, PrintQueue, QueueItem - Navegación por tabs: Constructor | Cola | Templates
This commit is contained in:
60
app/pages/index.vue
Normal file
60
app/pages/index.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<script setup lang="ts">
|
||||
const activeTab = ref('constructor')
|
||||
const isDesktop = useMediaQuery('(min-width: 768px)')
|
||||
const queue = usePrintQueue()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen bg-gray-50 dark:bg-gray-900">
|
||||
<!-- Header -->
|
||||
<LayoutAppHeader />
|
||||
|
||||
<!-- Layout principal -->
|
||||
<div class="flex h-[calc(100vh-73px)]">
|
||||
<!-- Sidebar solo en desktop -->
|
||||
<aside
|
||||
v-if="isDesktop"
|
||||
class="w-80 border-r border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950 flex flex-col"
|
||||
>
|
||||
<div class="p-4 border-b border-gray-200 dark:border-gray-800">
|
||||
<h2 class="font-semibold text-gray-900 dark:text-white">Cola de Impresión</h2>
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ queue.operations.value.length }} comandos
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-y-auto p-4">
|
||||
<QueuePrintQueue />
|
||||
</div>
|
||||
|
||||
<div class="p-4 border-t border-gray-200 dark:border-gray-800">
|
||||
<QueueQueueActions />
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- Panel principal -->
|
||||
<main class="flex-1 overflow-y-auto pb-mobile-nav md:pb-0">
|
||||
<div class="max-w-3xl mx-auto p-4">
|
||||
<!-- En mobile: mostrar según tab activo -->
|
||||
<!-- En desktop: siempre mostrar constructor -->
|
||||
<template v-if="isDesktop || activeTab === 'constructor'">
|
||||
<ConstructorCommandBuilder />
|
||||
<ConstructorQuickActions class="mt-4" />
|
||||
</template>
|
||||
|
||||
<template v-else-if="activeTab === 'queue'">
|
||||
<QueuePrintQueue />
|
||||
<QueueQueueActions class="mt-4" />
|
||||
</template>
|
||||
|
||||
<template v-else-if="activeTab === 'templates'">
|
||||
<TemplatesTemplateList />
|
||||
</template>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- Navegación mobile -->
|
||||
<LayoutMobileNavigation v-model="activeTab" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user