feat(support): add Stripe developer support tab & modal with , , , and custom tiers (v16)
This commit is contained in:
+251
@@ -227,6 +227,44 @@ body {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Developer Support Pill in Navbar */
|
||||
.nav-support-btn {
|
||||
background: rgba(239, 68, 68, 0.12);
|
||||
border: 1px solid rgba(239, 68, 68, 0.35);
|
||||
color: #fca5a5;
|
||||
box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
|
||||
}
|
||||
|
||||
.nav-support-btn:hover {
|
||||
background: rgba(239, 68, 68, 0.24);
|
||||
border-color: #ef4444;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
|
||||
}
|
||||
|
||||
.support-heart-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: #ef4444;
|
||||
animation: heartPulse 2.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes heartPulse {
|
||||
0%, 100% { transform: scale(1); }
|
||||
50% { transform: scale(1.24); filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.9)); }
|
||||
}
|
||||
|
||||
.btn-support-highlight {
|
||||
background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2)) !important;
|
||||
border: 1px solid rgba(239, 68, 68, 0.4) !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.btn-support-highlight svg {
|
||||
color: #ef4444;
|
||||
animation: heartPulse 2.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -3197,5 +3235,218 @@ body {
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
DEVELOPER SUPPORT & STRIPE INTEGRATION STYLES
|
||||
========================================================================== */
|
||||
.support-dialog {
|
||||
max-width: 860px;
|
||||
background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.95), rgba(10, 14, 23, 0.98));
|
||||
border: 1px solid rgba(245, 158, 11, 0.35);
|
||||
box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.15);
|
||||
}
|
||||
|
||||
.support-modal-header {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.support-dev-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: rgba(239, 68, 68, 0.14);
|
||||
border: 1px solid rgba(239, 68, 68, 0.35);
|
||||
border-radius: 9999px;
|
||||
padding: 3px 10px;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: #fca5a5;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.support-intro-text {
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.6;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.support-tiers-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
@media (max-width: 820px) {
|
||||
.support-tiers-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.support-tiers-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.support-tier-card {
|
||||
background: rgba(15, 23, 42, 0.65);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 16px;
|
||||
padding: 20px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.support-tier-card:hover {
|
||||
transform: translateY(-4px);
|
||||
border-color: var(--accent-cyan);
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(6, 182, 212, 0.2);
|
||||
}
|
||||
|
||||
.support-tier-card.tier-featured {
|
||||
background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.85));
|
||||
border: 1.5px solid #f59e0b;
|
||||
box-shadow: 0 8px 24px rgba(245, 158, 11, 0.18);
|
||||
}
|
||||
|
||||
.support-tier-card.tier-featured:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 14px 30px rgba(245, 158, 11, 0.35);
|
||||
border-color: #fbbf24;
|
||||
}
|
||||
|
||||
.tier-popular-ribbon {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 12px;
|
||||
background: linear-gradient(135deg, #f59e0b, #d97706);
|
||||
color: #07090e;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
padding: 2px 8px;
|
||||
border-radius: 9999px;
|
||||
letter-spacing: 0.05em;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.tier-badge-label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.support-tier-card.tier-featured .tier-badge-label {
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
.tier-amount {
|
||||
font-family: var(--font-heading);
|
||||
font-size: 2.2rem;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
line-height: 1;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.tier-desc {
|
||||
font-size: 0.78rem;
|
||||
color: #94a3b8;
|
||||
line-height: 1.45;
|
||||
margin-bottom: 18px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn-support-tier {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
padding: 10px 14px;
|
||||
border-radius: 10px;
|
||||
font-weight: 700;
|
||||
font-size: 0.85rem;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
color: #ffffff;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.support-tier-card:hover .btn-support-tier {
|
||||
background: rgba(6, 182, 212, 0.2);
|
||||
border-color: var(--accent-cyan);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-support-tier.btn-featured {
|
||||
background: linear-gradient(135deg, #f59e0b, #eab308);
|
||||
color: #07090e;
|
||||
border: none;
|
||||
box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
|
||||
}
|
||||
|
||||
.support-tier-card:hover .btn-support-tier.btn-featured {
|
||||
background: linear-gradient(135deg, #fbbf24, #f59e0b);
|
||||
box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
|
||||
}
|
||||
|
||||
.btn-support-tier.btn-custom {
|
||||
background: rgba(6, 182, 212, 0.15);
|
||||
border-color: rgba(6, 182, 212, 0.4);
|
||||
color: #38bdf8;
|
||||
}
|
||||
|
||||
.support-security-footer {
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.security-badges-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
gap: 12px;
|
||||
font-size: 0.78rem;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.sec-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.sec-item svg {
|
||||
color: var(--accent-cyan);
|
||||
}
|
||||
|
||||
.verified-supporter-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.2));
|
||||
border: 1px solid #f59e0b;
|
||||
color: #fbbf24;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
padding: 2px 8px;
|
||||
border-radius: 9999px;
|
||||
margin-left: 6px;
|
||||
box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+111
-6
@@ -54,7 +54,7 @@
|
||||
<meta name="apple-mobile-web-app-title" content="FlockRadar">
|
||||
|
||||
<!-- Main Stylesheet -->
|
||||
<link rel="stylesheet" href="css/styles.css?v=15">
|
||||
<link rel="stylesheet" href="css/styles.css?v=16">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -104,6 +104,15 @@
|
||||
<span class="nav-text-desktop">National Directory (1,439)</span>
|
||||
<span class="nav-text-mobile">Directory</span>
|
||||
</button>
|
||||
<button id="nav-support-btn" class="nav-mode-btn nav-support-btn" role="tab" aria-selected="false" title="Help support FlockRadar development ($10, $20, $50)">
|
||||
<span class="mode-icon support-heart-icon">
|
||||
<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="nav-text-desktop">Help Support Developer</span>
|
||||
<span class="nav-text-mobile">Support</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -306,6 +315,11 @@
|
||||
<span>Dashboard Fullscreen</span>
|
||||
</button>
|
||||
|
||||
<button id="btn-drawer-support" class="btn-hud-action btn-support-highlight" title="Help support FlockRadar development ($10, $20, $50)">
|
||||
<svg class="flock-svg" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>
|
||||
<span>Help Support Developer</span>
|
||||
</button>
|
||||
|
||||
<button id="btn-test-camera" class="btn-hud-action" title="Drop a test camera 400ft ahead of your current location to test proximity alerts">
|
||||
<svg class="flock-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
|
||||
<span>Place Camera 400ft Ahead</span>
|
||||
@@ -1146,6 +1160,97 @@
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<!-- ========================================================================
|
||||
MODAL 6: DEVELOPER SUPPORT & STRIPE INTEGRATION (<dialog>)
|
||||
======================================================================== -->
|
||||
<dialog id="support-modal" class="agency-dialog support-dialog" aria-labelledby="support-modal-title">
|
||||
<div class="modal-header support-modal-header">
|
||||
<div class="modal-header-titles">
|
||||
<div class="support-dev-pill">
|
||||
<span class="support-heart-icon">
|
||||
<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>
|
||||
</span>
|
||||
<span>Independent Developer Support</span>
|
||||
</div>
|
||||
<h2 id="support-modal-title" class="modal-agency-name">Help Support This Developer</h2>
|
||||
<div class="modal-agency-meta">Fuel real-time camera tracking, nationwide scrapers, and independent ALPR transparency</div>
|
||||
</div>
|
||||
<button id="support-close-btn" class="close-modal-btn" aria-label="Close modal">
|
||||
<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body support-modal-body">
|
||||
<p class="support-intro-text">
|
||||
FlockRadar is 100% independently coded, researched, and maintained. Your direct support pays for continuous municipal portal scraping, real-time audio radar servers, GPS algorithms, and hardware photo hosting.
|
||||
</p>
|
||||
|
||||
<div class="support-tiers-grid">
|
||||
<!-- $10 Tier -->
|
||||
<a href="https://buy.stripe.com/5kQ14ne6j0uG8gPeVveME0p" target="_blank" rel="noopener noreferrer" class="support-tier-card">
|
||||
<div class="tier-badge-label">Radar Coffee</div>
|
||||
<div class="tier-amount">$10</div>
|
||||
<div class="tier-desc">Covers daily portal scrapers and keeps server infrastructure running smoothly.</div>
|
||||
<div class="btn-support-tier">
|
||||
<span>Support $10</span>
|
||||
<svg class="flock-svg flock-svg-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- $20 Tier (Popular) -->
|
||||
<a href="https://buy.stripe.com/bJeaEX2nB5P02Wv5kVeME0q" target="_blank" rel="noopener noreferrer" class="support-tier-card tier-featured">
|
||||
<div class="tier-popular-ribbon">Most Popular</div>
|
||||
<div class="tier-badge-label">Active Contributor</div>
|
||||
<div class="tier-amount">$20</div>
|
||||
<div class="tier-desc">Directly funds real-time audio radar alerts, walking/driving GPS tracking, and mobile updates.</div>
|
||||
<div class="btn-support-tier btn-featured">
|
||||
<span>Support $20</span>
|
||||
<svg class="flock-svg flock-svg-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- $50 Tier -->
|
||||
<a href="https://buy.stripe.com/aFabJ12nB1yK8gPeVveME0r" target="_blank" rel="noopener noreferrer" class="support-tier-card">
|
||||
<div class="tier-badge-label">Champion Sponsor</div>
|
||||
<div class="tier-amount">$50</div>
|
||||
<div class="tier-desc">Sponsors nationwide ALPR expansion, verified camera hardware proof storage, and full-time coding.</div>
|
||||
<div class="btn-support-tier">
|
||||
<span>Support $50</span>
|
||||
<svg class="flock-svg flock-svg-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- Custom Amount -->
|
||||
<a href="https://buy.stripe.com/bJe9AT1jxfpA2Wv28JeME0s" target="_blank" rel="noopener noreferrer" class="support-tier-card tier-custom">
|
||||
<div class="tier-badge-label">Custom Amount</div>
|
||||
<div class="tier-amount">Any $</div>
|
||||
<div class="tier-desc">Choose your own custom contribution amount to support development ($5 min).</div>
|
||||
<div class="btn-support-tier btn-custom">
|
||||
<span>Choose Amount</span>
|
||||
<svg class="flock-svg flock-svg-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 18 15 12 9 6"/></svg>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="support-security-footer">
|
||||
<div class="security-badges-row">
|
||||
<div class="sec-item">
|
||||
<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
||||
<span>Secured by <strong>Stripe</strong></span>
|
||||
</div>
|
||||
<div class="sec-item">
|
||||
<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>
|
||||
<span>Apple Pay & Google Pay Supported</span>
|
||||
</div>
|
||||
<div class="sec-item">
|
||||
<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 14 14"/></svg>
|
||||
<span>Instant 1-Click Contribution</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<!-- Hidden Native Camera / File Input for Mobile Evidence Snapping -->
|
||||
<input type="file" id="camera-photo-file-input" accept="image/*" capture="environment" style="display: none;">
|
||||
|
||||
@@ -1156,11 +1261,11 @@
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
|
||||
|
||||
<!-- Data & Application Logic with Cache Busting -->
|
||||
<script src="data/portals.js?v=15"></script>
|
||||
<script src="js/icons.js?v=15"></script>
|
||||
<script src="js/auth.js?v=15"></script>
|
||||
<script src="js/radar.js?v=15"></script>
|
||||
<script src="js/app.js?v=15"></script>
|
||||
<script src="data/portals.js?v=16"></script>
|
||||
<script src="js/icons.js?v=16"></script>
|
||||
<script src="js/auth.js?v=16"></script>
|
||||
<script src="js/radar.js?v=16"></script>
|
||||
<script src="js/app.js?v=16"></script>
|
||||
|
||||
<!-- Service Worker Instant Cache Invalidation -->
|
||||
<script>
|
||||
|
||||
+57
@@ -154,11 +154,15 @@
|
||||
// Modals
|
||||
loginModal: document.getElementById('login-modal'),
|
||||
reportModal: document.getElementById('report-modal'),
|
||||
supportModal: document.getElementById('support-modal'),
|
||||
loginForm: document.getElementById('login-form'),
|
||||
reportForm: document.getElementById('report-form'),
|
||||
loginCloseBtn: document.getElementById('login-close-btn'),
|
||||
reportCloseBtn: document.getElementById('report-close-btn'),
|
||||
supportCloseBtn: document.getElementById('support-close-btn'),
|
||||
loginGuestBtn: document.getElementById('login-guest-btn'),
|
||||
navSupportBtn: document.getElementById('nav-support-btn'),
|
||||
btnDrawerSupport: document.getElementById('btn-drawer-support'),
|
||||
|
||||
// Hardware Proof & Verification Modals
|
||||
cameraDetailModal: document.getElementById('camera-detail-modal'),
|
||||
@@ -228,6 +232,7 @@
|
||||
setupHud();
|
||||
bindEvents();
|
||||
updateProfileDisplay();
|
||||
checkSupporterReturn();
|
||||
|
||||
// Auto-detect real location immediately (Palmdale / GPS)
|
||||
attemptAutoLocate();
|
||||
@@ -1412,22 +1417,58 @@
|
||||
// --- USER PROFILE & LOGIN MODAL ---
|
||||
function updateProfileDisplay() {
|
||||
const user = window.FlockAuth ? window.FlockAuth.getUser() : null;
|
||||
const isSupporter = localStorage.getItem('flock_is_supporter') === 'true';
|
||||
const supporterBadge = isSupporter ? `<span class="verified-supporter-badge" title="Verified Supporter">⭐ Supporter</span>` : '';
|
||||
|
||||
if (user && user.isLoggedIn) {
|
||||
const carSvg = window.FlockIcons ? FlockIcons.car('flock-svg-sm') : '';
|
||||
el.userProfilePill.innerHTML = `
|
||||
<span class="avatar-dot">${carSvg}</span>
|
||||
<span>${escapeHtml(user.username)}</span>
|
||||
<span class="points-badge">${user.points} pts</span>
|
||||
${supporterBadge}
|
||||
`;
|
||||
} else {
|
||||
const userSvg = `<svg class="flock-svg flock-svg-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>`;
|
||||
el.userProfilePill.innerHTML = `
|
||||
<span class="avatar-dot">${userSvg}</span>
|
||||
<span>Driver Login</span>
|
||||
${supporterBadge}
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
function checkSupporterReturn() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.get('support') === 'success') {
|
||||
localStorage.setItem('flock_is_supporter', 'true');
|
||||
updateProfileDisplay();
|
||||
setTimeout(() => {
|
||||
playRadarChime();
|
||||
speakVoiceAlert('Thank you so much for supporting FlockRadar development!');
|
||||
showToast('🎉 Thank you for your contribution! You are now a Verified Supporter.');
|
||||
}, 500);
|
||||
window.history.replaceState({}, document.title, window.location.pathname);
|
||||
}
|
||||
}
|
||||
|
||||
// --- DEVELOPER SUPPORT MODAL ---
|
||||
function openSupportModal() {
|
||||
if (typeof el.supportModal.showModal === 'function') {
|
||||
el.supportModal.showModal();
|
||||
} else {
|
||||
el.supportModal.setAttribute('open', '');
|
||||
}
|
||||
}
|
||||
|
||||
function closeSupportModal() {
|
||||
if (typeof el.supportModal.close === 'function') {
|
||||
el.supportModal.close();
|
||||
} else {
|
||||
el.supportModal.removeAttribute('open');
|
||||
}
|
||||
}
|
||||
|
||||
function openLoginModal() {
|
||||
const user = window.FlockAuth ? window.FlockAuth.getUser() : null;
|
||||
if (user && user.isLoggedIn) {
|
||||
@@ -2263,6 +2304,22 @@
|
||||
// Modal Close buttons
|
||||
el.loginCloseBtn.addEventListener('click', closeLoginModal);
|
||||
el.reportCloseBtn.addEventListener('click', closeReportModal);
|
||||
if (el.supportCloseBtn) el.supportCloseBtn.addEventListener('click', closeSupportModal);
|
||||
|
||||
// Developer Support Modal Triggers
|
||||
if (el.navSupportBtn) {
|
||||
el.navSupportBtn.addEventListener('click', openSupportModal);
|
||||
}
|
||||
if (el.btnDrawerSupport) {
|
||||
el.btnDrawerSupport.addEventListener('click', () => {
|
||||
openSupportModal();
|
||||
});
|
||||
}
|
||||
if (el.supportModal) {
|
||||
el.supportModal.addEventListener('click', e => {
|
||||
if (e.target === el.supportModal) closeSupportModal();
|
||||
});
|
||||
}
|
||||
|
||||
// Global listener for camera & portal inspection: NEVER switches views away from radar!
|
||||
window.inspectPortal = function(slug) {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
// Service Worker for FlockRadar Offline Driving & Live Updates
|
||||
const CACHE_NAME = 'flockradar-v15';
|
||||
const CACHE_NAME = 'flockradar-v16';
|
||||
const ASSETS_TO_CACHE = [
|
||||
'./',
|
||||
'./index.html',
|
||||
'./css/styles.css?v=15',
|
||||
'./js/icons.js?v=15',
|
||||
'./js/app.js?v=15',
|
||||
'./js/auth.js?v=15',
|
||||
'./js/radar.js?v=15',
|
||||
'./data/portals.js?v=15',
|
||||
'./favicon.svg?v=15',
|
||||
'./favicon.ico?v=15',
|
||||
'./apple-touch-icon.png?v=15',
|
||||
'./icon-192.png?v=15',
|
||||
'./icon-512.png?v=15',
|
||||
'./og-image.png?v=15',
|
||||
'./css/styles.css?v=16',
|
||||
'./js/icons.js?v=16',
|
||||
'./js/app.js?v=16',
|
||||
'./js/auth.js?v=16',
|
||||
'./js/radar.js?v=16',
|
||||
'./data/portals.js?v=16',
|
||||
'./favicon.svg?v=16',
|
||||
'./favicon.ico?v=16',
|
||||
'./apple-touch-icon.png?v=16',
|
||||
'./icon-192.png?v=16',
|
||||
'./icon-512.png?v=16',
|
||||
'./og-image.png?v=16',
|
||||
'./assets/img/logo.svg',
|
||||
'./assets/img/flock_pole_cam_palmdale.jpg',
|
||||
'./manifest.json'
|
||||
|
||||
Reference in New Issue
Block a user