Add setting toggle to hide account setup nag message (close #4)

master
Skylar Ittner 3 years ago
parent 9aecbbf7fd
commit 668c14029b

@ -26,4 +26,9 @@ $('.item-link[data-setting=mapsource] select').on("change", function () {
setStorage("mapsource", $('.item-link[data-setting=mapsource] select').val()); setStorage("mapsource", $('.item-link[data-setting=mapsource] select').val());
reloadMap(); reloadMap();
});
$('.item-content[data-setting=hideaccountnag] .toggle input').on("change", function () {
var checked = $(this).prop('checked');
setStorage("hideaccountnag", checked);
}); });

@ -29,7 +29,7 @@ var routes = [
}, },
async: function (routeTo, routeFrom, resolve, reject) { async: function (routeTo, routeFrom, resolve, reject) {
// Show a nag message if no account is set up // Show a nag message if no account is set up
var accountsetup = (inStorage("accountkey") && inStorage("phonenumber")); var accountsetup = (inStorage("accountkey") && inStorage("phonenumber")) || getStorage("hideaccountnag") == "true";
resolve({ resolve({
templateUrl: './pages/home.html' templateUrl: './pages/home.html'
}, { }, {
@ -333,6 +333,14 @@ var routes = [
selected: getStorage("animation") == "off" selected: getStorage("animation") == "off"
} }
] ]
},
{
setting: "hideaccountnag",
title: "Hide \"Finish Account Setup\"",
text: "",
toggle: true,
checked: getStorage("hideaccountnag") == "true",
onclick: ""
} }
]; ];
resolve({ resolve({

Loading…
Cancel
Save