diff --git a/src/lib/communityThemeDownloads.ts b/src/lib/communityThemeDownloads.ts new file mode 100644 index 0000000..3da3b6c --- /dev/null +++ b/src/lib/communityThemeDownloads.ts @@ -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(); +export const themeDownloadProgress = new SvelteMap(); diff --git a/src/lib/components/theme/CommunityWorkshopView.svelte b/src/lib/components/theme/CommunityWorkshopView.svelte index b964299..14e42ba 100644 --- a/src/lib/components/theme/CommunityWorkshopView.svelte +++ b/src/lib/components/theme/CommunityWorkshopView.svelte @@ -1,5 +1,6 @@