v0.2.09-beta: versienummer in de UI klopte niet meer met de echte build
All checks were successful
dev - build & deploy naar test / build-and-deploy (push) Successful in 13s

- #verTag toonde altijd een hardgecodeerde, verouderde versie (0.2.01); nu wordt de echte versie uit /api/version getoond zodra die bekend is (dev-<sha> · beta op dev, of het releaselabel op productie)
- versienummer weer zichtbaar op mobiel (was volledig verborgen op schermen ≤600px)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Ramon 2026-07-13 15:23:09 +02:00
parent b52c45329c
commit ca825ce6f8
2 changed files with 11 additions and 7 deletions

View file

@ -1054,7 +1054,7 @@ body.hc .am-reset,body.hc .am-reset-row{border:1.5px solid #000; background:#fff
#toolbar{padding:0 8px; gap:6px;} #toolbar{padding:0 8px; gap:6px;}
.logo{font-size:22px;} .logo{font-size:22px;}
.logo .crayon{font-size:18px; margin-left:4px;} .logo .crayon{font-size:18px; margin-left:4px;}
#verTag{display:none;} #verTag{font-size:9px; margin-left:2px;}
.tbtn{padding:8px 10px; font-size:13px;} .tbtn{padding:8px 10px; font-size:13px;}
#boardsPanel{top:60px; max-height:min(66vh,480px);} #boardsPanel{top:60px; max-height:min(66vh,480px);}

View file

@ -1,18 +1,22 @@
/* teach - kern: versie, i18n, accounts, opslag, geluid */ /* teach - kern: versie, i18n, accounts, opslag, geluid */
"use strict"; "use strict";
/* version — bump on every change (form 0.0.00) */ /* version — shown until /api/version resolves (or if the fetch fails, e.g. offline) */
const VERSION = "0.2.01"; const VERSION = "0.2.08";
(function(){ (function(){
const tag = document.getElementById("verTag"); const tag = document.getElementById("verTag");
tag.textContent = "v"+VERSION; tag.textContent = "v"+VERSION;
/* dev branch deploys report a dev- build via /api/version mark as beta; /* the real deployed version always wins once known: dev branch deploys report
main/release builds show only the version number */ a dev-<sha> build via /api/version mark as beta; release builds report the
actual release tag (e.g. v1.2.0) show that instead of the local fallback */
fetch("/api/version") fetch("/api/version")
.then(r=>r.ok ? r.json() : null) .then(r=>r.ok ? r.json() : null)
.then(v=>{ .then(v=>{
if(v && typeof v.version==="string" && v.version.startsWith("dev")){ if(!v || typeof v.version!=="string") return;
tag.textContent = "v"+VERSION+" · beta"; if(v.version.startsWith("dev")){
tag.textContent = v.version+" · beta";
tag.classList.add("beta"); tag.classList.add("beta");
}else{
tag.textContent = v.version;
} }
}) })
.catch(()=>{}); .catch(()=>{});