Skip to content

Commit 6e07b57

Browse files
committed
Add deprecation notice modal to inform users about future app changes
1 parent 966923c commit 6e07b57

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

content/wardrive.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6910,6 +6910,35 @@ export async function onLoad() {
69106910
setupInfoModal('powerInfoLink', 'powerModal', 'Radio Power');
69116911
setupInfoModal('carpeaterInfoLink', 'carpeaterModal', 'Carpeater');
69126912

6913+
// Show deprecation notice modal on first page load
6914+
const noticeModal = document.getElementById('noticeModal');
6915+
const noticeModalOk = document.getElementById('noticeModalOk');
6916+
const NOTICE_STORAGE_KEY = 'meshmapper_notice_seen';
6917+
6918+
if (noticeModal && noticeModalOk) {
6919+
// Check if user has already seen the notice
6920+
const noticeSeen = localStorage.getItem(NOTICE_STORAGE_KEY);
6921+
if (!noticeSeen) {
6922+
debugLog('[UI] Showing deprecation notice modal (first visit)');
6923+
noticeModal.classList.remove('hidden');
6924+
}
6925+
6926+
// Handle OK button click
6927+
noticeModalOk.addEventListener('click', () => {
6928+
debugLog('[UI] Notice modal OK clicked');
6929+
localStorage.setItem(NOTICE_STORAGE_KEY, 'true');
6930+
noticeModal.classList.add('hidden');
6931+
});
6932+
6933+
// Close modal when clicking backdrop
6934+
noticeModal.addEventListener('click', (e) => {
6935+
if (e.target === noticeModal) {
6936+
debugLog('[UI] Notice modal closed via backdrop click');
6937+
localStorage.setItem(NOTICE_STORAGE_KEY, 'true');
6938+
noticeModal.classList.add('hidden');
6939+
}
6940+
});
6941+
}
69136942

69146943
// Prompt location permission early (optional)
69156944
debugLog("[GPS] Requesting initial location permission");

index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,27 @@ <h2 class="text-sm font-medium text-slate-300">Notes</h2>
441441
onLoad();
442442
</script>
443443

444+
<!-- Deprecation Notice Modal -->
445+
<div id="noticeModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
446+
<div class="bg-slate-800 rounded-lg shadow-xl max-w-md w-full border border-slate-700">
447+
<div class="p-6">
448+
<div class="flex justify-between items-start mb-4">
449+
<h3 class="text-lg font-semibold text-amber-400">Notice</h3>
450+
</div>
451+
<div class="space-y-3 text-sm text-slate-300">
452+
<p>The MeshMapper web app will be deprecated in the future once the Android and iOS apps are released publicly on the app stores.</p>
453+
<p>If you want to take part in the beta testing, please join the MeshMapper Discord for more info and live updates:</p>
454+
<a href="https://discord.gg/D26P6c6QmG" target="_blank" rel="noopener noreferrer" class="block text-center py-2 px-4 bg-indigo-600 hover:bg-indigo-700 text-white rounded-lg transition-colors">
455+
Join Discord Server
456+
</a>
457+
</div>
458+
<button id="noticeModalOk" class="mt-4 w-full px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg transition-colors">
459+
OK
460+
</button>
461+
</div>
462+
</div>
463+
</div>
464+
444465
<!-- Override Confirmation Modal -->
445466
<div id="overrideModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
446467
<div class="bg-slate-800 rounded-lg shadow-xl max-w-sm w-full border border-slate-600">

0 commit comments

Comments
 (0)