diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 9e7280a..3f2ca88 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -67,7 +67,8 @@ "updater": { "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDY4NDMzMDkwRTQzNzIxQ0MKUldUTUlUZmtrREJEYUN6NXpqMndNLzlyVEZxbndacHNydEFWQVBydm1uUUkxUUsxZ0xUYS9zYkYK", "endpoints": [ - "https://gist.githubusercontent.com/solancer/47a3dee0bace9ff5134878f55d887157/raw/latest.json" + "https://gist.githubusercontent.com/solancer/47a3dee0bace9ff5134878f55d887157/raw/latest.json", + "https://github.com/solancer/sarala/releases/latest/download/latest.json" ] } } diff --git a/src/updater.ts b/src/updater.ts index 07a3987..d963fe6 100644 --- a/src/updater.ts +++ b/src/updater.ts @@ -130,8 +130,14 @@ async function runCheck(silent: boolean): Promise { setAvailableUpdate({ version: update.version, notes: (update.body ?? "").trim() }); } catch (err) { if (!silent) { + // A network failure reads as "error sending request for url (…)", which + // says nothing useful to the person; lead with what they can do. + const detail = err instanceof Error ? err.message : String(err); + const offline = /sending request|timed out|connect|dns|network/i.test(detail); await alertDialog( - `Update check failed: ${err instanceof Error ? err.message : String(err)}`, + offline + ? "Couldn't reach the update server. Check your internet connection and try again." + : `Update check failed: ${detail}`, "Update", ); }