diff --git a/VERSION b/VERSION index 13dead7..51e8fdc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.10 +0.2.18 diff --git a/public/js/core.js b/public/js/core.js index 2d42907..a443f74 100644 --- a/public/js/core.js +++ b/public/js/core.js @@ -2,7 +2,7 @@ "use strict"; /* version — shown until /api/version resolves (or if the fetch fails, e.g. offline). Kept in sync by hand with the VERSION file at the repo root on every release. */ -const VERSION = "0.2.10"; +const VERSION = "0.2.18"; (function(){ const tag = document.getElementById("verTag"); tag.textContent = "v"+VERSION; @@ -13,9 +13,13 @@ const VERSION = "0.2.10"; .then(r=>r.ok ? r.json() : null) .then(v=>{ if(!v || typeof v.version!=="string") return; - const text = v.version.startsWith("v") ? v.version : "v"+v.version; + let text = v.version.startsWith("v") ? v.version : "v"+v.version; + const isBeta = text.includes("beta"); + /* on dev the sha is shown inline (not just as a hover-title) so a deploy is always + visibly different, even if the VERSION file itself was forgotten in a commit */ + if(isBeta && v.sha) text += " ("+v.sha+")"; tag.textContent = text; - tag.classList.toggle("beta", text.includes("beta")); + tag.classList.toggle("beta", isBeta); if(v.sha) tag.title = v.sha; }) .catch(()=>{});