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

This commit is contained in:
Skylar Ittner 2021-09-17 12:22:18 -06:00
parent 9aecbbf7fd
commit 668c14029b
2 changed files with 14 additions and 1 deletions

View File

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

View File

@ -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({