Fix: Broadened CORS for production debugging and wake up server
This commit is contained in:
@ -110,7 +110,7 @@ body {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: var(--safe-area-top);
|
||||
padding-top: calc(v-bind("isSplashScreen || isAuthScreen ? '0px' : '64px'") + var(--safe-area-top));
|
||||
}
|
||||
|
||||
/* Global Utilities */
|
||||
|
||||
@ -21,68 +21,86 @@
|
||||
</Transition>
|
||||
|
||||
<Transition name="menu-slide">
|
||||
<div v-if="showMenu" class="menu-dropdown">
|
||||
<div class="menu-header" v-if="authStore.isAuthenticated">
|
||||
<span class="user-name">{{ authStore.userName }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Unified Menu Items -->
|
||||
<div class="menu-item" @click="navigateTo('/profile')">
|
||||
<span class="material-icons">person</span> {{ t('navigation.profile') }}
|
||||
</div>
|
||||
|
||||
<template v-if="authStore.isAdmin">
|
||||
<div class="menu-item" @click="navigateTo('/admin')">
|
||||
<span class="material-icons">admin_panel_settings</span> {{ t('navigation.admin') }}
|
||||
<div v-if="showMenu" class="menu-dropdown nexus-glass">
|
||||
<!-- NEXUS HEADER: User Identity -->
|
||||
<div class="nexus-user-section">
|
||||
<div class="user-avatar-wrapper">
|
||||
<span class="material-icons avatar-icon">{{ authStore.isAuthenticated ? 'account_circle' : 'fingerprint' }}</span>
|
||||
<div v-if="authStore.isAuthenticated" class="online-indicator"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="authStore.isPromoter">
|
||||
<div class="menu-item" @click="navigateTo('/promoter')">
|
||||
<span class="material-icons">store</span> Panel Promotor
|
||||
<div class="user-info">
|
||||
<span class="user-greeting">HOLA,</span>
|
||||
<span class="user-name">{{ authStore.isAuthenticated ? authStore.userName : 'INVITADO' }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="authStore.isDriver">
|
||||
<div class="menu-item" @click="navigateTo('/driver')">
|
||||
<span class="material-icons">speed</span> Panel Conductor
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="menu-item" @click="navigateTo('/favorites')">
|
||||
<span class="material-icons">favorite</span> {{ t('navigation.favorites') }}
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div class="menu-scroll-area">
|
||||
<!-- GROUP 1: Navegación Principal -->
|
||||
<div class="nexus-group">
|
||||
<div v-if="authStore.isAuthenticated" class="menu-item-nexus" @click="navigateTo('/profile')">
|
||||
<span class="material-icons">person</span>
|
||||
<span class="item-text">Mi Perfil</span>
|
||||
</div>
|
||||
|
||||
<div class="menu-item-nexus" @click="navigateTo('/favorites')">
|
||||
<span class="material-icons">favorite</span>
|
||||
<span class="item-text">Favoritos</span>
|
||||
</div>
|
||||
|
||||
<div class="menu-divider"></div>
|
||||
<div v-if="authStore.isAdmin" class="menu-item-nexus admin-item" @click="navigateTo('/admin')">
|
||||
<span class="material-icons">admin_panel_settings</span>
|
||||
<span class="item-text">Panel Admin</span>
|
||||
</div>
|
||||
|
||||
<div v-if="authStore.isPromoter" class="menu-item-nexus promoter-item" @click="navigateTo('/promoter')">
|
||||
<span class="material-icons">store</span>
|
||||
<span class="item-text">Panel Promotor</span>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Menu Group -->
|
||||
<div class="menu-bottom-group">
|
||||
<div class="menu-item language-toggle" @click="toggleLanguage">
|
||||
<span class="material-icons">translate</span>
|
||||
{{ locale === 'es' ? 'English (EN)' : 'Español (ES)' }}
|
||||
<div v-if="authStore.isDriver" class="menu-item-nexus driver-item" @click="navigateTo('/driver')">
|
||||
<span class="material-icons">speed</span>
|
||||
<span class="item-text">Panel Conductor</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-item theme-toggle-container">
|
||||
<span class="material-icons">palette</span>
|
||||
<span class="toggle-label">Modo Oscuro</span>
|
||||
<ThemeToggle class="theme-switch-btn" />
|
||||
<div class="nexus-divider-clean"></div>
|
||||
|
||||
<!-- GROUP 2: Configuración -->
|
||||
<div class="nexus-group">
|
||||
<div class="menu-item-nexus" @click="toggleLanguage">
|
||||
<span class="material-icons">translate</span>
|
||||
<span class="item-text">{{ locale === 'es' ? 'English (EN)' : 'Español (ES)' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="menu-item-nexus theme-toggle-nexus">
|
||||
<div class="toggle-left">
|
||||
<span class="material-icons">palette</span>
|
||||
<span class="item-text">Modo Oscuro</span>
|
||||
</div>
|
||||
<ThemeToggle class="theme-switch-btn" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-item report-menu-item" @click="openReportModal">
|
||||
<span class="material-icons">report_problem</span> Enviar Reporte
|
||||
</div>
|
||||
<div class="nexus-divider-clean"></div>
|
||||
|
||||
<div v-if="!authStore.isAuthenticated" class="menu-item login-item" @click="navigateTo('/login')">
|
||||
<span class="material-icons">account_circle</span> Iniciar Sesión
|
||||
<!-- GROUP 3: Soporte -->
|
||||
<div class="nexus-group">
|
||||
<div class="menu-item-nexus report-item-nexus" @click="openReportModal">
|
||||
<span class="material-icons">report_problem</span>
|
||||
<span class="item-text">Enviar Reporte</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="logout-container" @click="handleLogout">
|
||||
<button class="logout-btn-custom">
|
||||
<div class="sign">
|
||||
<svg viewBox="0 0 512 512"><path d="M377.9 105.9L500.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L377.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1-128 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM160 96L96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-53 0-96-43-96-96L0 128C0 75 43 32 96 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32z"></path></svg>
|
||||
</div>
|
||||
<div class="btn-text">Cerrar Sesión</div>
|
||||
</div>
|
||||
|
||||
<!-- FOOTER: Auth Action -->
|
||||
<div class="nexus-footer">
|
||||
<div v-if="!authStore.isAuthenticated" class="login-btn-nexus" @click="navigateTo('/login')">
|
||||
<span class="material-icons">login</span> Iniciar Sesión
|
||||
</div>
|
||||
<div v-else class="logout-wrapper-nexus" @click="handleLogout">
|
||||
<button class="nexus-logout-btn">
|
||||
<span class="material-icons">power_settings_new</span>
|
||||
<span>CERRAR SESIÓN</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -168,8 +186,10 @@ const handleLogout = () => {
|
||||
padding: 0 20px;
|
||||
height: 64px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
position: sticky;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2000;
|
||||
width: 100%;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
@ -307,110 +327,197 @@ const handleLogout = () => {
|
||||
color: #ef4444 !important;
|
||||
}
|
||||
|
||||
.menu-dropdown {
|
||||
.menu-dropdown.nexus-glass {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 300px;
|
||||
width: 280px;
|
||||
height: 100vh;
|
||||
background: var(--header-bg);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
backdrop-filter: blur(25px);
|
||||
-webkit-backdrop-filter: blur(25px);
|
||||
border-right: 1px solid var(--border-color);
|
||||
padding: 32px 0;
|
||||
padding: 0;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 20px 0 50px rgba(0,0,0,0.5);
|
||||
box-shadow: 20px 0 50px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.menu-header {
|
||||
padding: 0 32px 32px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 900;
|
||||
color: var(--active-color);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
padding: 16px 32px;
|
||||
.nexus-user-section {
|
||||
padding: 40px 24px 24px;
|
||||
background: linear-gradient(to bottom, rgba(254, 231, 21, 0.05), transparent);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
cursor: pointer;
|
||||
color: var(--text-primary);
|
||||
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
font-weight: 600;
|
||||
font-size: 1.05rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background-color: var(--hover-bg);
|
||||
padding-left: 48px;
|
||||
color: var(--active-color);
|
||||
.user-avatar-wrapper {
|
||||
position: relative;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 16px;
|
||||
background: #fee715; /* Siempre Oro SIBU */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8px 20px rgba(254, 231, 21, 0.3);
|
||||
border: 2px solid rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.menu-item .material-icons {
|
||||
font-size: 24px;
|
||||
color: var(--text-secondary);
|
||||
transition: all 0.3s;
|
||||
.avatar-icon {
|
||||
font-size: 32px;
|
||||
color: #101820; /* Icono oscuro sobre fondo oro */
|
||||
}
|
||||
|
||||
.menu-item:hover .material-icons {
|
||||
color: var(--active-color);
|
||||
transform: scale(1.2);
|
||||
.online-indicator {
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
right: -2px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: #4ade80;
|
||||
border: 3px solid var(--header-bg);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.menu-divider {
|
||||
height: 1px;
|
||||
background: var(--border-color);
|
||||
margin: 24px 32px;
|
||||
}
|
||||
|
||||
.menu-bottom-group {
|
||||
margin-top: 24px;
|
||||
.user-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-menu-item {
|
||||
.user-greeting {
|
||||
font-size: 0.7rem;
|
||||
font-weight: 800;
|
||||
color: var(--text-secondary);
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 900;
|
||||
color: var(--active-color);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.menu-scroll-area {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.nexus-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.menu-item-nexus {
|
||||
padding: 10px 16px;
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
cursor: pointer;
|
||||
color: var(--text-primary);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.menu-item-nexus:hover {
|
||||
background: var(--hover-bg);
|
||||
border-color: var(--border-color);
|
||||
transform: translateX(5px);
|
||||
}
|
||||
|
||||
.menu-item-nexus .material-icons {
|
||||
font-size: 22px;
|
||||
color: var(--text-secondary);
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.menu-item-nexus:hover .material-icons {
|
||||
color: var(--active-color);
|
||||
}
|
||||
|
||||
.item-text {
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.admin-item { color: #f87171; }
|
||||
.promoter-item { color: #818cf8; }
|
||||
.driver-item { color: #fbbf24; }
|
||||
|
||||
.nexus-divider-clean {
|
||||
height: 1px;
|
||||
background: linear-gradient(to right, transparent, var(--border-color), transparent);
|
||||
margin: 12px 16px;
|
||||
}
|
||||
|
||||
.theme-toggle-nexus {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.toggle-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.report-item-nexus {
|
||||
color: #fbbf24;
|
||||
background: rgba(251, 191, 36, 0.05);
|
||||
}
|
||||
|
||||
.report-menu-item:hover {
|
||||
background-color: rgba(251, 191, 36, 0.1);
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
.report-menu-item .material-icons {
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
.login-item {
|
||||
color: #4ade80;
|
||||
.nexus-footer {
|
||||
padding: 24px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
padding: 20px 32px calc(20px + var(--safe-area-bottom));
|
||||
background: rgba(74, 222, 128, 0.03);
|
||||
}
|
||||
|
||||
.login-item:hover {
|
||||
background: rgba(74, 222, 128, 0.1);
|
||||
color: #22c55e;
|
||||
padding-left: 40px;
|
||||
.login-btn-nexus {
|
||||
background: var(--active-color);
|
||||
color: #101820;
|
||||
padding: 14px;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
font-weight: 900;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
box-shadow: 0 10px 20px rgba(254, 231, 21, 0.2);
|
||||
}
|
||||
|
||||
.login-item .material-icons {
|
||||
color: #4ade80;
|
||||
.login-btn-nexus:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 15px 30px rgba(254, 231, 21, 0.3);
|
||||
}
|
||||
|
||||
.login-item:hover .material-icons {
|
||||
color: #22c55e;
|
||||
transform: scale(1.1);
|
||||
.nexus-logout-btn {
|
||||
width: 100%;
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border: 1px solid rgba(239, 68, 68, 0.2);
|
||||
color: #ef4444;
|
||||
padding: 14px;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.nexus-logout-btn:hover {
|
||||
background: #ef4444;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.menu-overlay {
|
||||
|
||||
Reference in New Issue
Block a user