From 80ec05340848a879eab2d6a8858414c07f38f8dd Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 14 Jun 2019 22:58:37 -0600 Subject: [PATCH] Bugfixes: close #22, fix API signin, bump version to 2.0.1 --- config.xml | 6 +++--- www/js/api.js | 12 ++++++++---- www/js/platform.js | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/config.xml b/config.xml index e9e1e40..cd92af0 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + TerranQuest A mobile augmented reality fantasy game. @@ -19,7 +19,7 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/www/js/api.js b/www/js/api.js index 33aef1b..08b1984 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -80,8 +80,10 @@ function checkClientVersion(success, failure) { * @return {undefined} */ function callAPI(action, data, success, failure) { - data.username = localStorage.getItem("username"); - data.password = localStorage.getItem("password"); + if (typeof data.username == "undefined" && typeof data.password == "undefined") { + data.username = localStorage.getItem("username"); + data.password = localStorage.getItem("password"); + } return $.ajax({ type: 'POST', dataType: 'json', @@ -133,8 +135,10 @@ function callAPI(action, data, success, failure) { * @return {undefined} */ function callAPIRawResponse(action, data, success, failure) { - data.username = localStorage.getItem("username"); - data.password = localStorage.getItem("password"); + if (typeof data.username == "undefined" && typeof data.password == "undefined") { + data.username = localStorage.getItem("username"); + data.password = localStorage.getItem("password"); + } return $.ajax({ type: 'POST', url: getActionUrl(action), diff --git a/www/js/platform.js b/www/js/platform.js index 0833f41..d6fb4ac 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -118,7 +118,7 @@ function initCordova() { // height is incorrectly set to 0px, causing the clock and icons to overlap // on the TerranQuest UI. document.addEventListener("deviceready", function () { - if (device.platform == "Android" && device.version == "8.0.0" && getComputedStyle(document.documentElement).getPropertyValue('--f7-statusbar-height') == "0px") { + if (device.platform == "Android" && device.version.startsWith("8.0") && getComputedStyle(document.documentElement).getPropertyValue('--f7-statusbar-height').startsWith("0")) { document.documentElement.style.setProperty('--f7-statusbar-height', '24px'); } }, false);