diff --git a/src/interface/pages/settings.svelte b/src/interface/pages/settings.svelte index 103709a3..b635e4f9 100644 --- a/src/interface/pages/settings.svelte +++ b/src/interface/pages/settings.svelte @@ -61,6 +61,7 @@ let selectedBackgroundCategory = $state("All"); let backgroundCategories = $state([]); let storeSearchTerm = $state(""); + let settingsSearch = $state(""); let showDisclaimerModal = $state(false); let disclaimerCallbacks = $state<{ onConfirm: () => void; onCancel: () => void } | null>(null); @@ -142,6 +143,7 @@ ); const sectionTitle = $derived.by(() => { + if (activePage === "settings" && settingsSearch.trim()) return "Search results"; if (activePage === "themes") return "Themes"; if (activePage === "backgrounds") return "Backgrounds"; return [...userNav, ...appNav].find((item) => item.id === activeSection)?.label ?? "Settings"; @@ -251,6 +253,7 @@ const selectNavItem = (id: string) => { if (activePage === "settings") { + settingsSearch = ""; activeSection = id; return; } @@ -281,6 +284,7 @@ const applyDestination = (destination: SettingsDestination) => { activePage = destination.page; if (destination.page === "settings" && destination.section) { + settingsSearch = ""; activeSection = destination.section; } else if (destination.page === "themes" && destination.view) { activeThemeView = destination.view === "store" ? "theme-store" : "theme-settings"; @@ -373,6 +377,32 @@ : 'w-[260px] px-4 py-5'}" aria-label="Settings categories" > + {#if activePage === "settings"} + + {/if} +
{#if activePage === "settings"} - {#if activeSection === "shortcuts"} + {#if activeSection === "shortcuts" && !settingsSearch.trim()} {:else} + {#if settingsSearch.trim()} + + {/if} {/if} {:else if activePage === "themes"} diff --git a/src/interface/pages/settings/general.svelte b/src/interface/pages/settings/general.svelte index 4cd27343..7982596a 100644 --- a/src/interface/pages/settings/general.svelte +++ b/src/interface/pages/settings/general.svelte @@ -136,12 +136,13 @@ void loadPluginSettings(); }); - const { showColourPicker, showFontPicker, showDisclaimer, showCloudPanel, activeSection = "general" } = $props<{ + const { showColourPicker, showFontPicker, showDisclaimer, showCloudPanel, activeSection = "general", searchQuery = "" } = $props<{ showColourPicker: () => void; showFontPicker: () => void; showDisclaimer: (onConfirm: () => void, onCancel: () => void, title?: string, message?: string) => void; showCloudPanel: () => void; activeSection?: string; + searchQuery?: string; }>(); /** Map each plugin into the settings sidebar category that fits its purpose. */ @@ -167,6 +168,13 @@ activeSection === "all" || (pluginSectionById[pluginId] ?? "features") === activeSection; + const matchesSearch = (...parts: Array) => { + const q = searchQuery.trim().toLowerCase(); + return !q || parts.some((part) => part?.toLowerCase().includes(q)); + }; + + const pluginHit = (plugin: Plugin) => + matchesSearch(plugin.name, plugin.description, ...Object.values(plugin.settings).flatMap((s) => [s.title, s.description])); async function exportCloudSettingsJsonToFile() { const payload = await getSnapshotForUpload(); @@ -183,6 +191,7 @@ {#snippet Setting({ title, description, Component, props }: SettingsList) } +{#if matchesSearch(title, description)}

{title}

@@ -192,6 +201,7 @@
+{/if} {/snippet}
@@ -204,6 +214,7 @@ props: {} })} + {#if matchesSearch("BetterSEQTA Cloud", "Account & sync")}
@@ -222,6 +233,7 @@ {/if}
+ {/if} {/if} {#if showsSection("general")} @@ -354,12 +366,13 @@ {@render Setting(option)} {/each} - {#if !isEngage} + {#if !isEngage && matchesSearch("Sidebar Style", "Item Size", "Corner Radius", "Active Indicator", "Sidebar Width", "Transparency Effects", "Blur Strength")}
{/if} + {#if matchesSearch("Adaptive Theme Colour", "Soft Gradient", "Smooth colour transition")}
@@ -402,9 +415,11 @@ {/if}
+ {/if} {/if} {#if showsSection("general")} + {#if matchesSearch("Home Page Assessments", "Include Past Assessments", "Maximum Subjects", "Maximum Assessments per Subject")}
@@ -464,9 +479,10 @@
{/if} + {/if} {#each pluginSettings as plugin (plugin.pluginId)} - {#if pluginBelongsInSection(plugin.pluginId)} + {#if pluginBelongsInSection(plugin.pluginId) && pluginHit(plugin)}
@@ -596,7 +612,18 @@ } })} - {#if $settingsState.devMode} + {#if $settingsState.devMode && matchesSearch( + "Developer Mode", + "Verbose logging", + "Delay loading screen", + "Sensitive Hider", + "Mock Notices", + "Show Privacy Notification", + "Show Theme of the Month", + "Export cloud settings JSON", + "API Base URL", + "GitHub latest version override", + )}
diff --git a/src/interface/pages/settings/shortcuts.svelte b/src/interface/pages/settings/shortcuts.svelte index 8a05a578..c5a661a6 100644 --- a/src/interface/pages/settings/shortcuts.svelte +++ b/src/interface/pages/settings/shortcuts.svelte @@ -5,6 +5,9 @@ import { onMount } from 'svelte'; import Shortcuts from "@/seqta/content/links.json" + let { searchQuery = "" } = $props<{ searchQuery?: string }>(); + const q = $derived(searchQuery.trim().toLowerCase()); + let isLoaded = $state(false); let fileInput = $state(null); @@ -106,6 +109,7 @@
{#if isLoaded} + {#if !q}
+ {/if} {#each ($settingsState.customshortcuts ?? []) as shortcut, index} + {#if !q || shortcut.name.toLowerCase().includes(q)}
{shortcut.name}
+ {/if} {/each} {#each Object.entries(Shortcuts) as shortcut} + {#if !q || shortcut[1].DisplayName?.toLowerCase().includes(q) || shortcut[0].toLowerCase().includes(q)}
@@ -228,6 +236,7 @@
s.name === shortcut[0])?.enabled ?? false} onChange={() => switchChange(shortcut[0])} />
+ {/if} {/each} {:else}
diff --git a/src/seqta/utils/Openers/whatsNewChangelog.ts b/src/seqta/utils/Openers/whatsNewChangelog.ts index 629fbe00..6a6ee9b9 100644 --- a/src/seqta/utils/Openers/whatsNewChangelog.ts +++ b/src/seqta/utils/Openers/whatsNewChangelog.ts @@ -15,6 +15,7 @@ export const WHATS_NEW_CHANGELOG: WhatsNewRelease[] = [ "Removed white background around SEQTA Learn mobile App icons in settings.", "Re-added the kitten back to the 404 Error pages.", "Improved the sidebar to be more stable and performant.", + "Fixed Analytics page not respecting no animations setting. (#474)", "Fixed dropdown contrast and readability in settings and across SEQTA pages.", "Fixed Analytics sidebar item not hiding when toggled off in Edit Sidebar.", "Fixed timetable subject colour picker not reopening after closing (#221).",