From 74e8d7f5104b08d1598693602979b29cfcd146e9 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sat, 27 Aug 2022 23:55:33 +0200 Subject: Show version number in UI --- src-ui/src/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src-ui/src') diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index 3c44ce55..fcd68cb4 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -11,6 +11,7 @@ document.addEventListener("DOMContentLoaded", async function () { let pingEl = $("backend-ping")! as HTMLElement; let panicButtonEl = $("panic-button") as HTMLElement; let installLocationHolderEl = $("install-location-holder") as HTMLElement; + let versionNumberHolderEl = $("version-number-holder") as HTMLElement; // listen backend-ping event (from Tauri Rust App) listen("install-location-result", function (evt: TauriEvent) { @@ -19,6 +20,11 @@ document.addEventListener("DOMContentLoaded", async function () { installLocationHolderEl.textContent = evt.payload; }) + // listen for version number ping + listen("current-version-ping", function (evt: TauriEvent) { + versionNumberHolderEl.textContent = evt.payload; + }) + // listen backend-ping event (from Tauri Rust App) listen("backend-ping", function (evt: TauriEvent) { pingEl.classList.add("on"); -- cgit v1.2.3