diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 8e0143b..f3d7e33 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "oratiotext"
-version = "1.0.1"
+version = "1.0.2"
description = "A cross-platform desktop application for converting speech to text using Whisper"
authors = ["kylethedeveloper"]
edition = "2021"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index d43bb98..4c66ab1 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-config-schema/schema.json",
"productName": "OratioText",
- "version": "1.0.1",
+ "version": "1.0.2",
"identifier": "com.oratiotext.app",
"build": {
"frontendDist": "../src"
diff --git a/src/index.html b/src/index.html
index b84c003..dc306e7 100644
--- a/src/index.html
+++ b/src/index.html
@@ -156,13 +156,33 @@
- Loading
- version...
+
+
Loading version...
+
+
+
OratioText is a speech to text application that runs entirely on your local
machine, ensuring
full privacy.
It uses the whisper.cpp models under the hood.
- GitHub Repository
+
+
+
+
diff --git a/src/main.js b/src/main.js
index a531066..f7d3c66 100644
--- a/src/main.js
+++ b/src/main.js
@@ -462,3 +462,62 @@ function toggleTheme() {
themeToggle.addEventListener("click", toggleTheme);
initTheme();
+// ---- Update Check ---------------------------------------------------------
+
+const checkUpdateBtn = document.getElementById("check-update-btn");
+const updateStatus = document.getElementById("update-status");
+
+if (checkUpdateBtn) {
+ checkUpdateBtn.addEventListener("click", checkForUpdates);
+}
+
+async function checkForUpdates() {
+ checkUpdateBtn.disabled = true;
+ checkUpdateBtn.textContent = "Checking...";
+ updateStatus.classList.add("hidden");
+
+ try {
+ const response = await fetch("https://api.github.com/repos/kylethedeveloper/OratioText/releases/latest");
+ if (!response.ok) throw new Error("Failed to check for updates");
+ const data = await response.json();
+
+ // Tag names typically have a 'v' prefix, e.g. 'v1.0.1'. Clean it up easily:
+ const latestVersion = data.tag_name.replace(/^v/, '');
+ const currentVersion = await invoke("get_app_version");
+
+ const isNewer = compareVersions(latestVersion, currentVersion) > 0;
+
+ updateStatus.classList.remove("hidden");
+ if (isNewer) {
+ updateStatus.textContent = "⚠ Newer version available!";
+ updateStatus.style.color = "var(--color-warning)";
+ updateStatus.style.pointerEvents = "auto";
+ updateStatus.style.cursor = "pointer";
+ } else {
+ updateStatus.textContent = "☑ App up to date!";
+ updateStatus.style.color = "var(--color-success)";
+ updateStatus.style.pointerEvents = "none";
+ updateStatus.style.cursor = "default";
+ }
+ } catch (err) {
+ console.error("Update check failed", err);
+ updateStatus.textContent = "Failed to check update.";
+ updateStatus.style.color = "var(--color-error)";
+ updateStatus.classList.remove("hidden");
+ } finally {
+ checkUpdateBtn.disabled = false;
+ checkUpdateBtn.textContent = "Check for updates";
+ }
+}
+
+function compareVersions(v1, v2) {
+ const parts1 = v1.split('.').map(Number);
+ const parts2 = v2.split('.').map(Number);
+ for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
+ const n1 = parts1[i] || 0;
+ const n2 = parts2[i] || 0;
+ if (n1 > n2) return 1;
+ if (n1 < n2) return -1;
+ }
+ return 0;
+}