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>
|
||||
<UButton
|
||||
color="orange"
|
||||
color="warning"
|
||||
size="lg"
|
||||
variant="outline"
|
||||
:loading="loading"
|
||||
@@ -39,9 +39,8 @@ const handleClick = async () => {
|
||||
title: 'Verificación Backend',
|
||||
description: `Usuario: ${response.user.username}
|
||||
Grupos (${groupCount}): ${groupList}`,
|
||||
color: 'orange',
|
||||
icon: 'i-heroicons-server-stack',
|
||||
timeout: 5000
|
||||
color: 'warning',
|
||||
icon: 'i-heroicons-server-stack'
|
||||
})
|
||||
} else {
|
||||
toast.add({
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
group-name="authentik Admins"
|
||||
label="Authentik Admins"
|
||||
icon="i-heroicons-shield-check"
|
||||
color="red"
|
||||
color="error"
|
||||
variant="soft"
|
||||
:verify-backend="verifyBackend"
|
||||
/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
group-name="grupo-prueba"
|
||||
label="Grupo Prueba"
|
||||
icon="i-heroicons-beaker"
|
||||
color="blue"
|
||||
color="primary"
|
||||
variant="soft"
|
||||
:verify-backend="verifyBackend"
|
||||
/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
group-name="lvl0"
|
||||
label="Level 0"
|
||||
icon="i-heroicons-key"
|
||||
color="green"
|
||||
color="success"
|
||||
variant="soft"
|
||||
:verify-backend="verifyBackend"
|
||||
/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
group-name="public-access"
|
||||
label="Acceso Público"
|
||||
icon="i-heroicons-globe-alt"
|
||||
color="gray"
|
||||
color="neutral"
|
||||
variant="soft"
|
||||
:verify-backend="verifyBackend"
|
||||
/>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-lg font-semibold">Editar Perfil</h3>
|
||||
<UButton
|
||||
color="gray"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
icon="i-heroicons-x-mark"
|
||||
@click="isOpen = false"
|
||||
@@ -56,7 +56,7 @@
|
||||
<template #footer>
|
||||
<div class="flex justify-end gap-2">
|
||||
<UButton
|
||||
color="gray"
|
||||
color="neutral"
|
||||
variant="ghost"
|
||||
:disabled="isUpdating"
|
||||
@click="isOpen = false"
|
||||
@@ -95,7 +95,11 @@ const openModal = async () => {
|
||||
|
||||
try {
|
||||
// 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 = {
|
||||
name: userData.name || '',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<UButton
|
||||
color="purple"
|
||||
color="secondary"
|
||||
size="lg"
|
||||
variant="outline"
|
||||
@click="handleClick"
|
||||
@@ -35,9 +35,8 @@ const handleClick = () => {
|
||||
title: 'Verificación Frontend',
|
||||
description: `Usuario: ${user.value.username}
|
||||
Grupos (${groupCount}): ${groupList}`,
|
||||
color: 'purple',
|
||||
icon: 'i-heroicons-check-badge',
|
||||
timeout: 5000
|
||||
color: 'secondary',
|
||||
icon: 'i-heroicons-check-badge'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,15 +15,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { ButtonColor, ButtonVariant, ButtonSize } from '#ui/types'
|
||||
|
||||
interface Props {
|
||||
groupName: string
|
||||
label?: string
|
||||
icon?: string
|
||||
color?: ButtonColor
|
||||
variant?: ButtonVariant
|
||||
size?: ButtonSize
|
||||
color?: 'neutral' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error'
|
||||
variant?: 'solid' | 'outline' | 'soft' | 'ghost' | 'link'
|
||||
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
||||
verifyBackend?: boolean
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
>
|
||||
{{ group }}
|
||||
</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
|
||||
</UBadge>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user