Fix: Actualizar sintaxis de componentes Nuxt UI v4 y corregir errores de TypeScript
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 55s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 55s
- Actualizar UModal para usar v-model:open en lugar de v-model - Envolver contenido de UModal en slot #content según nueva sintaxis - Corregir tipos en CameraCapture: agregar verificación de objeto antes de spread - Cambiar tipo de retorno de getAppIconUrl de null a undefined - Comentar capture_links en manifest PWA (propiedad experimental no soportada en tipos) - Resolver todos los errores de TypeScript y warnings de hidratación Errores corregidos: - TS2353: width no existe en tipo ui de UModal - TS2698: Spread types solo de tipos objeto - TS18048: camera posiblemente undefined - TS2322: null no asignable a undefined - TS2353: capture_links no existe en ManifestOptions
This commit is contained in:
@@ -180,10 +180,10 @@ const searchQuery = ref<string>(searchCookie.value || '')
|
||||
const failedIcons = ref<Set<string>>(new Set())
|
||||
|
||||
// Función para obtener la URL del icono de una app
|
||||
const getAppIconUrl = (app: Application): string | null => {
|
||||
const getAppIconUrl = (app: Application): string | undefined => {
|
||||
// Si el icono ya falló, no intentar de nuevo
|
||||
if (failedIcons.value.has(app.pk)) {
|
||||
return null
|
||||
return undefined
|
||||
}
|
||||
|
||||
// Intentar primero ícono local basado en slug
|
||||
@@ -204,7 +204,7 @@ const getAppIconUrl = (app: Application): string | null => {
|
||||
const url = new URL(app.launchUrl)
|
||||
return `${url.origin}${app.icon.startsWith('/') ? '' : '/'}${app.icon}`
|
||||
} catch {
|
||||
return null
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ const getAppIconUrl = (app: Application): string | null => {
|
||||
// Intentar primero apple-touch-icon (suele ser de mejor calidad)
|
||||
return `${url.origin}/apple-touch-icon.png`
|
||||
} catch {
|
||||
return null
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user