From 1d0e25c4e04dc3d795a2fdeb050cb1de30c8c898 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Tue, 8 Sep 2026 12:36:21 +0200 Subject: [PATCH] feat(theseus/settings): show current Theseus version by default in General The Updates card was placeholder-dashed until the user clicked Check for updates. Show 'You're on v' immediately on load using a new app-version IPC (app.getVersion, no network) so the user can answer 'which version am I on?' without a click. --- main.js | 3 +++ settings-preload.js | 1 + settings.html | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index f04be0e..0dac5e0 100644 --- a/main.js +++ b/main.js @@ -2950,6 +2950,9 @@ ipcMain.handle("find-stop", () => { const t = activeTab(); if (!t) return false; try { t.view.webContents.stopFindInPage("clearSelection"); return true; } catch { return false; } }); +// Just the app version — no network. Used by Settings > General so the +// user can see which Theseus they're on without clicking "Check for updates". +ipcMain.handle("app-version", () => app.getVersion()); ipcMain.handle("recheck-update", async () => { // Manual "Check for updates" also un-dismisses any chip the user closed // in this session — they're actively asking to see the status, so honour diff --git a/settings-preload.js b/settings-preload.js index 8025ad8..029583a 100644 --- a/settings-preload.js +++ b/settings-preload.js @@ -39,6 +39,7 @@ contextBridge.exposeInMainWorld("cfg", { // Manual "Check for updates" — un-dismisses any existing chip and re- // fetches the release manifest. Returns { updateAvailable, currentVersion }. recheckUpdate: () => ipcRenderer.invoke("recheck-update"), + appVersion: () => ipcRenderer.invoke("app-version"), // Add-ons management (Settings > Add-ons tab). listAddons: () => ipcRenderer.invoke("addons-list"), setAddonEnabled: (id, enabled) => ipcRenderer.invoke("addons-set-enabled", id, !!enabled), diff --git a/settings.html b/settings.html index 64ca2d0..2da89be 100644 --- a/settings.html +++ b/settings.html @@ -170,7 +170,7 @@
Updates
Theseus already checks the release manifest at boot and every 6h. Click below to check right now.
-
+
Loading…
@@ -972,6 +972,11 @@ // release manifest. Renders either "you're on the latest (vN.M.O)" or // "vX.Y.Z is available — the update chip in the toolbar will offer it". const updStatus = document.getElementById("updStatus"); + // Show the current version by default so the user doesn't have to + // click "Check for updates" just to find out which Theseus they're on. + if (C && C.appVersion) C.appVersion().then((v) => { + if (v) updStatus.textContent = `You're on v${v}.`; + }).catch(() => {}); const updCheck = document.getElementById("updCheck"); updCheck.onclick = async () => { const orig = updCheck.textContent;