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());
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) {
// 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({
templateUrl: './pages/home.html'
}, {
@ -333,6 +333,14 @@ var routes = [
selected: getStorage("animation") == "off"
}
]
},
{
setting: "hideaccountnag",
title: "Hide \"Finish Account Setup\"",
text: "",
toggle: true,
checked: getStorage("hideaccountnag") == "true",
onclick: ""
}
];
resolve({

Loading…
Cancel
Save