aboutsummaryrefslogtreecommitdiff
path: root/src-ui/src
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-11 00:32:55 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-11 00:32:55 +0200
commit504c1bc00e9d27a3df9a300ba2ebd8aa9efbb3ab (patch)
treebb3785aa3f4f8d03c1e245e73c8435b06c69c1ce /src-ui/src
parent6097f17765e5f4303a25f58e1ad07b5dbb79233b (diff)
downloadFlightCore-504c1bc00e9d27a3df9a300ba2ebd8aa9efbb3ab.tar.gz
FlightCore-504c1bc00e9d27a3df9a300ba2ebd8aa9efbb3ab.zip
Check if Origin is running
Diffstat (limited to 'src-ui/src')
-rw-r--r--src-ui/src/main.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 0a2c5401..72556181 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -90,6 +90,7 @@ document.addEventListener("DOMContentLoaded", async function () {
let versionNumberHolderEl = $("version-number-holder") as HTMLElement;
let installTypeHolderEl = $("install-type-holder") as HTMLElement;
let omniButtonEl = document.getElementById("omni-button") as HTMLElement;
+ let originRunningHolderEl = $("origin-running-holder") as HTMLElement;
// listen backend-ping event (from Tauri Rust App)
listen("backend-ping", function (evt: TauriEvent<any>) {
@@ -99,6 +100,18 @@ document.addEventListener("DOMContentLoaded", async function () {
}, 500);
})
+ // listen origin-running-ping event (from Tauri Rust App)
+ listen("origin-running-ping", function (evt: TauriEvent<any>) {
+ let origin_is_running = evt.payload as boolean;
+ if (origin_is_running) {
+ originRunningHolderEl.textContent = "ORIGIN RUNNING";
+ }
+ else {
+ originRunningHolderEl.textContent = "ORIGIN NOT RUNNING";
+ }
+ console.log(evt.payload);
+ })
+
// omni button click
omniButtonEl.addEventListener("click", async function () {