Restaurar proporcion 1.586 tarjeta credito, scroll a inicio en portal padres, vibracion haptica tangible y ajustes solo en barra inferior

This commit is contained in:
unknown
2026-10-09 01:34:21 -06:00
parent 532f95942a
commit deebf03c84
6 changed files with 96 additions and 43 deletions
+53 -9
View File
@@ -195,23 +195,61 @@ body.dark-mode .logout-btn {
transform: scale(1.02); transform: scale(1.02);
} }
/* Tarjeta de Saldo y Carné Digital */ /* Tarjeta de Saldo y Carné Digital (Proporción exacta de tarjeta de crédito 1.586) */
.wallet-card { .wallet-card {
margin: 16px; margin: 14px auto;
max-width: 440px;
width: calc(100% - 24px);
aspect-ratio: 1.586;
background: linear-gradient(135deg, #0284c7, #0369a1); background: linear-gradient(135deg, #0284c7, #0369a1);
color: white; color: white;
border-radius: var(--radius); border-radius: 18px;
padding: 20px; padding: 16px 18px;
box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.35); box-shadow: 0 12px 25px -4px rgba(2, 132, 199, 0.35);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.2);
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
} }
@media (max-width: 480px) { @media (max-width: 480px) {
.wallet-card { .wallet-card {
margin: 12px 10px; margin: 10px auto;
padding: 16px 14px; width: calc(100% - 20px);
aspect-ratio: 1.586;
padding: 12px 14px;
border-radius: 16px;
}
.wallet-card .card-chip-container {
min-height: 14px;
margin-bottom: 2px;
}
.wallet-card .student-info {
gap: 10px;
margin-bottom: 4px;
}
.wallet-card .student-avatar {
width: 40px;
height: 40px;
font-size: 1rem;
border-width: 2px;
}
.wallet-card .student-meta h2 {
font-size: 1.02rem;
}
.wallet-card .balance-row {
padding-top: 6px;
gap: 6px;
}
.wallet-card .balance-col .amount {
font-size: 1.4rem;
}
.wallet-card .qr-toggle-btn {
padding: 5px 9px;
font-size: 0.72rem;
} }
} }
@@ -230,6 +268,7 @@ body.dark-mode .wallet-card:not([class*="theme-"]) {
height: 140px; height: 140px;
background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%); background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
border-radius: 50%; border-radius: 50%;
pointer-events: none;
} }
.student-info { .student-info {
@@ -3109,7 +3148,7 @@ body.dark-mode .pwa-bottom-nav {
border: none; border: none;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
padding: 6px 0; padding: 4px 1px;
color: var(--text-muted, #64748b); color: var(--text-muted, #64748b);
transition: all 0.15s ease; transition: all 0.15s ease;
min-width: 0; min-width: 0;
@@ -3122,15 +3161,20 @@ body.dark-mode .pwa-bottom-nav {
} }
.pwa-nav-icon { .pwa-nav-icon {
font-size: 1.35rem; font-size: 1.25rem;
line-height: 1; line-height: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.pwa-nav-icon svg {
width: 20px;
height: 20px;
}
.pwa-nav-label { .pwa-nav-label {
font-size: 0.68rem; font-size: 0.65rem;
font-weight: 700; font-weight: 700;
margin-top: 3px; margin-top: 3px;
line-height: 1; line-height: 1;
+1 -1
View File
@@ -647,7 +647,7 @@
} }
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
window.addEventListener('load', () => { window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js?v=17.0').catch(err => console.log('SW error:', err)); navigator.serviceWorker.register('/sw.js?v=18.0').catch(err => console.log('SW error:', err));
}); });
} }
</script> </script>
+7 -10
View File
@@ -11,9 +11,9 @@
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="SiboPay"> <meta name="apple-mobile-web-app-title" content="SiboPay">
<link rel="preload" href="/css/styles.css?v=17.0" as="style"> <link rel="preload" href="/css/styles.css?v=18.0" as="style">
<link rel="preload" href="/js/app.js?v=17.0" as="script"> <link rel="preload" href="/js/app.js?v=18.0" as="script">
<link rel="stylesheet" href="/css/styles.css?v=17.0"> <link rel="stylesheet" href="/css/styles.css?v=18.0">
<link rel="stylesheet" href="/css/desktop.css?v=2.2"> <link rel="stylesheet" href="/css/desktop.css?v=2.2">
<style> <style>
/* Transiciones suaves */ /* Transiciones suaves */
@@ -2172,9 +2172,6 @@
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
<span>Padres</span> <span>Padres</span>
</button> </button>
<button id="btnAjustesCuentaEst" onclick="abrirModalAjustesCuenta()" class="theme-toggle-btn" title="Ajustes de Cuenta y Privacidad" style="display: inline-flex; align-items: center; justify-content: center; margin-right: 2px;">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
</button>
<button id="btnLogout" onclick="logout(true)" class="logout-btn" title="Cerrar sesión y cambiar de cuenta" style="display: inline-flex; align-items: center; gap: 6px;"> <button id="btnLogout" onclick="logout(true)" class="logout-btn" title="Cerrar sesión y cambiar de cuenta" style="display: inline-flex; align-items: center; gap: 6px;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/></svg> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/></svg>
<span class="logout-text">Salir</span> <span class="logout-text">Salir</span>
@@ -4185,10 +4182,10 @@
</button> </button>
</nav> </nav>
<script src="/js/dialogs.js?v=17.0"></script> <script src="/js/dialogs.js?v=18.0"></script>
<script src="/js/sounds.js?v=17.0" defer></script> <script src="/js/sounds.js?v=18.0"></script>
<script src="/js/jsQR.js" defer></script> <script src="/js/jsQR.js" defer></script>
<script src="/js/food-icons.js?v=17.0" defer></script> <script src="/js/food-icons.js?v=18.0" defer></script>
<script src="/js/app.js?v=17.0"></script> <script src="/js/app.js?v=18.0"></script>
</body> </body>
</html> </html>
+24 -12
View File
@@ -68,7 +68,7 @@ document.addEventListener('DOMContentLoaded', async () => {
// Registrar Service Worker para PWA // Registrar Service Worker para PWA
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js?v=17.0').then(reg => { navigator.serviceWorker.register('/sw.js?v=18.0').then(reg => {
reg.update().catch(() => {}); reg.update().catch(() => {});
if ('Notification' in window && Notification.permission === 'granted') { if ('Notification' in window && Notification.permission === 'granted') {
subscribeDeviceToWebPush().catch(() => {}); subscribeDeviceToWebPush().catch(() => {});
@@ -3767,7 +3767,7 @@ function descargarEstadoCuentaPadresExcel() {
descargarArchivoDirecto(url, `estado_cuenta_familiar_${dateTag}.xlsx`); descargarArchivoDirecto(url, `estado_cuenta_familiar_${dateTag}.xlsx`);
} }
function closeParentSubView(shouldScroll = true) { function closeParentSubView(shouldScroll = false) {
const isDesktop = window.innerWidth >= 860; const isDesktop = window.innerWidth >= 860;
if (isDesktop) { if (isDesktop) {
openParentSubView('resumen', false); openParentSubView('resumen', false);
@@ -3800,10 +3800,8 @@ function closeParentSubView(shouldScroll = true) {
box.classList.remove('active'); box.classList.remove('active');
}); });
if (!isDesktop && sidebar && shouldScroll) { if (!isDesktop) {
setTimeout(() => { window.scrollTo({ top: 0, behavior: 'smooth' });
smoothScrollToElement(sidebar, 65);
}, 60);
} }
if (window.sounds) window.sounds.playTap(); if (window.sounds) window.sounds.playTap();
@@ -5011,8 +5009,12 @@ function returnToParentDashboard() {
if (viewPadres) viewPadres.style.display = 'block'; if (viewPadres) viewPadres.style.display = 'block';
if (appContainer) appContainer.style.display = 'none'; if (appContainer) appContainer.style.display = 'none';
if (bottomNav) bottomNav.style.display = 'none'; if (bottomNav) bottomNav.style.display = 'none';
closeParentSubView(); closeParentSubView(false);
loadParentDashboard(); loadParentDashboard();
window.scrollTo({ top: 0, behavior: 'instant' });
setTimeout(() => {
window.scrollTo({ top: 0, behavior: 'smooth' });
}, 40);
} }
// ========================================== // ==========================================
@@ -9794,10 +9796,20 @@ window.confirmarEliminarCuentaDefinitiva = confirmarEliminarCuentaDefinitiva;
// ======================================================== // ========================================================
// RETROALIMENTACIÓN HÁPTICA GLOBAL EN DISPOSITIVOS MÓVILES // RETROALIMENTACIÓN HÁPTICA GLOBAL EN DISPOSITIVOS MÓVILES
// ======================================================== // ========================================================
document.addEventListener('pointerdown', (e) => { let lastGlobalHapticTapTime = 0;
const btn = e.target.closest('button, .btn-saas, .mode-btn, .login-submit-btn, .pwa-nav-item, .limit-preset-pill, .quick-amount-pill, .theme-toggle-btn'); function triggerGlobalHapticFeedback(e) {
if (btn && !btn.disabled && window.haptics) { const now = Date.now();
window.haptics.tap(); if (now - lastGlobalHapticTapTime < 80) return;
const btn = e.target.closest('button, .btn-saas, .mode-btn, .login-submit-btn, .pwa-nav-item, .limit-preset-pill, .quick-amount-pill, .theme-toggle-btn, .card-design-toggle-btn, .qr-toggle-btn, .parent-nav-box, .parent-child-card');
if (btn && !btn.disabled) {
lastGlobalHapticTapTime = now;
if (window.haptics && typeof window.haptics.tap === 'function') {
window.haptics.tap();
} else if (typeof navigator !== 'undefined' && typeof navigator.vibrate === 'function') {
try { navigator.vibrate(28); } catch (err) {}
}
} }
}, { passive: true }); }
document.addEventListener('touchstart', triggerGlobalHapticFeedback, { passive: true });
document.addEventListener('pointerdown', triggerGlobalHapticFeedback, { passive: true });
+4 -4
View File
@@ -53,19 +53,19 @@ class SensorySystem {
} }
hapticTap() { hapticTap() {
this.vibrate(10); // Micro-vibración sutil de 10ms this.vibrate([28]); // 28ms pulso perceptible para motores hápticos móviles
} }
hapticSuccess() { hapticSuccess() {
this.vibrate([30, 40, 45]); // Doble pulso de confirmación this.vibrate([35, 45, 55]); // Doble pulso nítido de confirmación
} }
hapticScan() { hapticScan() {
this.vibrate(22); // Pulso nítido de detección this.vibrate([35]); // Pulso nítido de detección
} }
hapticWarning() { hapticWarning() {
this.vibrate([40, 50, 40]); this.vibrate([45, 50, 45]);
} }
hapticError() { hapticError() {
+7 -7
View File
@@ -1,5 +1,5 @@
// SiboPay PWA Service Worker v17.0 - Ultra Fast Startup & Stale-While-Revalidate // SiboPay PWA Service Worker v18.0 - Ultra Fast Startup & Stale-While-Revalidate
const CACHE_NAME = 'sibopay-v17.0'; const CACHE_NAME = 'sibopay-v18.0';
const STATIC_ASSETS = [ const STATIC_ASSETS = [
'/', '/',
'/index.html', '/index.html',
@@ -8,13 +8,13 @@ const STATIC_ASSETS = [
'/pistola.html', '/pistola.html',
'/carnet.html', '/carnet.html',
'/manifest.json', '/manifest.json',
'/css/styles.css?v=17.0', '/css/styles.css?v=18.0',
'/css/desktop.css?v=2.2', '/css/desktop.css?v=2.2',
'/js/dialogs.js?v=17.0', '/js/dialogs.js?v=18.0',
'/js/app.js?v=17.0', '/js/app.js?v=18.0',
'/js/pos.js', '/js/pos.js',
'/js/sounds.js?v=17.0', '/js/sounds.js?v=18.0',
'/js/food-icons.js?v=17.0', '/js/food-icons.js?v=18.0',
'/icons/icon-192.png', '/icons/icon-192.png',
'/icons/icon-512.png', '/icons/icon-512.png',
'/img/sibopay-emblem.png', '/img/sibopay-emblem.png',