feat(updater): wire tauri-plugin-updater with GitHub releases endpoint + update toast
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user