From 78233a9f038ffcdebe9095be6ea077a56f1fe113 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Wed, 5 Jun 2019 02:27:02 -0600 Subject: [PATCH] Add Munzee oauth support (close #14) --- www/js/settings.js | 11 ++++++++++- www/settings.template.js | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/www/js/settings.js b/www/js/settings.js index ac300d2..a513e3a 100644 --- a/www/js/settings.js +++ b/www/js/settings.js @@ -11,10 +11,19 @@ var settings = [ title: "Use alternate map", text: "Replace the 3D map with a lightweight power-saving 2D version.", icon: "game-icon game-icon-treasure-map", - color: "green", + color: "yellow", type: "toggle", restart: true }, + { + setting: "munzee", + title: "Link Munzee account", + text: "Scan Munzee codes from inside TerranQuest.", + icon: "fas fa-qrcode", + color: "green", + onclick: "openBrowser('" + SETTINGS["munzee_url"] + "?username=" + localStorage.getItem("username") + "&password=" + localStorage.getItem("password") + "')", + type: "link" + }, { setting: "opensource", title: "Credits", diff --git a/www/settings.template.js b/www/settings.template.js index 40d3f9d..8bd2539 100644 --- a/www/settings.template.js +++ b/www/settings.template.js @@ -14,6 +14,8 @@ var SETTINGS = { map_style_json: "https://maps.netsyms.net/styles/terranquest-3d/style.json", map_pbf_url: "https://maps.netsyms.net/data/v3/{z}/{x}/{y}.pbf", stripe_pubkey: "", + munzee_url: "", + munzee_clientkey: "", teams: { 1: {id: 1, name: "Water", icon: "fas fa-tint", color: "blue", textcolor: "black", hue: 230}, 2: {id: 2, name: "Fire", icon: "fas fa-fire", color: "red", textcolor: "black", hue: 0},