From 6f4728aa182160578d7f5616a73f9d0b8aed117e Mon Sep 17 00:00:00 2001 From: Aden Linday Date: Tue, 29 Sep 2026 15:34:52 +0930 Subject: [PATCH] fix: fix not being able to switch tabs for community themes --- .../communityThemes/BrowsePanel.svelte | 37 +++++++------- .../communityThemes/MyThemesPanel.svelte | 32 ++++++------- .../OwnerThemeDetailModal.svelte | 48 +++++++++---------- src/interface/pages/communityThemes.svelte | 22 ++++----- src/interface/pages/store.svelte | 1 + 5 files changed, 71 insertions(+), 69 deletions(-) diff --git a/src/interface/components/communityThemes/BrowsePanel.svelte b/src/interface/components/communityThemes/BrowsePanel.svelte index bbc28e6e..40a35c45 100644 --- a/src/interface/components/communityThemes/BrowsePanel.svelte +++ b/src/interface/components/communityThemes/BrowsePanel.svelte @@ -4,10 +4,11 @@ import SkeletonLoader from "@/interface/components/SkeletonLoader.svelte"; import type { CommunityThemesState } from "@/interface/hooks/communityThemesState.svelte"; - let { state, searchTerm }: { state: CommunityThemesState; searchTerm: string } = $props(); + let { communityState, searchTerm }: { communityState: CommunityThemesState; searchTerm: string } = + $props(); const themes = $derived( - state.browseThemes.filter((theme) => { + communityState.browseThemes.filter((theme) => { const q = searchTerm.toLowerCase(); if (!q) return true; return ( @@ -18,20 +19,20 @@ ); -{#if state.browseLoading} +{#if communityState.browseLoading}
{#each Array(6) as _, i (i)} {/each}
-{:else if state.browseError} +{:else if communityState.browseError}

Couldn't load community themes

-

{state.browseError}

+

{communityState.browseError}

@@ -40,27 +41,27 @@ (state.displayTheme = theme)} + setDisplayTheme={(theme) => (communityState.displayTheme = theme)} toggleFavorite={() => {}} isLoggedIn={false} - installedThemeIds={state.currentThemes} + installedThemeIds={communityState.currentThemes} variant="community" /> - {#if state.displayTheme} + {#if communityState.displayTheme} (state.displayTheme = t)} - selectedThemeId={state.selectedThemeId} - installedThemeColors={state.installedThemeColors} + theme={communityState.displayTheme} + displayTheme={communityState.displayTheme} + setDisplayTheme={(t) => (communityState.displayTheme = t)} + selectedThemeId={communityState.selectedThemeId} + installedThemeColors={communityState.installedThemeColors} variant="community" onInstall={async (themeId) => { - if (state.displayTheme) await state.installCommunityTheme(themeId, state.displayTheme); + if (communityState.displayTheme) await communityState.installCommunityTheme(themeId, communityState.displayTheme); }} - onRemove={(id) => void state.removeInstalledTheme(id)} - onApply={(id) => void state.applyInstalledTheme(id)} + onRemove={(id) => void communityState.removeInstalledTheme(id)} + onApply={(id) => void communityState.applyInstalledTheme(id)} /> {/if} {/if} diff --git a/src/interface/components/communityThemes/MyThemesPanel.svelte b/src/interface/components/communityThemes/MyThemesPanel.svelte index 18fc3f3b..b020ecec 100644 --- a/src/interface/components/communityThemes/MyThemesPanel.svelte +++ b/src/interface/components/communityThemes/MyThemesPanel.svelte @@ -16,7 +16,7 @@ import { filterThemesByMode } from "@/interface/utils/themeListFilters"; import { formatCustomThemeApiError } from "@/seqta/utils/customThemes/apiErrors"; - let { state }: { state: CommunityThemesState } = $props(); + let { communityState }: { communityState: CommunityThemesState } = $props(); const statusFilters = ["", "pending", "approved", "rejected"] as const; const themeManager = ThemeManager.getInstance(); @@ -38,15 +38,15 @@ async function submitLocalTheme(theme: CustomTheme) { localSubmitError = null; - if (!state.cloudLoggedIn) { - state.showSignInOverlay = true; + if (!communityState.cloudLoggedIn) { + communityState.showSignInOverlay = true; return; } submittingLocalId = theme.id; try { const { submitThemeById } = await import("@/seqta/utils/customThemes/submitLocalTheme"); await submitThemeById(theme.id, theme.description?.trim() || undefined); - await state.loadMyThemes(); + await communityState.loadMyThemes(); } catch (err) { localSubmitError = formatCustomThemeApiError(err); } finally { @@ -70,7 +70,7 @@ }); -{#if !state.cloudLoggedIn} +{#if !communityState.cloudLoggedIn}

Sign in to manage your themes

@@ -79,7 +79,7 @@ @@ -155,25 +155,25 @@ {#each statusFilters as status (status)} {/each}

- {#if state.myLoading} + {#if communityState.myLoading}
{#each Array(4) as _, i (i)} {/each}
- {:else if state.myError} -

{state.myError}

- {:else if state.myThemes.length === 0} + {:else if communityState.myError} +

{communityState.myError}

+ {:else if communityState.myThemes.length === 0}

No community submissions yet.

@@ -49,7 +49,7 @@
{/if} - {#if state.detailLoading} + {#if communityState.detailLoading}
{:else}
@@ -75,11 +75,11 @@ {/if}
- {#if state.detailFiles.length > 0} + {#if communityState.detailFiles.length > 0}

Files

    - {#each state.detailFiles as file (file.id)} + {#each communityState.detailFiles as file (file.id)}
  • {file.file_path} ({file.file_size.toLocaleString()} bytes)
  • {/each}
@@ -91,26 +91,26 @@

Edit metadata

@@ -122,14 +122,14 @@ accept=".zip,application/zip" class="block w-full text-sm" onchange={(e) => { - state.replaceZipFile = (e.currentTarget as HTMLInputElement).files?.[0] ?? null; + communityState.replaceZipFile = (e.currentTarget as HTMLInputElement).files?.[0] ?? null; }} /> @@ -140,30 +140,30 @@

{/if} - {#if state.detailError} + {#if communityState.detailError}

- {state.detailError} + {communityState.detailError}

{/if}
- {#if state.showDeleteConfirm} + {#if communityState.showDeleteConfirm}
Delete permanently? @@ -172,7 +172,7 @@ @@ -180,7 +180,7 @@ diff --git a/src/interface/pages/communityThemes.svelte b/src/interface/pages/communityThemes.svelte index 5e6c229e..3544b473 100644 --- a/src/interface/pages/communityThemes.svelte +++ b/src/interface/pages/communityThemes.svelte @@ -7,10 +7,10 @@ let { searchTerm }: { searchTerm: string; setSearchTerm?: (term: string) => void } = $props(); - const state = createCommunityThemesState(() => searchTerm); - state.bindReactiveLoads(); + const communityState = createCommunityThemesState(() => searchTerm); + communityState.bindReactiveLoads(); - onMount(() => state.mount()); + onMount(() => communityState.mount());
@@ -19,19 +19,19 @@
@@ -53,12 +53,12 @@
- {#if state.innerTab === "browse"} - + {#if communityState.innerTab === "browse"} + {:else} - + {/if}
- +
diff --git a/src/interface/pages/store.svelte b/src/interface/pages/store.svelte index bc32c679..b3d80f82 100644 --- a/src/interface/pages/store.svelte +++ b/src/interface/pages/store.svelte @@ -17,6 +17,7 @@ import { cloudAuth } from '@/seqta/utils/CloudAuth' import SignInToFavoriteModal from '../components/SignInToFavoriteModal.svelte' import { getStoreInstalledThemeIds } from '@/interface/utils/themeListFilters' + import { consumePendingHighlightThemeId } from '@/seqta/utils/openThemeStoreWithHighlight' const themeManager = ThemeManager.getInstance(); type StoreTab = 'themes' | 'backgrounds';