web/DownloadButton: extract api interaction logic into a lib

download button state is now stored, well, in a state
This commit is contained in:
wukko
2025-01-29 16:35:43 +06:00
parent 1c34d2daff
commit 91f5d63b93
5 changed files with 138 additions and 114 deletions

View File

@@ -1,3 +1,5 @@
import { writable } from "svelte/store";
import type { CobaltDownloadButtonState } from "$lib/types/omnibox";
export const link = writable("");
export const downloadButtonState = writable<CobaltDownloadButtonState>("idle");