From a2b02ed815a1eb955992ba21df38f06d26062e58 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Tue, 28 May 2019 00:58:44 -0600 Subject: [PATCH] Show active artifacts on place screen (#1) --- www/js/home.js | 6 ++++++ www/pages/home.html | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/www/js/home.js b/www/js/home.js index 6860bc7..d700e11 100644 --- a/www/js/home.js +++ b/www/js/home.js @@ -142,6 +142,11 @@ function updatePlaceStats(id, successCallback, errorCallback) { } else { $("#magic-action-label").text("Attack"); } + + $("#place-artifact-list").html(""); + place.artifacts.forEach(function (artifact) { + $("#place-artifact-list").append(""); + }); } else { $("#place-info").addClass("color-white"); $("#place-image").attr("src", "img/place/white.png"); @@ -170,6 +175,7 @@ $("#magic-action-button").click(function () { password: localStorage.getItem("password"), id: $("#place-popup").data("placeid") }, function (resp) { + updatePlaceStats($("#place-popup").data("placeid")); app.toast.show({ text: ' ' + resp.msg, position: "bottom", diff --git a/www/pages/home.html b/www/pages/home.html index 59dfdbe..111b1ff 100644 --- a/www/pages/home.html +++ b/www/pages/home.html @@ -101,6 +101,10 @@ Magic +

Artifacts

+
+ +