Show username, partial pairing key, and server URL in Settings
This commit is contained in:
parent
41fe24aaac
commit
c2916076ad
@ -89,8 +89,11 @@ function addnavbarbtn(screenid, icon, title) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the back arrow if screenid === false, otherwise show it and have it open screenid
|
* Set the navbar options.
|
||||||
* @param String screenid The ID of the screen to open when pressed.
|
*
|
||||||
|
* @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}
|
* @returns {undefined}
|
||||||
*/
|
*/
|
||||||
function setnavbartitle(title, showarrow, backscreen) {
|
function setnavbartitle(title, showarrow, backscreen) {
|
||||||
@ -153,7 +156,7 @@ function setnavbar(type, screentitle, returnscreen) {
|
|||||||
break;
|
break;
|
||||||
case "otp":
|
case "otp":
|
||||||
setnavbartitle("Auth Keys", true, "home");
|
setnavbartitle("Auth Keys", true, "home");
|
||||||
addnavbarbtn("addotp", "ic_add.svg", "Add Code");
|
addnavbarbtn("addotp", "ic_add.svg", "Add Key");
|
||||||
break;
|
break;
|
||||||
case "app":
|
case "app":
|
||||||
setnavbartitle(screentitle, true, returnscreen);
|
setnavbartitle(screentitle, true, returnscreen);
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
<div class="list-group">
|
||||||
|
<div class="list-group-item">
|
||||||
|
<h4><i class="fa fa-user"></i> <span id="username">Not logged in</span></h4>
|
||||||
|
<i class="fa fa-key"></i> Pairing Code: <span id="pairingkey">None</span><br />
|
||||||
|
<i class="fa fa-server"></i> Server: <span id="syncurl">None</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<div class="list-group-item" onclick="updatepassword()">
|
<div class="list-group-item" onclick="updatepassword()">
|
||||||
<b>Update Password</b>
|
<b>Update Password</b>
|
||||||
@ -125,4 +133,19 @@
|
|||||||
cordova.getAppVersion.getVersionCode(function (version) {
|
cordova.getAppVersion.getVersionCode(function (version) {
|
||||||
$('#app_version_code').text(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", ""));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user