Skip to content

Commit

Permalink
don't show again became a TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
kauevestena committed Dec 14, 2024
1 parent 52325a6 commit 81f942a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions routing/routing_demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,16 @@ <h4>still experimental, in the future optimized profiles are coming!</h4>
<p>Second click: End Point</p>
<p>(then start over)</p>
<h5>Keep in mind that it relies upon existing OSM data, so no-data islands can occur!</h5>
<div class="modal-footer">

<!-- TODO: Add checkbox for "Don't show again" -->
<!-- <div class="modal-footer">
<label>
<input type="checkbox" id="dontShowAgain">
Don't show this again
</label>
</div>
</div> -->


<div class="actions">
<button id="modalOkBtn">OK</button>
</div>
Expand Down Expand Up @@ -464,10 +468,14 @@ <h5>Keep in mind that it relies upon existing OSM data, so no-data islands can o
}

document.getElementById('modalOkBtn').addEventListener('click', () => {
const dontShowChecked = document.getElementById('dontShowAgain').checked;
if (dontShowChecked) {
localStorage.setItem('welcomeModalDontShow', 'true');
}

// TODO: Save dontShowAgain
// const dontShowChecked = document.getElementById('dontShowAgain').checked;
// if (dontShowChecked) {
// localStorage.setItem('welcomeModalDontShow', 'true');
// }


document.getElementById('welcomeModalOverlay').style.display = 'none';
});
</script>
Expand Down

0 comments on commit 81f942a

Please sign in to comment.