diff --git a/www/assets/js/settings.js b/www/assets/js/settings.js index d3be1b5..3e9eab5 100644 --- a/www/assets/js/settings.js +++ b/www/assets/js/settings.js @@ -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); }); \ No newline at end of file diff --git a/www/routes.js b/www/routes.js index 2c45e14..a3eb448 100644 --- a/www/routes.js +++ b/www/routes.js @@ -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({