@innertia-solutions/nuxt-theme-spark 0.1.128 → 0.1.130
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 +20 -1
- package/package.json +1 -1
|
@@ -16,6 +16,19 @@ provide('vantage:sidebar', { isOpen, open, close })
|
|
|
16
16
|
const userInitial = computed(() =>
|
|
17
17
|
props.user?.name?.charAt(0).toUpperCase() ?? props.user?.email?.charAt(0).toUpperCase() ?? 'U'
|
|
18
18
|
)
|
|
19
|
+
|
|
20
|
+
const config = useRuntimeConfig()
|
|
21
|
+
const appEnv = config.public.appEnv as string | undefined
|
|
22
|
+
|
|
23
|
+
const envLabel = computed(() => {
|
|
24
|
+
switch (appEnv) {
|
|
25
|
+
case 'local': return 'Entorno local'
|
|
26
|
+
case 'dev': return 'Entorno dev'
|
|
27
|
+
case 'staging': return 'Staging'
|
|
28
|
+
case 'production': return null
|
|
29
|
+
default: return appEnv ?? null
|
|
30
|
+
}
|
|
31
|
+
})
|
|
19
32
|
</script>
|
|
20
33
|
|
|
21
34
|
<template>
|
|
@@ -81,7 +94,7 @@ const userInitial = computed(() =>
|
|
|
81
94
|
</div>
|
|
82
95
|
|
|
83
96
|
<!-- User footer -->
|
|
84
|
-
<div class="shrink-0 border-t border-sidebar-line px-3
|
|
97
|
+
<div class="shrink-0 border-t border-sidebar-line px-3 pt-5 pb-3 space-y-2">
|
|
85
98
|
|
|
86
99
|
<!-- Controls slot (dark mode, notifications, etc.) -->
|
|
87
100
|
<div v-if="$slots['user-controls']" class="flex items-center gap-x-1.5">
|
|
@@ -109,6 +122,12 @@ const userInitial = computed(() =>
|
|
|
109
122
|
</button>
|
|
110
123
|
</div>
|
|
111
124
|
|
|
125
|
+
<!-- Environment label -->
|
|
126
|
+
<div v-if="envLabel" class="flex items-center gap-x-1.5 px-2">
|
|
127
|
+
<span class="size-1.5 rounded-full bg-amber-400 shrink-0"></span>
|
|
128
|
+
<span class="text-[10px] text-muted-foreground truncate">{{ envLabel }}</span>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
112
131
|
<!-- Env / extra slot -->
|
|
113
132
|
<slot name="user-footer" />
|
|
114
133
|
</div>
|