Solucionar retorno directo a /app desde legales y formulario de eliminar cuenta

This commit is contained in:
unknown
2026-10-09 01:04:59 -06:00
parent 8fab0f1c39
commit 532f95942a
3 changed files with 142 additions and 32 deletions
+85 -22
View File
@@ -47,23 +47,38 @@
<!-- CONTENEDOR PRINCIPAL -->
<main class="max-w-3xl mx-auto w-full">
<!-- CABECERA DE MARCA -->
<header class="text-center mb-8">
<a href="/" class="inline-flex items-center gap-3 group">
<div class="w-12 h-12 rounded-xl bg-sky-50 border border-sky-100 flex items-center justify-center p-2 shadow-sm transition-transform group-hover:scale-105">
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="w-full h-full object-contain">
<!-- CABECERA DE MARCA Y NAVEGACIÓN -->
<header class="mb-8">
<div class="flex items-center justify-between gap-4 pb-4 border-b border-slate-100">
<a href="/app" id="linkLogoHeader" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-3 group">
<div class="w-10 h-10 rounded-xl bg-sky-50 border border-sky-100 flex items-center justify-center p-2 shadow-sm transition-transform group-hover:scale-105">
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="w-full h-full object-contain">
</div>
<div class="text-left">
<span class="text-xl font-black tracking-tight text-slate-900 block leading-tight">Sibo<span class="text-sky-600">Pay</span></span>
<span class="text-[10px] font-bold text-slate-500 uppercase tracking-wider block">Privacidad y Protección de Datos</span>
</div>
</a>
<div class="flex items-center gap-2">
<a id="btnNavReturn" href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-black text-slate-800 bg-white border border-slate-200 hover:bg-slate-50 transition shadow-sm cursor-pointer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
<span id="txtNavReturn">Volver a la App</span>
</a>
<a id="btnNavLanding" href="/" class="hidden inline-flex items-center gap-1 px-3 py-2 rounded-xl text-xs font-semibold text-slate-500 hover:text-slate-800 transition">
<span>Inicio</span>
</a>
</div>
<div class="text-left">
<span class="text-2xl font-black tracking-tight text-slate-900 block leading-tight">Sibo<span class="text-sky-600">Pay</span></span>
<span class="text-xs font-bold text-slate-500 uppercase tracking-wider block">Privacidad y Protección de Datos</span>
</div>
</a>
<h1 class="text-2xl sm:text-3xl font-black text-slate-900 mt-6 tracking-tight">
Eliminación de Cuenta y Supresión de Datos
</h1>
<p class="text-sm sm:text-base text-slate-600 mt-2 max-w-xl mx-auto">
Transparencia y control absoluto sobre tu información conforme a las políticas de privacidad y requisitos de Google Play Store y Apple App Store.
</p>
</div>
<div class="text-center mt-6">
<h1 class="text-2xl sm:text-3xl font-black text-slate-900 tracking-tight">
Eliminación de Cuenta y Supresión de Datos
</h1>
<p class="text-sm sm:text-base text-slate-600 mt-2 max-w-xl mx-auto">
Transparencia y control absoluto sobre tu información conforme a las políticas de privacidad y requisitos de Google Play Store y Apple App Store.
</p>
</div>
</header>
<!-- TARJETA INFORMATIVA PRINCIPAL -->
@@ -133,11 +148,15 @@
</select>
</div>
<div class="pt-2">
<button type="submit" id="btnSubmitWebDel" class="w-full sm:w-auto px-6 py-3 bg-rose-600 hover:bg-rose-700 text-white font-black text-sm rounded-xl shadow-sm transition-all flex items-center justify-center gap-2">
<div class="pt-2 flex flex-col sm:flex-row items-center gap-3">
<button type="submit" id="btnSubmitWebDel" class="w-full sm:w-auto px-6 py-3 bg-rose-600 hover:bg-rose-700 text-white font-black text-sm rounded-xl shadow-sm transition-all flex items-center justify-center gap-2 cursor-pointer">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/></svg>
<span>Solicitar Eliminación Definitiva</span>
</button>
<button type="button" onclick="manejarRetornoApp(event)" class="w-full sm:w-auto px-6 py-3 bg-white border border-slate-300 hover:bg-slate-100 text-slate-700 font-bold text-sm rounded-xl transition-all flex items-center justify-center gap-2 cursor-pointer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="m15 18-6-6 6-6"/></svg>
<span class="txtRetornoApp">Cancelar y Regresar a la Aplicación</span>
</button>
</div>
<div id="msgWebResult" class="hidden p-4 rounded-xl text-xs font-bold mt-3"></div>
@@ -184,19 +203,63 @@
</div>
<!-- PIE DE PÁGINA -->
<footer class="text-center text-xs text-slate-400 mt-8 space-y-2">
<footer class="text-center text-xs text-slate-400 mt-8 space-y-3">
<div class="flex justify-center pb-2">
<a href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-black text-white bg-sky-600 hover:bg-sky-700 transition shadow-sm cursor-pointer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
<span class="txtRetornoApp">Regresar a la Aplicación SiboPay</span>
</a>
</div>
<p>SiboPay Costa Rica • Sistema inteligente de billetera online</p>
<p>Consultas sobre privacidad y derechos ARCO: <a href="mailto:[email protected]" class="text-sky-600 hover:underline font-bold">[email protected]</a></p>
<div class="pt-2">
<a href="/legal" class="text-slate-500 hover:text-slate-800 underline mx-2 font-semibold">Términos y Condiciones</a>
<div class="pt-1">
<a href="/legal?from=app" class="text-slate-500 hover:text-slate-800 underline mx-2 font-semibold">Términos y Condiciones</a>
<span>•</span>
<a href="/privacidad" class="text-slate-500 hover:text-slate-800 underline mx-2 font-semibold">Política de Privacidad</a>
<a href="/privacidad?from=app" class="text-slate-500 hover:text-slate-800 underline mx-2 font-semibold">Política de Privacidad</a>
</div>
</footer>
</main>
<script>
function detectarOrigen() {
const params = new URLSearchParams(window.location.search);
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
const btnReturn = document.getElementById('btnNavReturn');
const txtReturn = document.getElementById('txtNavReturn');
const btnLanding = document.getElementById('btnNavLanding');
const txtsAll = document.querySelectorAll('.txtRetornoApp');
if (isFromApp) {
if (txtReturn) txtReturn.textContent = 'Volver a la App';
if (btnReturn) btnReturn.href = '/app';
if (btnLanding) btnLanding.classList.add('hidden');
txtsAll.forEach(el => el.textContent = 'Cancelar y Regresar a la Aplicación');
} else {
if (txtReturn) txtReturn.textContent = 'Ingresar a la App';
if (btnReturn) btnReturn.href = '/app';
if (btnLanding) btnLanding.classList.remove('hidden');
txtsAll.forEach(el => el.textContent = 'Ir a la Aplicación SiboPay');
}
}
function manejarRetornoApp(e) {
if (e) e.preventDefault();
const params = new URLSearchParams(window.location.search);
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
if (isFromApp && window.history.length > 1) {
window.history.back();
setTimeout(() => {
window.location.href = '/app';
}, 250);
} else {
window.location.href = '/app';
}
}
window.addEventListener('DOMContentLoaded', detectarOrigen);
async function enviarSolicitudWeb(e) {
e.preventDefault();
const btn = document.getElementById('btnSubmitWebDel');
+3 -3
View File
@@ -3301,10 +3301,10 @@
<!-- Enlaces de Políticas y Privacidad -->
<div style="margin-bottom: 18px; padding-top: 4px; border-top: 1px solid var(--border);">
<div style="display: flex; gap: 8px; justify-content: space-between; margin-top: 8px;">
<a href="/privacidad" target="_blank" style="font-size: 0.75rem; color: #0284c7; text-decoration: underline; font-weight: 700;">
<a href="/privacidad?from=app" style="font-size: 0.75rem; color: #0284c7; text-decoration: underline; font-weight: 700;">
Política de Privacidad
</a>
<a href="/legal" target="_blank" style="font-size: 0.75rem; color: #0284c7; text-decoration: underline; font-weight: 700;">
<a href="/legal?from=app" style="font-size: 0.75rem; color: #0284c7; text-decoration: underline; font-weight: 700;">
Términos de Servicio
</a>
</div>
@@ -3323,7 +3323,7 @@
<span>Eliminar mi Cuenta y Datos</span>
</button>
<div style="text-align: center; margin-top: 10px;">
<a href="/eliminar-cuenta" target="_blank" style="font-size: 0.72rem; color: #dc2626; text-decoration: underline; font-weight: 700;">
<a href="/eliminar-cuenta?from=app" style="font-size: 0.72rem; color: #dc2626; text-decoration: underline; font-weight: 700;">
O abre el formulario web oficial: sibopay.com/eliminar-cuenta
</a>
</div>
+54 -7
View File
@@ -68,20 +68,24 @@
<!-- NAVEGACIÓN SUPERIOR MINIMALISTA -->
<header class="max-w-4xl mx-auto mb-6 flex items-center justify-between no-print">
<a href="/landing" class="flex items-center gap-3 group">
<a href="/app" id="linkLogoLegal" onclick="manejarRetornoApp(event)" class="flex items-center gap-3 group">
<img src="/img/sibopay-emblem.png" alt="SiboPay" class="w-10 h-10 object-contain drop-shadow-sm group-hover:scale-105 transition-transform">
<span class="text-2xl font-black tracking-tight text-slate-900">Sibo<span class="text-sky-600">Pay</span></span>
</a>
<div class="flex items-center gap-3">
<div class="flex items-center gap-2 sm:gap-3">
<button onclick="window.print()" class="hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-bold text-slate-600 bg-white border border-slate-200 hover:bg-slate-50 transition">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 6 2 18 2 18 9"/><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><rect x="6" y="14" width="12" height="8"/></svg>
<span>Imprimir</span>
</button>
<a href="/landing" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-lg text-xs font-bold text-slate-700 bg-white border border-slate-200 hover:text-slate-900 transition">
<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="m15 18-6-6 6-6"/></svg>
<span>Volver al inicio</span>
<a id="btnNavReturn" href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-black text-slate-800 bg-white border border-slate-200 hover:bg-slate-50 transition shadow-sm">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
<span id="txtNavReturn">Volver a la App</span>
</a>
<a id="btnNavLanding" href="/" class="hidden inline-flex items-center gap-1 px-3 py-2 rounded-xl text-xs font-semibold text-slate-500 hover:text-slate-800 transition">
<span>Inicio</span>
</a>
</div>
</header>
@@ -357,7 +361,13 @@
</article>
<!-- PIE DEL DOCUMENTO / HOJA FORMAL -->
<div class="mt-12 pt-6 border-t border-slate-200 text-center text-xs text-slate-500 space-y-2">
<div class="mt-12 pt-6 border-t border-slate-200 text-center text-xs text-slate-500 space-y-3">
<div class="flex justify-center pb-2">
<a href="/app" onclick="manejarRetornoApp(event)" class="inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-xs font-black text-white bg-sky-600 hover:bg-sky-700 transition shadow-sm cursor-pointer">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="m15 18-6-6 6-6"/></svg>
<span class="txtRetornoApp">Regresar a la Aplicación SiboPay</span>
</a>
</div>
<div class="flex items-center justify-center gap-3 font-medium text-slate-600">
<span>SiboPay Costa Rica</span>
<span>•</span>
@@ -373,6 +383,42 @@
<!-- LÓGICA DE INTERCAMBIO ENTRE PESTAÑAS Y URL HASH -->
<script>
function detectarOrigen() {
const params = new URLSearchParams(window.location.search);
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
const btnReturn = document.getElementById('btnNavReturn');
const txtReturn = document.getElementById('txtNavReturn');
const btnLanding = document.getElementById('btnNavLanding');
const txtsAll = document.querySelectorAll('.txtRetornoApp');
if (isFromApp) {
if (txtReturn) txtReturn.textContent = 'Volver a la App';
if (btnReturn) btnReturn.href = '/app';
if (btnLanding) btnLanding.classList.add('hidden');
txtsAll.forEach(el => el.textContent = 'Regresar a la Aplicación SiboPay');
} else {
if (txtReturn) txtReturn.textContent = 'Ingresar a la App';
if (btnReturn) btnReturn.href = '/app';
if (btnLanding) btnLanding.classList.remove('hidden');
txtsAll.forEach(el => el.textContent = 'Ir a la Aplicación SiboPay');
}
}
function manejarRetornoApp(e) {
if (e) e.preventDefault();
const params = new URLSearchParams(window.location.search);
const isFromApp = params.get('from') === 'app' || document.referrer.includes('/app') || document.referrer.includes('sibopay.com/app');
if (isFromApp && window.history.length > 1) {
window.history.back();
setTimeout(() => {
window.location.href = '/app';
}, 250);
} else {
window.location.href = '/app';
}
}
function switchLegalDoc(docType) {
const btnTerminos = document.getElementById('tabBtnTerminos');
const btnPrivacidad = document.getElementById('tabBtnPrivacidad');
@@ -398,8 +444,9 @@
window.scrollTo({ top: 0, behavior: 'smooth' });
}
// Inicializar según ruta o hash
// Inicializar según ruta o hash y detectar origen
window.addEventListener('DOMContentLoaded', () => {
detectarOrigen();
const path = window.location.pathname.toLowerCase();
const hash = window.location.hash.toLowerCase();