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.
This commit is contained in:
1 parent
809fca6f29
commit
4b039c9b79
2 files changed
+49
-28
No files matched your search
@@ -0,0 +1,10 @@
|
||||
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>();
|
||||
Reference in new issue
Block a user