feat(updater): wire tauri-plugin-updater with GitHub releases endpoint + update toast

This commit is contained in:
2026-04-18 09:41:42 +01:00
parent ddcf93649c
commit 8b5d92f466
6 changed files with 63 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
import { loadOsInfo } from "$lib/utils/osInfo.js";
import { page, settings, saveSettings } from "$lib/stores/page.svelte.js";
import { getPreferences, updatePreferences } from "$lib/stores/preferences.svelte.js";
import { toasts } from "$lib/stores/toasts.svelte.js";
import { page as sveltePage } from "$app/stores";
@@ -230,6 +231,15 @@
} catch {
// If commands fail, skip first-run check
}
// Background update check — non-blocking, silent on failure
invoke("check_for_update")
.then((version) => {
if (version) {
toasts.info(`Kon ${version} is available. Restart to install.`);
}
})
.catch(() => { /* update check failure must not affect the app */ });
});
onDestroy(() => {