mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
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 <lindsaya542@gmail.com>
This commit is contained in:
@@ -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 @@
|
||||
<div class="flex justify-between items-center px-4 py-3">
|
||||
<div class="pr-4">
|
||||
<h2 class="text-sm font-bold">Adaptive Theme Colour</h2>
|
||||
<p class="text-xs">Change the theme colour based on the current class (e.g. when viewing a course or assessments page).</p>
|
||||
<p class="text-xs">Change the theme colour based on the current class (e.g. when viewing a course or assessments page)</p>
|
||||
</div>
|
||||
<div>
|
||||
<Switch
|
||||
@@ -243,7 +243,7 @@
|
||||
<div class="flex justify-between items-center px-4 py-3 pl-6 border-t border-zinc-100 dark:border-zinc-700/50">
|
||||
<div class="pr-4">
|
||||
<h2 class="text-sm font-bold">Soft Gradient</h2>
|
||||
<p class="text-xs">Use a soft gradient instead of a solid colour when viewing a class.</p>
|
||||
<p class="text-xs">Use a soft gradient instead of a solid colour when viewing a class</p>
|
||||
</div>
|
||||
<div>
|
||||
<Switch
|
||||
@@ -283,7 +283,6 @@
|
||||
await updatePluginSetting(plugin.pluginId, 'enabled', true);
|
||||
},
|
||||
() => {
|
||||
// Do nothing on cancel
|
||||
}
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -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<void> {
|
||||
const backgroundMusicPlugin: Plugin<typeof settings> = {
|
||||
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<typeof settings> = {
|
||||
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<typeof settings> = {
|
||||
};
|
||||
|
||||
export default backgroundMusicPlugin;
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ const settings = defineSettings({
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
const profilePicturePlugin: Plugin<typeof settings> = {
|
||||
id: "profile-picture",
|
||||
name: "Custom Profile Picture",
|
||||
@@ -74,7 +73,7 @@ const profilePicturePlugin: Plugin<typeof settings> = {
|
||||
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<typeof settings> = {
|
||||
};
|
||||
|
||||
export default profilePicturePlugin;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user