diff --git a/src/static/app.css b/src/static/app.css index bd34054..9a994fc 100644 --- a/src/static/app.css +++ b/src/static/app.css @@ -51,6 +51,13 @@ h1 { margin: 0; } +.version-label { + font-weight: bolder; + font-size: 110%; +} +.version { + font-family: "Ubuntu Mono", "Source Code Pro", monospace; +} /* ███ ██ █████ ██ ██ diff --git a/src/static/app.mjs b/src/static/app.mjs index c53b2b2..358a66e 100644 --- a/src/static/app.mjs +++ b/src/static/app.mjs @@ -1,7 +1,19 @@ +import SystemQueryClient from './js/SystemQueryClient.mjs'; import make_router from './js/routes_client.mjs'; -window.addEventListener("load", (_event) => { +window.addEventListener("load", async (_event) => { + globalThis.sysquery = new SystemQueryClient(); globalThis.sysquery_router = make_router(); + const el_version = document.querySelector(".version"); + + + const status = await globalThis.sysquery.status(); + + el_version.replaceChildren( + document.createTextNode(status.version) + ); + + globalThis.sysquery_router.navigate_current_hash(); }); diff --git a/src/static/index.html b/src/static/index.html index 36494a2..d5bb0a9 100644 --- a/src/static/index.html +++ b/src/static/index.html @@ -7,7 +7,7 @@

systemquery

-

Version ???

+

Version ???