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.
11 lines
455 B
TypeScript
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>();
|