studio: version text in the status bar, favicon
Deploy web Studio / deploy (push) Successful in 3m15s

The status bar ends with "isokit <engine version>"; the web build adds
the commit (linked on Gitea), its date as a tooltip and a "+" when built
from a tree with uncommitted changes (build_web.py writes a
<meta name="isokit-build"> from GITHUB_SHA or git). /api/meta now carries
"engine". studio/favicon.svg (isometric cube in the accent green) is
served by `isokit studio` (also on /view) and copied into the web build.
check_web.py and check_studio.py check both.
This commit is contained in:
grabowski committed 2026-10-23 17:08:48 +07:00
1 parent c1d01331ac
commit c647f39059
11 files changed
+66 -4

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path d="M16 2.5 29 10 16 17.5 3 10Z" fill="#3ddc84"/>
<path d="M3 10 16 17.5V30.5L3 23Z" fill="#1f9e5a"/>
<path d="M29 10 16 17.5V30.5L29 23Z" fill="#126b3c"/>
<path d="M16 2.5 29 10V23L16 30.5 3 23V10ZM3 10 16 17.5 29 10M16 17.5V30.5" fill="none" stroke="#0a0f1a" stroke-width="1.2" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 387 B

+2
View File
@@ -9,6 +9,7 @@
if(t!=="light"&&t!=="dark")t=window.matchMedia&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";
document.documentElement.setAttribute("data-theme",t);})();
</script>
<link rel="icon" type="image/svg+xml" href="/assets/studio/favicon.svg">
<link rel="stylesheet" href="/assets/viewer/isokit-view.css">
<link rel="stylesheet" href="/assets/theme.css">
<link rel="stylesheet" href="/assets/studio/studio.css">
@@ -51,6 +52,7 @@ document.documentElement.setAttribute("data-theme",t);})();
<span class="st-grow"></span>
<button type="button" id="warnbtn" class="st-link" hidden></button>
<span id="stats"></span>
<a id="ver" class="st-ver" href="https://git.b4l.co.th/B4L/isokit" target="_blank" rel="noopener"></a>
</footer>
</section>
<aside class="st-right" id="right"></aside>
+2
View File
@@ -52,6 +52,8 @@ input[type=checkbox] { accent-color: var(--accent); }
.st-hint { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--accent); border-radius: 16px; padding: 4px 14px; z-index: 5; pointer-events: none; }
.st-status { display: flex; align-items: center; gap: 14px; padding: 4px 10px; background: var(--panel); border-top: 1px solid var(--stroke); color: var(--mute); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.st-status select { padding: 1px 4px; }
.st-ver { color: var(--mute); font-size: 11px; text-decoration: none; white-space: nowrap; }
.st-ver:hover { color: var(--fg); text-decoration: underline; }
.st-link { background: none; border: 0; color: var(--danger); padding: 0; text-decoration: underline; }
.st-right h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 6px; }
+16
View File
@@ -356,12 +356,28 @@
if (B && B.preview) $("preview").addEventListener("click", function (e) { e.preventDefault(); B.preview(); });
if (B && B.saveTitle) $("save").title = B.saveTitle;
// engine version from /api/meta; a web build adds its commit and date
// (<meta name="isokit-build" content="<sha> <date> [dirty]">, tools/build_web.py)
function showVersion() {
var el = $("ver"), m = document.querySelector('meta[name="isokit-build"]');
var b = m ? m.getAttribute("content").split(" ") : [];
var text = "isokit " + (S.meta.engine || "?"), tip = "isokit engine " + (S.meta.engine || "?");
if (b[0]) {
text += " · " + b[0].slice(0, 7) + (b[2] ? "+" : "");
tip += ", build " + b[0] + (b[1] ? " (" + b[1] + ")" : "") + (b[2] ? ", with uncommitted changes" : "");
el.href = "https://git.b4l.co.th/B4L/isokit/commit/" + b[0];
}
el.textContent = text;
el.title = tip;
}
// ------------------------------------------------------------ start
Promise.all([api("/api/meta"), api("/api/doc")]).then(function (rs) {
S.meta = rs[0]; takeState(rs[1]);
document.title = S.meta.title + " · isokit Studio";
$("title").textContent = S.meta.title;
if (S.meta.load_error) toast(S.meta.load_error, true);
showVersion();
renderPalette(); renderLists(); mountView(); renderRight();
poll();
});