aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-tauri/src/main.rs9
-rw-r--r--src-ui/src/main.ts5
2 files changed, 12 insertions, 2 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index aa6b042e..e81be131 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -46,7 +46,8 @@ fn main() {
force_panic,
find_game_install_location_caller,
get_version_number,
- get_northstar_version_number_caller
+ get_northstar_version_number_caller,
+ check_is_northstar_outdated
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
@@ -100,3 +101,9 @@ fn get_northstar_version_number_caller() -> String {
}
}
}
+
+#[tauri::command]
+fn check_is_northstar_outdated() -> bool {
+ // TODO implement check
+ false
+}
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 2150df4f..4cbd8099 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -68,7 +68,10 @@ document.addEventListener("DOMContentLoaded", async function () {
if (northstar_version_number && northstar_version_number.length > 0) {
globalState.installed_northstar_version = northstar_version_number;
omniButtonEl.textContent = `Play (${northstar_version_number})`;
- // TODO check if version is newest
+ let northstar_is_outdated = await invoke("check_is_northstar_outdated") as boolean;
+ if (northstar_is_outdated) {
+ omniButtonEl.textContent = "Update";
+ }
}
console.log(globalState);
}