hawk / commit
Updated footer version to be a templated element.
public/{js => gen}/version.js | 0
public/js/main.js | 10 ++++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/public/js/version.js b/public/gen/version.js
similarity index 100%
rename from public/js/version.js
rename to public/gen/version.js
diff --git a/public/js/main.js b/public/js/main.js
index e2ccef5..29e2e8f 100644
--- a/public/js/main.js
+++ b/public/js/main.js
@@ -1,5 +1,11 @@
-document.getElementById('version').innerText = hawkInfo.version;
-document.getElementById('updated').innerText = hawkInfo.updated;
+const updateInfoDiv = document.getElementById("updated-info");
+const updateInfoTemplate = document.querySelector("#updatedInfoTemplate");
+if (updateInfoTemplate) {
+ updateInfoDiv.innerHTML = interpolate(updateInfoTemplate.innerHTML, {
+ version: hawkInfo.version,
+ updated: hawkInfo.updated
+ });
+}
const urlParams = new URLSearchParams(window.location.search);
const code = urlParams.get('code');