@innertia-solutions/nuxt-theme-spark 0.1.124 → 0.1.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Admin/Base.vue +21 -19
- package/components/Table/Standard.vue +14 -9
- package/package.json +1 -1
|
@@ -88,26 +88,28 @@ const userInitial = computed(() =>
|
|
|
88
88
|
<slot name="user-controls" />
|
|
89
89
|
</div>
|
|
90
90
|
|
|
91
|
-
<!-- User info + logout -->
|
|
92
|
-
<
|
|
93
|
-
<div class="
|
|
94
|
-
|
|
91
|
+
<!-- User info + logout — ClientOnly evita hydration mismatch (SSR no tiene usuario) -->
|
|
92
|
+
<ClientOnly>
|
|
93
|
+
<div v-if="user" class="flex items-center gap-x-2.5 px-1">
|
|
94
|
+
<div class="size-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground text-xs font-bold shrink-0 select-none">
|
|
95
|
+
{{ userInitial }}
|
|
96
|
+
</div>
|
|
97
|
+
<div class="flex-1 min-w-0">
|
|
98
|
+
<p class="text-xs font-semibold text-foreground truncate">{{ user.name ?? user.email }}</p>
|
|
99
|
+
<p v-if="user.name && user.email" class="text-[10px] text-muted-foreground truncate">{{ user.email }}</p>
|
|
100
|
+
</div>
|
|
101
|
+
<button
|
|
102
|
+
type="button"
|
|
103
|
+
class="size-7 inline-flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted-hover transition-colors shrink-0"
|
|
104
|
+
title="Cerrar sesión"
|
|
105
|
+
@click="emit('logout')"
|
|
106
|
+
>
|
|
107
|
+
<svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
|
108
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M18 9l3 3m0 0l-3 3m3-3H9" />
|
|
109
|
+
</svg>
|
|
110
|
+
</button>
|
|
95
111
|
</div>
|
|
96
|
-
|
|
97
|
-
<p class="text-xs font-semibold text-foreground truncate">{{ user.name ?? user.email }}</p>
|
|
98
|
-
<p v-if="user.name && user.email" class="text-[10px] text-muted-foreground truncate">{{ user.email }}</p>
|
|
99
|
-
</div>
|
|
100
|
-
<button
|
|
101
|
-
type="button"
|
|
102
|
-
class="size-7 inline-flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted-hover transition-colors shrink-0"
|
|
103
|
-
title="Cerrar sesión"
|
|
104
|
-
@click="emit('logout')"
|
|
105
|
-
>
|
|
106
|
-
<svg class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
|
107
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M18 9l3 3m0 0l-3 3m3-3H9" />
|
|
108
|
-
</svg>
|
|
109
|
-
</button>
|
|
110
|
-
</div>
|
|
112
|
+
</ClientOnly>
|
|
111
113
|
|
|
112
114
|
<!-- Env / extra slot -->
|
|
113
115
|
<slot name="user-footer" />
|
|
@@ -343,8 +343,13 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
343
343
|
<!-- Preview -->
|
|
344
344
|
<div class="flex flex-col flex-1 overflow-hidden">
|
|
345
345
|
|
|
346
|
-
<!--
|
|
347
|
-
<div class="
|
|
346
|
+
<!-- Fixed header — always visible regardless of active tab -->
|
|
347
|
+
<div v-if="$slots['preview-header']" class="shrink-0 border-b border-card-line">
|
|
348
|
+
<slot name="preview-header" :row="previewRow" :close="closePreview" />
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
<!-- Scrollable content -->
|
|
352
|
+
<div class="flex-1 overflow-y-auto min-h-0">
|
|
348
353
|
<slot v-if="previewTab === 'datos'" name="preview" :row="previewRow" :close="closePreview" />
|
|
349
354
|
<Table.PreviewTimeline
|
|
350
355
|
v-else-if="previewTab === 'bitacora' && resolvedHistoryEndpoint"
|
|
@@ -358,10 +363,10 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
358
363
|
type="button"
|
|
359
364
|
@click="previewTab = 'datos'"
|
|
360
365
|
:class="[
|
|
361
|
-
'flex-1 py-2 text-xs font-semibold transition-colors border-r border-card-line',
|
|
366
|
+
'flex-1 py-2.5 text-xs font-semibold transition-colors border-r border-card-line border-t-2 -mt-px',
|
|
362
367
|
previewTab === 'datos'
|
|
363
|
-
? '
|
|
364
|
-
: 'text-muted-foreground hover:text-foreground hover:bg-muted-hover'
|
|
368
|
+
? 'border-t-card text-foreground'
|
|
369
|
+
: 'border-t-transparent text-muted-foreground hover:text-foreground hover:bg-muted-hover'
|
|
365
370
|
]"
|
|
366
371
|
>
|
|
367
372
|
Datos
|
|
@@ -371,12 +376,12 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
371
376
|
@click="resolvedHistoryEndpoint && (previewTab = 'bitacora')"
|
|
372
377
|
:disabled="!resolvedHistoryEndpoint"
|
|
373
378
|
:class="[
|
|
374
|
-
'flex-1 py-2 text-xs font-semibold transition-colors',
|
|
379
|
+
'flex-1 py-2.5 text-xs font-semibold transition-colors border-t-2 -mt-px',
|
|
375
380
|
!resolvedHistoryEndpoint
|
|
376
|
-
? 'text-muted-foreground/40 cursor-not-allowed'
|
|
381
|
+
? 'border-t-transparent text-muted-foreground/40 cursor-not-allowed'
|
|
377
382
|
: previewTab === 'bitacora'
|
|
378
|
-
? '
|
|
379
|
-
: 'text-muted-foreground hover:text-foreground hover:bg-muted-hover'
|
|
383
|
+
? 'border-t-card text-foreground'
|
|
384
|
+
: 'border-t-transparent text-muted-foreground hover:text-foreground hover:bg-muted-hover'
|
|
380
385
|
]"
|
|
381
386
|
>
|
|
382
387
|
Bitácora
|