generated from nhcarrigan/template
feat: add auto-update checker
Implements issue #17 - the app now checks for updates on startup and shows a notification when a newer version is available. Users can disable this in settings. Uses Gitea releases API with semver comparison. Closes #17
This commit is contained in:
@@ -18,8 +18,10 @@
|
||||
import ConfigSidebar from "$lib/components/ConfigSidebar.svelte";
|
||||
import AchievementNotification from "$lib/components/AchievementNotification.svelte";
|
||||
import AchievementsPanel from "$lib/components/AchievementsPanel.svelte";
|
||||
import UpdateNotification from "$lib/components/UpdateNotification.svelte";
|
||||
|
||||
let initialized = false;
|
||||
let updateNotification: UpdateNotification;
|
||||
let achievementPanelOpen = $state(false);
|
||||
|
||||
// Global keyboard shortcuts
|
||||
@@ -108,6 +110,11 @@
|
||||
|
||||
// Add global keyboard shortcut listener
|
||||
window.addEventListener("keydown", handleGlobalKeydown);
|
||||
|
||||
// Check for updates on startup
|
||||
if (config.update_checks_enabled) {
|
||||
updateNotification?.checkForUpdates();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -147,6 +154,7 @@
|
||||
bind:isOpen={achievementPanelOpen}
|
||||
onClose={() => (achievementPanelOpen = false)}
|
||||
/>
|
||||
<UpdateNotification bind:this={updateNotification} />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user