Fix: Corregir errores de TypeScript en componentes
- Instalar @types/node para resolver referencias a process - Corregir colores inválidos en componentes (orange→warning, purple→secondary, gray→neutral, etc.) - Agregar tipos explícitos en GroupCheckButton y EditProfileButton - Eliminar propiedad timeout inválida en toasts
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<UButton
|
<UButton
|
||||||
color="orange"
|
color="warning"
|
||||||
size="lg"
|
size="lg"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -39,9 +39,8 @@ const handleClick = async () => {
|
|||||||
title: 'Verificación Backend',
|
title: 'Verificación Backend',
|
||||||
description: `Usuario: ${response.user.username}
|
description: `Usuario: ${response.user.username}
|
||||||
Grupos (${groupCount}): ${groupList}`,
|
Grupos (${groupCount}): ${groupList}`,
|
||||||
color: 'orange',
|
color: 'warning',
|
||||||
icon: 'i-heroicons-server-stack',
|
icon: 'i-heroicons-server-stack'
|
||||||
timeout: 5000
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
toast.add({
|
toast.add({
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
group-name="authentik Admins"
|
group-name="authentik Admins"
|
||||||
label="Authentik Admins"
|
label="Authentik Admins"
|
||||||
icon="i-heroicons-shield-check"
|
icon="i-heroicons-shield-check"
|
||||||
color="red"
|
color="error"
|
||||||
variant="soft"
|
variant="soft"
|
||||||
:verify-backend="verifyBackend"
|
:verify-backend="verifyBackend"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
group-name="grupo-prueba"
|
group-name="grupo-prueba"
|
||||||
label="Grupo Prueba"
|
label="Grupo Prueba"
|
||||||
icon="i-heroicons-beaker"
|
icon="i-heroicons-beaker"
|
||||||
color="blue"
|
color="primary"
|
||||||
variant="soft"
|
variant="soft"
|
||||||
:verify-backend="verifyBackend"
|
:verify-backend="verifyBackend"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
group-name="lvl0"
|
group-name="lvl0"
|
||||||
label="Level 0"
|
label="Level 0"
|
||||||
icon="i-heroicons-key"
|
icon="i-heroicons-key"
|
||||||
color="green"
|
color="success"
|
||||||
variant="soft"
|
variant="soft"
|
||||||
:verify-backend="verifyBackend"
|
:verify-backend="verifyBackend"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
group-name="public-access"
|
group-name="public-access"
|
||||||
label="Acceso Público"
|
label="Acceso Público"
|
||||||
icon="i-heroicons-globe-alt"
|
icon="i-heroicons-globe-alt"
|
||||||
color="gray"
|
color="neutral"
|
||||||
variant="soft"
|
variant="soft"
|
||||||
:verify-backend="verifyBackend"
|
:verify-backend="verifyBackend"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<h3 class="text-lg font-semibold">Editar Perfil</h3>
|
<h3 class="text-lg font-semibold">Editar Perfil</h3>
|
||||||
<UButton
|
<UButton
|
||||||
color="gray"
|
color="neutral"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
icon="i-heroicons-x-mark"
|
icon="i-heroicons-x-mark"
|
||||||
@click="isOpen = false"
|
@click="isOpen = false"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="flex justify-end gap-2">
|
<div class="flex justify-end gap-2">
|
||||||
<UButton
|
<UButton
|
||||||
color="gray"
|
color="neutral"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
:disabled="isUpdating"
|
:disabled="isUpdating"
|
||||||
@click="isOpen = false"
|
@click="isOpen = false"
|
||||||
@@ -95,7 +95,11 @@ const openModal = async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Obtener información del usuario desde Authentik
|
// Obtener información del usuario desde Authentik
|
||||||
const userData = await $fetch('/api/authentik/user')
|
const userData = await $fetch<{
|
||||||
|
name?: string
|
||||||
|
email?: string
|
||||||
|
username?: string
|
||||||
|
}>('/api/authentik/user')
|
||||||
|
|
||||||
formData.value = {
|
formData.value = {
|
||||||
name: userData.name || '',
|
name: userData.name || '',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<UButton
|
<UButton
|
||||||
color="purple"
|
color="secondary"
|
||||||
size="lg"
|
size="lg"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
@click="handleClick"
|
@click="handleClick"
|
||||||
@@ -35,9 +35,8 @@ const handleClick = () => {
|
|||||||
title: 'Verificación Frontend',
|
title: 'Verificación Frontend',
|
||||||
description: `Usuario: ${user.value.username}
|
description: `Usuario: ${user.value.username}
|
||||||
Grupos (${groupCount}): ${groupList}`,
|
Grupos (${groupCount}): ${groupList}`,
|
||||||
color: 'purple',
|
color: 'secondary',
|
||||||
icon: 'i-heroicons-check-badge',
|
icon: 'i-heroicons-check-badge'
|
||||||
timeout: 5000
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -15,15 +15,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { ButtonColor, ButtonVariant, ButtonSize } from '#ui/types'
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
groupName: string
|
groupName: string
|
||||||
label?: string
|
label?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
color?: ButtonColor
|
color?: 'neutral' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error'
|
||||||
variant?: ButtonVariant
|
variant?: 'solid' | 'outline' | 'soft' | 'ghost' | 'link'
|
||||||
size?: ButtonSize
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
||||||
verifyBackend?: boolean
|
verifyBackend?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
>
|
>
|
||||||
{{ group }}
|
{{ group }}
|
||||||
</UBadge>
|
</UBadge>
|
||||||
<UBadge v-if="user.groups.length === 0" color="gray" variant="soft">
|
<UBadge v-if="user.groups.length === 0" color="neutral" variant="soft">
|
||||||
Sin grupos asignados
|
Sin grupos asignados
|
||||||
</UBadge>
|
</UBadge>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
18
nuxt4/package-lock.json
generated
18
nuxt4/package-lock.json
generated
@@ -20,6 +20,7 @@
|
|||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^24.8.0",
|
||||||
"@vite-pwa/nuxt": "^1.0.4"
|
"@vite-pwa/nuxt": "^1.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -6246,6 +6247,16 @@
|
|||||||
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "24.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.8.0.tgz",
|
||||||
|
"integrity": "sha512-5x08bUtU8hfboMTrJ7mEO4CpepS9yBwAqcL52y86SWNmbPX8LVbNs3EP4cNrIZgdjk2NAlP2ahNihozpoZIxSg==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~7.14.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/parse-path": {
|
"node_modules/@types/parse-path": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/parse-path/-/parse-path-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/parse-path/-/parse-path-7.0.3.tgz",
|
||||||
@@ -19131,6 +19142,13 @@
|
|||||||
"node": ">=20.18.1"
|
"node": ">=20.18.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "7.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz",
|
||||||
|
"integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/unenv": {
|
"node_modules/unenv": {
|
||||||
"version": "2.0.0-rc.21",
|
"version": "2.0.0-rc.21",
|
||||||
"resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.21.tgz",
|
"resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.21.tgz",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"vue-router": "^4.5.1"
|
"vue-router": "^4.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^24.8.0",
|
||||||
"@vite-pwa/nuxt": "^1.0.4"
|
"@vite-pwa/nuxt": "^1.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user