aboutsummaryrefslogtreecommitdiff
path: root/src-ui
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-08-29 00:50:34 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-08-29 00:50:34 +0200
commitdd4f758daf0203e31d87da2e3fbdee4f09540828 (patch)
tree47b0dfc088981ab065dbf2e7fdea0043c776aa9a /src-ui
parent86d56c86f439a99708aa8fc6732c333c9b23d949 (diff)
downloadFlightCore-dd4f758daf0203e31d87da2e3fbdee4f09540828.tar.gz
FlightCore-dd4f758daf0203e31d87da2e3fbdee4f09540828.zip
Load version number on application start
Diffstat (limited to 'src-ui')
-rw-r--r--src-ui/src/main.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index fcd68cb4..e769a1b5 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -20,11 +20,6 @@ document.addEventListener("DOMContentLoaded", async function () {
installLocationHolderEl.textContent = evt.payload;
})
- // listen for version number ping
- listen("current-version-ping", function (evt: TauriEvent<string>) {
- versionNumberHolderEl.textContent = evt.payload;
- })
-
// listen backend-ping event (from Tauri Rust App)
listen("backend-ping", function (evt: TauriEvent<any>) {
pingEl.classList.add("on");
@@ -53,4 +48,8 @@ document.addEventListener("DOMContentLoaded", async function () {
await invoke("force_panic");
alert("Never should have been able to get here!");
});
+
+ // Run the following on initial page load
+ let version_number_string = await invoke("get_version_number") as string;
+ versionNumberHolderEl.textContent = version_number_string;
})