Traducción completa al español y barra de título PWA
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 2m19s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 2m19s
- Traducir mensajes de API a español - Configurar idioma español en HTML y manifest (lang="es") - Actualizar nombres de app: "Perfil Nucleo" - Crear WindowTitleBar para Window Controls Overlay - Ajustar padding para acomodar barra de título - Traducir campos restantes en componentes legacy
This commit is contained in:
@@ -3,6 +3,9 @@
|
|||||||
<NuxtRouteAnnouncer />
|
<NuxtRouteAnnouncer />
|
||||||
<UNotifications />
|
<UNotifications />
|
||||||
|
|
||||||
|
<!-- Barra de título para Window Controls Overlay (PWA) -->
|
||||||
|
<WindowTitleBar />
|
||||||
|
|
||||||
<!-- Fondo animado -->
|
<!-- Fondo animado -->
|
||||||
<AnimatedBackground />
|
<AnimatedBackground />
|
||||||
|
|
||||||
@@ -54,6 +57,9 @@ const showProfileForm = ref(false)
|
|||||||
|
|
||||||
// Configurar meta tags para PWA
|
// Configurar meta tags para PWA
|
||||||
useHead({
|
useHead({
|
||||||
|
htmlAttrs: {
|
||||||
|
lang: 'es'
|
||||||
|
},
|
||||||
link: [
|
link: [
|
||||||
{ rel: 'manifest', href: '/manifest.webmanifest' },
|
{ rel: 'manifest', href: '/manifest.webmanifest' },
|
||||||
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' },
|
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' },
|
||||||
@@ -63,7 +69,9 @@ useHead({
|
|||||||
{ name: 'theme-color', content: '#00DC82' },
|
{ name: 'theme-color', content: '#00DC82' },
|
||||||
{ name: 'mobile-web-app-capable', content: 'yes' },
|
{ name: 'mobile-web-app-capable', content: 'yes' },
|
||||||
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
|
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
|
||||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'default' }
|
{ name: 'apple-mobile-web-app-status-bar-style', content: 'default' },
|
||||||
|
{ name: 'language', content: 'es' },
|
||||||
|
{ property: 'og:locale', content: 'es_ES' }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -73,7 +81,9 @@ useHead({
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding-top: 2rem;
|
/* Ajustar padding cuando Window Controls Overlay está activo */
|
||||||
|
padding-top: max(2rem, env(titlebar-area-height, 0px));
|
||||||
|
padding-top: max(2rem, calc(env(titlebar-area-height, 0px) + 1rem));
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-actions {
|
.quick-actions {
|
||||||
|
|||||||
101
nuxt4/app/components/WindowTitleBar.vue
Normal file
101
nuxt4/app/components/WindowTitleBar.vue
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
v-if="isWindowControlsOverlay"
|
||||||
|
class="window-titlebar"
|
||||||
|
:style="{ height: titlebarHeight }"
|
||||||
|
>
|
||||||
|
<div class="titlebar-content">
|
||||||
|
<span class="app-title">Perfil Nucleo</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
const isWindowControlsOverlay = ref(false)
|
||||||
|
const titlebarHeight = ref('40px')
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// Detectar si Window Controls Overlay está activo
|
||||||
|
if ('windowControlsOverlay' in navigator) {
|
||||||
|
const wco = (navigator as any).windowControlsOverlay
|
||||||
|
isWindowControlsOverlay.value = wco.visible
|
||||||
|
|
||||||
|
// Obtener la geometría del overlay si está disponible
|
||||||
|
if (wco.getTitlebarAreaRect) {
|
||||||
|
const rect = wco.getTitlebarAreaRect()
|
||||||
|
titlebarHeight.value = `${rect.height}px`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Escuchar cambios en el overlay
|
||||||
|
wco.addEventListener('geometrychange', (event: any) => {
|
||||||
|
isWindowControlsOverlay.value = event.visible
|
||||||
|
if (event.titlebarAreaRect) {
|
||||||
|
titlebarHeight.value = `${event.titlebarAreaRect.height}px`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.window-titlebar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
backdrop-filter: blur(20px) saturate(180%);
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
/* Esta propiedad permite arrastrar la ventana */
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
app-region: drag;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 1rem;
|
||||||
|
user-select: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-title {
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--color-gray-700);
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Permitir que los botones dentro de la barra sean clickeables */
|
||||||
|
.window-titlebar button,
|
||||||
|
.window-titlebar a,
|
||||||
|
.window-titlebar input {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
app-region: no-drag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modo oscuro */
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.dark .window-titlebar {
|
||||||
|
background: rgba(0, 0, 0, 0.8) !important;
|
||||||
|
border-bottom-color: rgba(255, 255, 255, 0.1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .app-title {
|
||||||
|
color: var(--color-gray-200) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ajustar el padding del contenido principal cuando la barra está visible */
|
||||||
|
.window-titlebar ~ * {
|
||||||
|
padding-top: env(titlebar-area-height, 0px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Email" name="email">
|
<UFormGroup label="Correo electrónico" name="email">
|
||||||
<UInput
|
<UInput
|
||||||
v-model="formData.email"
|
v-model="formData.email"
|
||||||
type="email"
|
type="email"
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
/>
|
/>
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Username" name="username">
|
<UFormGroup label="Nombre de usuario" name="username">
|
||||||
<UInput
|
<UInput
|
||||||
v-model="formData.username"
|
v-model="formData.username"
|
||||||
disabled
|
disabled
|
||||||
|
|||||||
@@ -29,9 +29,11 @@ export default defineNuxtConfig({
|
|||||||
registerType: 'autoUpdate',
|
registerType: 'autoUpdate',
|
||||||
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'icon.svg', 'offline.html'],
|
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'icon.svg', 'offline.html'],
|
||||||
manifest: {
|
manifest: {
|
||||||
name: 'Plantilla Nuxt + Authentik',
|
name: 'Perfil Nucleo',
|
||||||
short_name: 'NuxtAuth',
|
short_name: 'Perfil',
|
||||||
description: 'Plantilla de aplicación Nuxt 4 con autenticación mediante Authentik Proxy Outpost',
|
description: 'Gestiona tu perfil de usuario y accede a tus aplicaciones de Nucleo',
|
||||||
|
lang: 'es',
|
||||||
|
dir: 'ltr',
|
||||||
theme_color: '#00DC82',
|
theme_color: '#00DC82',
|
||||||
background_color: '#ffffff',
|
background_color: '#ffffff',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt4",
|
"name": "perfil-nucleo",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
if (!groupName || typeof groupName !== 'string') {
|
if (!groupName || typeof groupName !== 'string') {
|
||||||
throw createError({
|
throw createError({
|
||||||
statusCode: 400,
|
statusCode: 400,
|
||||||
statusMessage: 'Group name is required'
|
statusMessage: 'El nombre del grupo es requerido'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user