feat(download manager): Added generic download manager

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-01-04 15:47:14 +11:00
parent 8be1dd435c
commit 6159319172
20 changed files with 363 additions and 202 deletions

View File

@ -1,7 +1,8 @@
import { listen } from "@tauri-apps/api/event";
import type { DownloadableMetadata } from "~/types";
export type QueueState = {
queue: Array<{ id: string; status: string; progress: number | null }>;
queue: Array<{ meta: DownloadableMetadata; status: string; progress: number | null }>;
status: string;
};
@ -24,4 +25,4 @@ listen("update_queue", (event) => {
listen("update_stats", (event) => {
const stats = useStatsState();
stats.value = event.payload as StatsState;
});
});