diff --git a/www/js/app.js b/www/js/app.js index 7555684..4c636ef 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -89,8 +89,11 @@ function addnavbarbtn(screenid, icon, title) { } /** - * Hide the back arrow if screenid === false, otherwise show it and have it open screenid - * @param String screenid The ID of the screen to open when pressed. + * Set the navbar options. + * + * @param String title Text to display + * @param boolean showarrow True if the back arrow should be visible + * @param Stringn backscreen The screen to open when the title is pressed, false or null for none * @returns {undefined} */ function setnavbartitle(title, showarrow, backscreen) { @@ -153,7 +156,7 @@ function setnavbar(type, screentitle, returnscreen) { break; case "otp": setnavbartitle("Auth Keys", true, "home"); - addnavbarbtn("addotp", "ic_add.svg", "Add Code"); + addnavbarbtn("addotp", "ic_add.svg", "Add Key"); break; case "app": setnavbartitle(screentitle, true, returnscreen); diff --git a/www/views/settings.html b/www/views/settings.html index 9b5c067..74e0884 100644 --- a/www/views/settings.html +++ b/www/views/settings.html @@ -1,6 +1,14 @@ +
+
+

Not logged in

+ Pairing Code: None
+ Server: None +
+
+
Update Password @@ -125,4 +133,19 @@ cordova.getAppVersion.getVersionCode(function (version) { $('#app_version_code').text(version); }); + + if (localStorage.getItem("username")) { + $("#username").text(localStorage.getItem("username")); + } + if (localStorage.getItem("key")) { + var key = localStorage.getItem("key"); + var stars = ""; + for (var i = 0; i < key.length - 6; i++) { + stars += "*"; + } + $("#pairingkey").text(key.slice(0, 3) + stars + key.slice(-3)); + } + if (localStorage.getItem("syncurl")) { + $("#syncurl").text(localStorage.getItem("syncurl").replace("/mobile/index.php", "")); + }