systemquery/src/static/app.mjs

20 lines
508 B
JavaScript
Raw Normal View History

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();
});