systemquery/src/static/app.mjs
Starbeamrainbowlabs 10f36cf3f5
client-side: go!
There's still a *ton* of work left, but we're (slowly) getting there
2022-02-24 03:08:21 +00:00

20 lines
508 B
JavaScript

import SystemQueryClient from './js/SystemQueryClient.mjs';
import make_router from './js/routes_client.mjs';
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();
});