Files
EZPPLauncher/src/lib/communityThemeDownloads.ts
T
HorizonCode 4b039c9b79 fix(workshop): keep download progress across tab switches
The workshop is unmounted when the Installed tab is opened, so its local download state was discarded and returning to the Community tab showed no progress even though the install was still running. Active downloads and percentages now live in a shared module that outlives the component, and in-flight downloads keep updating it.
2026-11-03 19:03:58 +01:00

11 lines
455 B
TypeScript

import { SvelteMap, SvelteSet } from 'svelte/reactivity';
/**
* Install progress lives outside the workshop component because switching to
* the Installed tab unmounts it. Keeping the state here lets the workshop show
* the current progress again when it is remounted, while the in-flight
* download keeps running.
*/
export const activeThemeDownloads = new SvelteSet<string>();
export const themeDownloadProgress = new SvelteMap<string, number>();