Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: implement update store with functions to retrieve and refresh update information

Tonhof3f872576cac
diff --git a/src/lib/stores/update-store.svelte.ts b/src/lib/stores/update-store.svelte.ts
new file mode 100644
index 00000000..4690f9c1
--- /dev/null
+++ b/src/lib/stores/update-store.svelte.ts
@@ -0,0 +1,11 @@
+import { checkForUpdate, type UpdateInfo } from "$lib/updater";
+
+let updateInfo: UpdateInfo = $state({ available: false });
+
+export function getUpdateInfo(): UpdateInfo {
+ return updateInfo;
+}
+
+export async function refreshUpdateInfo(): Promise<void> {
+ updateInfo = await checkForUpdate();
+}