Permanently dismissable blue banner on first load. Closes #31

This commit is contained in:
Ian Renton
2025-10-07 20:04:32 +01:00
parent a83c787ffe
commit ff8cac274a
5 changed files with 43 additions and 15 deletions

View File

@@ -167,7 +167,7 @@ function loadOptions() {
// Populate the filters panel
$("#settings-container").append(generateFilterCard("DX Continent", "dx_continent", options["continents"]));
$("#settings-container").append(generateFilterCard("Sources", "source", options["spot_sources"]));
$("#settings-container").append(generateFilterCard("Sources", "source", options["alert_sources"]));
// Load settings from settings storage
loadSettings();

View File

@@ -403,6 +403,16 @@ function setUpEventListeners() {
});
}
// Display the intro box, unless the user has already dismissed it once.
function displayIntroBox() {
if (localStorage.getItem("intro-box-dismissed") == null) {
$("#intro-box").show();
}
$("#intro-box-dismiss").click(function() {
localStorage.setItem("intro-box-dismissed", true);
});
}
// Startup
$(document).ready(function() {
// Call loadOptions(), this will then trigger loading spots and setting up timers.
@@ -411,4 +421,6 @@ $(document).ready(function() {
setInterval(updateRefreshDisplay, 1000);
// Set up event listeners
setUpEventListeners();
// Display intro box
displayIntroBox();
});