From a0367be686adacdf0c979c987a95a9794ae1eac8 Mon Sep 17 00:00:00 2001 From: Jones Jankovic Date: Tue, 24 Mar 2026 12:22:53 +1030 Subject: [PATCH] feat: Group settings better and make their descriptions more consistent (#405) * Reorder and make description mroe consistent of settings * Make soft gradient description consistent * Consistent description for music plugin descriptionns * Update src/plugins/built-in/profilePicture/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/backgroundMusic/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/profilePicture/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Formatting * Formatting * Formatting * Formatting * Formatting * Prettier ignore * Formatting * format * Update src/plugins/built-in/timetableEdit/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Update src/plugins/built-in/timetableEdit/index.ts Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> * Surely thats it * Finally * Add back stuff * fix: fix formatting --------- Co-authored-by: Aden Lindsay <140392385+AdenMGB@users.noreply.github.com> Co-authored-by: Aden Lindsay --- .gitignore | 13 ++--- src/interface/pages/settings/general.svelte | 55 +++++++++---------- src/plugins/built-in/backgroundMusic/index.ts | 7 +-- src/plugins/built-in/profilePicture/index.ts | 4 +- 4 files changed, 35 insertions(+), 44 deletions(-) diff --git a/.gitignore b/.gitignore index 73db358a..1c965582 100644 --- a/.gitignore +++ b/.gitignore @@ -6,12 +6,6 @@ pnpm-lock.yaml yarn.lock bun.lock -.parcel-cache -.env -.env.submit - -dependency-graph.svg - # Build extension.zip build/ @@ -20,5 +14,8 @@ betterseqtaplus-safari/ .million/ .vscode/ - -**/.DS_Store \ No newline at end of file +**/.DS_Store +.parcel-cache +.env +.env.submit +dependency-graph.svg \ No newline at end of file diff --git a/src/interface/pages/settings/general.svelte b/src/interface/pages/settings/general.svelte index 59406ac1..09e6d1cd 100644 --- a/src/interface/pages/settings/general.svelte +++ b/src/interface/pages/settings/general.svelte @@ -115,33 +115,14 @@ {#each [ { title: "Connect Mobile App", - description: "Link your SEQTA session to DesQTA — the modern desktop and mobile app for SEQTA Learn.", + description: "Link your SEQTA session to DesQTA — the modern desktop and mobile app for SEQTA Learn", id: 0, Component: ConnectMobileApp, props: {} }, - { - title: "Transparency Effects", - description: "Enables transparency effects on certain elements such as blur. (May impact battery life)", - id: 1, - Component: Switch, - props: { - state: $settingsState.transparencyEffects, - onChange: (isOn: boolean) => settingsState.transparencyEffects = isOn - } - }, - { - title: "Custom Theme Colour", - description: "Customise the overall theme colour of SEQTA Learn.", - id: 4, - Component: PickerSwatch, - props: { - onClick: showColourPicker - } - }, { title: "Edit Sidebar Layout", - description: "Customise the sidebar layout.", + description: "Reorder pages on the sidebar", id: 5, Component: Button, props: { @@ -149,9 +130,18 @@ text: "Edit" } }, + { + title: "Custom Theme Colour", + description: "Customise the overall theme colour of SEQTA Learn", + id: 4, + Component: PickerSwatch, + props: { + onClick: showColourPicker + } + }, { title: "Icon Only Sidebar", - description: "Show only icons in the sidebar for a compact layout.", + description: "Show only icons in the sidebar for a compact layout", id: 14, Component: Switch, props: { @@ -161,7 +151,7 @@ }, { title: "Animations", - description: "Enables animations on certain pages.", + description: "Enable animations on certain pages", id: 6, Component: Switch, props: { @@ -179,9 +169,19 @@ onChange: (isOn: boolean) => settingsState.timeFormat = isOn ? "12" : "24" } }, + { + title: "Transparency Effects", + description: "Enable transparency effects on certain elements, such as blur (May impact battery life)", + id: 1, + Component: Switch, + props: { + state: $settingsState.transparencyEffects, + onChange: (isOn: boolean) => settingsState.transparencyEffects = isOn + } + }, { title: "Default Page", - description: "The page to load when SEQTA Learn is opened.", + description: "The page to load when SEQTA Learn is opened", id: 10, Component: Select, props: { @@ -200,7 +200,7 @@ }, { title: "News Feed Source", - description: "Choose sources of your news feed.", + description: "Choose the sources for your news feed", id: 11, Component: Select, props: { @@ -230,7 +230,7 @@

Adaptive Theme Colour

-

Change the theme colour based on the current class (e.g. when viewing a course or assessments page).

+

Change the theme colour based on the current class (e.g. when viewing a course or assessments page)

Soft Gradient

-

Use a soft gradient instead of a solid colour when viewing a class.

+

Use a soft gradient instead of a solid colour when viewing a class

{ - // Do nothing on cancel } ); return; diff --git a/src/plugins/built-in/backgroundMusic/index.ts b/src/plugins/built-in/backgroundMusic/index.ts index 7ed2fe3d..207cf72f 100644 --- a/src/plugins/built-in/backgroundMusic/index.ts +++ b/src/plugins/built-in/backgroundMusic/index.ts @@ -7,7 +7,7 @@ import localforage from "localforage"; const settings = defineSettings({ uploader: componentSetting({ title: "Background Music", - description: "Upload a .wav or .mp3 audio file to play in the background.", + description: "Upload a .wav or .mp3 audio file to play in the background", component: BackgroundMusicSetting, }), volume: numberSetting({ @@ -99,7 +99,7 @@ async function startPlayback(volume: number): Promise { const backgroundMusicPlugin: Plugin = { id: "background-music", name: "Background Music", - description: "Play your own music in the background while SEQTA is open.", + description: "Play your own music in the background while SEQTA is open", version: "1.0.0", settings, styles, @@ -142,7 +142,6 @@ const backgroundMusicPlugin: Plugin = { if (!currentAudio) return; const pauseOnHidden = (api.settings as any).pauseOnHidden ?? true; if (!pauseOnHidden) return; - if (document.visibilityState === "hidden") { if (visibilityResumeTimeout !== null) { clearTimeout(visibilityResumeTimeout); @@ -183,5 +182,3 @@ const backgroundMusicPlugin: Plugin = { }; export default backgroundMusicPlugin; - - diff --git a/src/plugins/built-in/profilePicture/index.ts b/src/plugins/built-in/profilePicture/index.ts index 666065a4..60ec875a 100644 --- a/src/plugins/built-in/profilePicture/index.ts +++ b/src/plugins/built-in/profilePicture/index.ts @@ -13,7 +13,6 @@ const settings = defineSettings({ }), }); - const profilePicturePlugin: Plugin = { id: "profile-picture", name: "Custom Profile Picture", @@ -74,7 +73,7 @@ const profilePicturePlugin: Plugin = { window.addEventListener('profile-picture-updated', handler); return () => { - window.removeEventListener('profile-picture-updated', handler); + window.removeEventListener("profile-picture-updated", handler); if (img) img.remove(); if (svg) svg.style.display = ""; if (currentBlobUrl) URL.revokeObjectURL(currentBlobUrl); @@ -83,4 +82,3 @@ const profilePicturePlugin: Plugin = { }; export default profilePicturePlugin; -