Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,14 @@ async function runCheck(silent: boolean): Promise<void> {
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",
);
}
Expand Down
Loading