@innertia-solutions/nuxt-theme-spark 0.1.127 → 0.1.129
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 +23 -4
- 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>
|
|
@@ -89,13 +102,13 @@ const userInitial = computed(() =>
|
|
|
89
102
|
</div>
|
|
90
103
|
|
|
91
104
|
<!-- User info + logout -->
|
|
92
|
-
<div v-if="user" class="flex items-center gap-x-
|
|
93
|
-
<div class="size-
|
|
105
|
+
<div v-if="user" class="flex items-center gap-x-3 px-2 py-1">
|
|
106
|
+
<div class="size-9 rounded-lg bg-primary flex items-center justify-center text-primary-foreground text-sm font-bold shrink-0 select-none">
|
|
94
107
|
{{ userInitial }}
|
|
95
108
|
</div>
|
|
96
109
|
<div class="flex-1 min-w-0">
|
|
97
|
-
<p class="text-
|
|
98
|
-
<p v-if="user.name && user.email" class="text-
|
|
110
|
+
<p class="text-sm font-semibold text-foreground truncate">{{ user.name ?? user.email }}</p>
|
|
111
|
+
<p v-if="user.name && user.email" class="text-xs text-muted-foreground truncate">{{ user.email }}</p>
|
|
99
112
|
</div>
|
|
100
113
|
<button
|
|
101
114
|
type="button"
|
|
@@ -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>
|