Fix: Corregir configuración del modal de resultados
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 50s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 50s
- Cambiar v-model a v-model:open según @nuxt/ui v4.0.0 - Eliminar UCard interno que causaba renderizado permanente - Usar slots nativos del Modal (#header) en lugar de Card - Simplificar estilos usando clases de Tailwind estándar - El modal ahora se mostrará solo cuando showResults sea true
This commit is contained in:
@@ -32,11 +32,10 @@
|
||||
/>
|
||||
|
||||
<!-- Results Modal -->
|
||||
<UModal v-model="showResults">
|
||||
<UCard class="brand-card border border-transparent">
|
||||
<UModal v-model:open="showResults">
|
||||
<template #header>
|
||||
<div class="flex justify-between items-center">
|
||||
<h3 class="text-lg font-semibold brand-section-title">Resultados: {{ selectedCardForResults?.name }}</h3>
|
||||
<h3 class="text-lg font-semibold">Resultados: {{ selectedCardForResults?.name }}</h3>
|
||||
<UButton
|
||||
color="gray"
|
||||
variant="ghost"
|
||||
@@ -46,18 +45,18 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div v-if="currentResult" class="space-y-3">
|
||||
<div class="flex flex-wrap gap-4 text-sm text-[var(--brand-text)]">
|
||||
<div v-if="currentResult" class="space-y-3 p-4">
|
||||
<div class="flex flex-wrap gap-4 text-sm">
|
||||
<div>
|
||||
<span class="font-medium text-[var(--brand-text-muted)]">Filas:</span>
|
||||
<span class="font-medium text-gray-500 dark:text-gray-400">Filas:</span>
|
||||
<span class="ml-2">{{ currentResult.data?.rows?.length || 0 }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-[var(--brand-text-muted)]">Tiempo:</span>
|
||||
<span class="font-medium text-gray-500 dark:text-gray-400">Tiempo:</span>
|
||||
<span class="ml-2">{{ currentResult.running_time || 0 }}ms</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="font-medium text-[var(--brand-text-muted)]">Estado:</span>
|
||||
<span class="font-medium text-gray-500 dark:text-gray-400">Estado:</span>
|
||||
<UBadge :color="currentResult.status === 'completed' ? 'green' : 'yellow'">
|
||||
{{ currentResult.status }}
|
||||
</UBadge>
|
||||
@@ -65,19 +64,19 @@
|
||||
</div>
|
||||
|
||||
<!-- Empty State -->
|
||||
<div v-if="!currentResult.data?.rows || currentResult.data.rows.length === 0" class="p-8 text-center rounded-lg border border-[var(--brand-border)] bg-[var(--brand-surface)]">
|
||||
<div class="mx-auto w-16 h-16 mb-4 flex items-center justify-center bg-[#3a2a16] rounded-full">
|
||||
<svg class="w-8 h-8 text-[var(--brand-text-muted)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<div v-if="!currentResult.data?.rows || currentResult.data.rows.length === 0" class="p-8 text-center rounded-lg border dark:border-gray-700 bg-gray-50 dark:bg-gray-800">
|
||||
<div class="mx-auto w-16 h-16 mb-4 flex items-center justify-center bg-gray-200 dark:bg-gray-700 rounded-full">
|
||||
<svg class="w-8 h-8 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-sm font-medium text-[var(--brand-text)] mb-1">No hay datos</h3>
|
||||
<p class="text-xs text-[var(--brand-text-muted)]">La consulta se ejecutó correctamente pero no devolvió resultados.</p>
|
||||
<h3 class="text-sm font-medium mb-1">No hay datos</h3>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">La consulta se ejecutó correctamente pero no devolvió resultados.</p>
|
||||
</div>
|
||||
|
||||
<!-- Data Display -->
|
||||
<div v-else class="overflow-x-auto max-h-96">
|
||||
<pre class="p-3 rounded-lg border border-[var(--brand-border)] bg-[var(--brand-surface)] text-xs whitespace-pre-wrap break-words text-[var(--brand-text)]">{{ JSON.stringify(currentResult.data, null, 2) }}</pre>
|
||||
<pre class="p-3 rounded-lg border dark:border-gray-700 bg-gray-50 dark:bg-gray-800 text-xs whitespace-pre-wrap break-words">{{ JSON.stringify(currentResult.data, null, 2) }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,9 +85,8 @@
|
||||
color="red"
|
||||
variant="soft"
|
||||
:title="currentError"
|
||||
class="mt-3"
|
||||
class="m-4"
|
||||
/>
|
||||
</UCard>
|
||||
</UModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user