aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/stores/releases.svelte.ts
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2026-01-20 13:44:21 +0800
committerGitHub <noreply@github.com>2026-01-20 13:44:21 +0800
commit7338b8627833018a0e3c05c3c4f3cc7fc182e8d2 (patch)
tree23e39e5603aadc10d6b2d7efad063c68f357a860 /ui/src/stores/releases.svelte.ts
parentdbf781a35b96252e0199fec4337515651e49a8f6 (diff)
parentcf6cd6ba667b35e352b705946420cf4acab2b004 (diff)
downloadDropOut-7338b8627833018a0e3c05c3c4f3cc7fc182e8d2.tar.gz
DropOut-7338b8627833018a0e3c05c3c4f3cc7fc182e8d2.zip
[Chore] branch: Sync with main (#75)
Diffstat (limited to 'ui/src/stores/releases.svelte.ts')
-rw-r--r--ui/src/stores/releases.svelte.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/ui/src/stores/releases.svelte.ts b/ui/src/stores/releases.svelte.ts
deleted file mode 100644
index c858abb..0000000
--- a/ui/src/stores/releases.svelte.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { invoke } from "@tauri-apps/api/core";
-
-export interface GithubRelease {
- tag_name: string;
- name: string;
- published_at: string;
- body: string;
- html_url: string;
-}
-
-export class ReleasesState {
- releases = $state<GithubRelease[]>([]);
- isLoading = $state(false);
- isLoaded = $state(false);
- error = $state<string | null>(null);
-
- async loadReleases() {
- // If already loaded or currently loading, skip to prevent duplicate requests
- if (this.isLoaded || this.isLoading) return;
-
- this.isLoading = true;
- this.error = null;
-
- try {
- this.releases = await invoke<GithubRelease[]>("get_github_releases");
- this.isLoaded = true;
- } catch (e) {
- console.error("Failed to load releases:", e);
- this.error = String(e);
- } finally {
- this.isLoading = false;
- }
- }
-}
-
-export const releasesState = new ReleasesState();