diff --git a/html/settings/index.php b/html/settings/index.php index a3ea9c4..b9b409c 100644 --- a/html/settings/index.php +++ b/html/settings/index.php @@ -153,6 +153,18 @@ $body = <<
+
+
+ Who can view my inventory: +
+
+ +
+
Theme Settings
@@ -269,6 +281,14 @@ function successMessage(message) }, 1500); } +function updateInventoryPref(id) +{ + postJSONCDS("https://api.alphaland.cc/settings/update/inventoryprivacy", JSON.stringify({"preference": id})) + .done(function(object) { + successMessage("Updated"); + }); +} + function updatePrivacyJoinPref(id) { postJSONCDS("https://api.alphaland.cc/settings/update/joinprivacy", JSON.stringify({"preference": id})) @@ -307,6 +327,7 @@ function initializeSettings() $("#next_ref_regen").html("New keys available starting: " + object.referralkeyrefresh + ""); $('#settings_theme').val(object.theme); $('#settings_joinpref').val(object.joinpref); + $('#settings_inventorypref').val(object.inventorypref); if (object.twofactorenabled) { twofactorEnabled(); @@ -353,6 +374,7 @@ function generateKey() } }); } + function activeKeys() { initializeSettings(); diff --git a/html_api/settings/index.php b/html_api/settings/index.php index ecf8f28..d7ce26a 100644 --- a/html_api/settings/index.php +++ b/html_api/settings/index.php @@ -27,6 +27,7 @@ $username = getUsername($userquery->id); $blurb = $userquery->blurb; $email = Email::ObfuscateEmail($userquery->email); $verified = (bool)$userquery->verified; +$inventorypref = $userquery->privateInventory; $joinpref = $userquery->canJoin; $tradepref = null; $theme = $userquery->theme; @@ -44,6 +45,7 @@ $userInfo = array ( "twofactorenabled" => TwoFactor::Is2FAInitialized($userid), "referralprogram" => ReferralProgram::IsMember($userid), "referralkeyrefresh" => date("m/d/Y", ReferralProgram::NextRenewal($userid)), + "inventorypref" => $inventorypref, "joinpref" => $joinpref, "tradepref" => $tradepref, "theme" => $theme