From f935d0ad9d59aca6db54d4f319dd4b1f8d686f6f Mon Sep 17 00:00:00 2001 From: Aden Lindsay Date: Wed, 4 Nov 2026 12:33:31 +1030 Subject: [PATCH] revert: restore IconFamily and pre-Lucide icons Remove @lucide/svelte and lucide-static in favor of MenuItemSVGKey, IconFamily.woff, Heroicons overview paths, and inline SVGs used on upstream main. Co-authored-by: Cursor --- package-lock.json | 17 - package.json | 2 - src/css/documentload.scss | 8 + src/css/injected.scss | 55 +- src/css/tailwind.css | 2 + src/interface/components/Button.svelte | 8 +- .../components/ConnectMobileApp.svelte | 32 +- .../components/PlainCloseButton.svelte | 20 +- src/interface/components/Select.svelte | 39 +- .../colourPicker/GradientPicker.svelte | 13 +- .../OwnerThemeDetailModal.svelte | 10 +- .../components/icons/LucideMoon.svelte | 15 + .../components/icons/LucideSun.svelte | 15 + .../components/store/Backgrounds.svelte | 321 ++--- .../components/store/CloudHeader.svelte | 35 +- .../components/store/CoverSwiper.svelte | 55 +- src/interface/components/store/Header.svelte | 35 +- .../components/store/ThemeCard.svelte | 123 +- .../components/store/ThemeModal.svelte | 1187 ++++++++--------- .../themes/BackgroundUploader.svelte | 6 +- .../components/themes/ThemeSelector.svelte | 205 +-- src/interface/pages/settings.svelte | 55 +- src/interface/pages/settings/shortcuts.svelte | 192 ++- src/interface/pages/settings/theme.svelte | 41 +- src/interface/pages/themeCreator.svelte | 397 +++--- src/lib/icon.ts | 19 - src/lib/icons/lucideMoon.ts | 5 + src/lib/icons/lucideSun.ts | 5 + .../built-in/assessmentsAverage/index.ts | 4 +- .../built-in/assessmentsAverage/rubricCopy.ts | 12 +- .../built-in/assessmentsAverage/utils.ts | 8 +- .../AssessmentsOverview.svelte | 154 +-- .../assessmentsOverview/ErrorState.svelte | 4 +- .../assessmentsOverview/OverviewIcon.svelte | 32 + .../assessmentsOverview/SkeletonLoader.svelte | 39 +- .../built-in/assessmentsOverview/icons.ts | 80 +- .../BackgroundMusicSetting.svelte | 134 +- .../built-in/enhancedNavigation/index.ts | 6 +- .../src/components/Calculator.svelte | 107 +- .../src/components/SearchBar.svelte | 286 ++-- .../src/components/SearchIcon.svelte | 48 - .../components/items/AssessmentItem.svelte | 35 +- .../src/components/items/ForumItem.svelte | 35 +- .../src/components/items/GenericItem.svelte | 91 +- .../src/components/items/SubjectItem.svelte | 36 +- .../globalSearch/src/core/commands.ts | 19 +- .../globalSearch/src/core/mountSearchBar.ts | 7 +- .../globalSearch/src/core/searchIcons.ts | 34 - .../gradeAnalytics/ClassGroupsPanel.svelte | 17 +- .../gradeAnalytics/GradeAnalyticsPage.svelte | 74 +- .../gradeAnalytics/GradeInferencePanel.svelte | 25 +- .../gradeAnalytics/injectAnalyticsMenuItem.ts | 4 +- src/plugins/built-in/messageFolders/index.ts | 189 ++- .../injectArchivedNotifications.ts | 4 +- .../ProfilePictureSetting.svelte | 9 +- .../timetable/CalendarSyncControl.svelte | 64 +- src/plugins/built-in/timetable/index.ts | 17 +- .../ClassmatesToolbarChip.svelte | 3 +- .../TimetableClassmatesOptInPopup.svelte | 7 +- src/plugins/built-in/timetableEdit/index.ts | 5 +- src/resources/fonts/IconFamily.woff | Bin 0 -> 576720 bytes src/resources/icons/betterseqta-icon.svg | 5 + src/seqta/content/MenuItemSVGKey.json | 13 + src/seqta/icons/assessmentsIcon.ts | 5 + src/seqta/icons/coursesIcon.ts | 5 + src/seqta/ui/addBetterSEQTAElements.ts | 23 +- src/seqta/ui/titlebar/TitleBar.svelte | 19 +- src/seqta/utils/ensureSettingsAccess.ts | 6 +- src/seqta/utils/founderBadges.ts | 22 +- src/seqta/utils/loaders/loadEngageHomePage.ts | 9 +- src/seqta/utils/loaders/loadHomePage.ts | 21 +- .../utils/openers/openThemeOfTheMonthPopup.ts | 10 +- src/seqta/utils/pageIcons.ts | 47 +- src/seqta/utils/sidebarMenuIcons.ts | 8 +- 74 files changed, 2107 insertions(+), 2592 deletions(-) create mode 100644 src/interface/components/icons/LucideMoon.svelte create mode 100644 src/interface/components/icons/LucideSun.svelte delete mode 100644 src/lib/icon.ts create mode 100644 src/lib/icons/lucideMoon.ts create mode 100644 src/lib/icons/lucideSun.ts create mode 100644 src/plugins/built-in/assessmentsOverview/OverviewIcon.svelte delete mode 100644 src/plugins/built-in/globalSearch/src/components/SearchIcon.svelte delete mode 100644 src/plugins/built-in/globalSearch/src/core/searchIcons.ts create mode 100644 src/resources/fonts/IconFamily.woff create mode 100644 src/resources/icons/betterseqta-icon.svg create mode 100644 src/seqta/content/MenuItemSVGKey.json create mode 100644 src/seqta/icons/assessmentsIcon.ts create mode 100644 src/seqta/icons/coursesIcon.ts diff --git a/package-lock.json b/package-lock.json index c63f8495..a2808757 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "@codemirror/state": "^6.7.6", "@codemirror/view": "^6.43.15", "@huggingface/transformers": "^3.8.1", - "@lucide/svelte": "^1.66.0", "@uiw/codemirror-extensions-color": "^4.25.12", "@uiw/codemirror-theme-github": "^4.25.12", "canvas-confetti": "^1.9.4", @@ -32,7 +31,6 @@ "fuse.js": "^7.5.0", "layerchart": "^2.9.2", "localforage": "^1.10.0", - "lucide-static": "^1.66.0", "mathjs": "^15.2.0", "motion": "^14.9.0", "pdfjs-dist": "^6.5.438", @@ -2465,15 +2463,6 @@ "@lezer/common": "^1.0.0" } }, - "node_modules/@lucide/svelte": { - "version": "1.67.0", - "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-1.67.0.tgz", - "integrity": "sha512-DeqoOkMm3QihcNsrQB5drR/8azWDGuozfagDpm/anIqaJdflLUMhwLFPEANl/W3FLhXx6HmQwEWz7zBtZ6KXcQ==", - "license": "ISC", - "peerDependencies": { - "svelte": "^5" - } - }, "node_modules/@marijn/find-cluster-break": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.4.tgz", @@ -8567,12 +8556,6 @@ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "license": "ISC" }, - "node_modules/lucide-static": { - "version": "1.67.0", - "resolved": "https://registry.npmjs.org/lucide-static/-/lucide-static-1.67.0.tgz", - "integrity": "sha512-Lu/Ntwfw1GOQiNgTC2iHd/PC4QbqzwktLVFHTB84tldlfUjFgQ+EBWiZc/UPrlNdX97O/KXWRn792hIdQh6nhA==", - "license": "ISC" - }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", diff --git a/package.json b/package.json index 457f0cf3..2f1bc1d5 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "@codemirror/state": "^6.7.6", "@codemirror/view": "^6.43.15", "@huggingface/transformers": "^3.8.1", - "@lucide/svelte": "^1.66.0", "@uiw/codemirror-extensions-color": "^4.25.12", "@uiw/codemirror-theme-github": "^4.25.12", "canvas-confetti": "^1.9.4", @@ -58,7 +57,6 @@ "fuse.js": "^7.5.0", "layerchart": "^2.9.2", "localforage": "^1.10.0", - "lucide-static": "^1.66.0", "mathjs": "^15.2.0", "motion": "^14.9.0", "pdfjs-dist": "^6.5.438", diff --git a/src/css/documentload.scss b/src/css/documentload.scss index eac27843..19974d1e 100644 --- a/src/css/documentload.scss +++ b/src/css/documentload.scss @@ -26,6 +26,14 @@ font-display: swap; } +@font-face { + font-family: "IconFamily"; + src: url("@/resources/fonts/IconFamily.woff") format("woff"); + font-weight: normal; + font-style: normal; + font-display: block; +} + @layer base, override; @layer override { diff --git a/src/css/injected.scss b/src/css/injected.scss index 689e87e1..7c3312bf 100644 --- a/src/css/injected.scss +++ b/src/css/injected.scss @@ -31,13 +31,10 @@ pointer-events: none; } -@mixin lucide-icon($name, $size) { - content: ""; - display: inline-block; - width: $size; - height: $size; - background: currentColor; - mask: url("lucide-static/icons/#{$name}.svg") center / contain no-repeat; +button.timetable-zoom.iconFamily, +button.bsplus-timetable-control.iconFamily, +.iconFamily { + font-family: "IconFamily" !important; } .hidden { @@ -1236,12 +1233,15 @@ td.colourBar { padding-left: 30px; } #toolbar span:has(.search)::before { - @include lucide-icon("search", 16px); + content: "\eca5"; position: absolute; left: 8px; z-index: 10; top: 50%; transform: translateY(-50%); + color: currentColor; + font-size: 16px; + font-family: "IconFamily"; pointer-events: none; } #container #content .search { @@ -2033,15 +2033,6 @@ html.transparencyEffects [class*="BasicPanel__BasicPanel___q92_U"] > ol > li + l z-index: 21 !important; color: var(--better-sub); padding: 8px; - - > svg { - display: none; - } - - &::before { - @include lucide-icon(bell, 24px); - background: var(--theme-primary); - } } .legacy-root button > svg, .legacy-root a > svg { @@ -3353,23 +3344,35 @@ body:not(.clr-open) .clr-picker, align-items: center; } [data-label="inbox"] > [class*="LabelList__name___"]::before { - @include lucide-icon("inbox", 16px); + content: "\eb70"; + color: currentColor; + font-size: 16px; margin-right: 8px; + font-family: "IconFamily"; pointer-events: none; } [data-label="outbox"] > [class*="LabelList__name___"]::before { - @include lucide-icon("send", 16px); + content: "\eca6"; + color: currentColor; + font-size: 16px; margin-right: 8px; + font-family: "IconFamily"; pointer-events: none; } [data-label="starred"] > [class*="LabelList__name___"]::before { - @include lucide-icon("star", 16px); + content: "\ece8"; + color: currentColor; + font-size: 16px; margin-right: 8px; + font-family: "IconFamily"; pointer-events: none; } [data-label="trash"] > [class*="LabelList__name___"]::before { - @include lucide-icon("trash", 16px); + content: "\ed2c"; + color: currentColor; + font-size: 16px; margin-right: 8px; + font-family: "IconFamily"; pointer-events: none; } .outer-circle { @@ -4513,7 +4516,10 @@ div.day-empty { cursor: pointer; } #whatsnewclosebutton::before { - @include lucide-icon("x", 24px); + content: "\ed8a"; + color: currentColor; + font-size: 24px; + font-family: "IconFamily"; pointer-events: none; } .whatsnewTextContainer h1:not(.whatsnewTextHeader) { @@ -5699,7 +5705,10 @@ h2.home-subtitle { } .bsplus-ld-surprise-close::before { - @include lucide-icon("x", 20px); + content: "\ed8a"; + font-family: "IconFamily"; + font-size: 20px; + line-height: 1; pointer-events: none; } diff --git a/src/css/tailwind.css b/src/css/tailwind.css index 90311e3c..7dff8e2d 100644 --- a/src/css/tailwind.css +++ b/src/css/tailwind.css @@ -29,6 +29,8 @@ --animate-spin-fast: spin 0.4s linear infinite; --aspect-theme: 5 / 1; + + --font-IconFamily: IconFamily; } @layer base { diff --git a/src/interface/components/Button.svelte b/src/interface/components/Button.svelte index de42a5cb..d20dd0cc 100644 --- a/src/interface/components/Button.svelte +++ b/src/interface/components/Button.svelte @@ -1,19 +1,17 @@
-
@@ -158,15 +150,13 @@
diff --git a/src/interface/components/PlainCloseButton.svelte b/src/interface/components/PlainCloseButton.svelte index 4d2a569a..18f3e538 100644 --- a/src/interface/components/PlainCloseButton.svelte +++ b/src/interface/components/PlainCloseButton.svelte @@ -1,9 +1,5 @@ + + diff --git a/src/interface/components/icons/LucideSun.svelte b/src/interface/components/icons/LucideSun.svelte new file mode 100644 index 00000000..97a9cab0 --- /dev/null +++ b/src/interface/components/icons/LucideSun.svelte @@ -0,0 +1,15 @@ + + + diff --git a/src/interface/components/store/Backgrounds.svelte b/src/interface/components/store/Backgrounds.svelte index 06e315fe..bd140145 100644 --- a/src/interface/components/store/Backgrounds.svelte +++ b/src/interface/components/store/Backgrounds.svelte @@ -1,36 +1,14 @@
- -
-
-

- Explore Backgrounds {searchTerm ? `- "${searchTerm}"` : ""} -

-
- + +
+
+

Explore Backgrounds {searchTerm ? `- "${searchTerm}"` : ''}

+
+ +
+
+ + +
+ {#each ['All', 'Installed', 'Photos', 'Videos'] as tab} + + {/each}
- -
- {#each ["All", "Installed", "Photos", "Videos"] as tab} - - {/each} -
-
- - -
- {#if isLoading} -
- {#each Array(9) as _} -
- -
- -
- -
-
-
+ +
+ {#if isLoading} +
+ {#each Array(9) as _} +
+ +
+ +
+ +
+
+
+
-
- {/each} -
- {:else if error} -
- Error: {error} -
- {:else} -
- {#each filteredBackgrounds.filter((bg: Background) => { - if (activeTab === "installed") return savedBackgrounds.includes(bg.id); - if (activeTab === "photos") return bg.type === "image"; - if (activeTab === "videos") return bg.type !== "image"; - return true; - }) as background (background.id)} -
toggleBackgroundInstallation(background)} - onkeydown={(event) => { - if (event.key === "Enter" || event.key === " ") { - toggleBackgroundInstallation(background); - } - }} - role="button" - tabindex="0" - > - {#if background.type === "image"} - {background.name} - {:else} - - {/if} + {/each} +
+ {:else if error} +
+ Error: {error} +
+ {:else} +
+ {#each filteredBackgrounds.filter((bg: Background) => { + if (activeTab === 'installed') return savedBackgrounds.includes(bg.id); + if (activeTab === 'photos') return bg.type === 'image'; + if (activeTab === 'videos') return bg.type !== 'image'; + return true; + }) as background (background.id)}
toggleBackgroundInstallation(background)} + onkeydown={(event) => { + if (event.key === 'Enter' || event.key === ' ') { + toggleBackgroundInstallation(background); + } + }} + role="button" + tabindex="0" > - {#if installingBackgrounds.has(background.id)} - - {:else if savedBackgrounds.includes(background.id)} - - - Remove - + {#if background.type === 'image'} + {background.name} {:else} - - - Install - + {/if} +
+ {#if installingBackgrounds.has(background.id)} + + {:else if savedBackgrounds.includes(background.id)} + + + Remove + + {:else} + + + Install + + {/if} +
-
- {/each} -
- {/if} -
+ {/each} +
+ {/if} +
{#if settingsState.devMode} @@ -303,7 +262,7 @@

Debug Info:

{debugInfo}

Total backgrounds: {backgrounds.length}

-

Categories: {categories.join(", ") || ""}

+

Categories: {categories.join(', ') || ''}

Active Tab: {activeTab}

Selected Category: {selectedCategory}

diff --git a/src/interface/components/store/CloudHeader.svelte b/src/interface/components/store/CloudHeader.svelte index 16e1efe1..f014c225 100644 --- a/src/interface/components/store/CloudHeader.svelte +++ b/src/interface/components/store/CloudHeader.svelte @@ -1,15 +1,10 @@ {#if slides.length > 0} -
+
- {#each slides as slide (slide.imageUrl + slide.title + (slide.subtitle ?? ""))} + {#each slides as slide (slide.imageUrl + slide.title + (slide.subtitle ?? ''))}
{ - if (e.key === "Enter") setDisplayTheme(slide.openTheme); + if (e.key === 'Enter') setDisplayTheme(slide.openTheme); }} onclick={() => setDisplayTheme(slide.openTheme)} > - + {#if slide.badgeFeatured === true}
- + + + Featured
@@ -82,9 +75,7 @@

{slide.subtitle}

{/if} {#if slide.openTheme.author && !slide.subtitle} -

- By {slide.openTheme.author} -

+

By {slide.openTheme.author}

{/if} {#if slide.openTheme.description && !slide.subtitle}

{slide.openTheme.description}

@@ -102,7 +93,9 @@ type="button" class="flex justify-center items-center w-8 h-8 text-white rounded-full bg-black/50 dark:bg-zinc-800 transition-all duration-200" > - + + +
@@ -134,7 +129,7 @@ rgb(0 0 0 / 8%) 72%, transparent 88% ); - content: ""; + content: ''; pointer-events: none; } diff --git a/src/interface/components/store/Header.svelte b/src/interface/components/store/Header.svelte index 6f60de48..0aef5c06 100644 --- a/src/interface/components/store/Header.svelte +++ b/src/interface/components/store/Header.svelte @@ -1,6 +1,4 @@ -
{ - if (e.target === e.currentTarget) hideModal(); - }} - onkeydown={(e) => { - if (e.target === e.currentTarget && e.key === "Escape") hideModal(); - }} - role="presentation" - transition:fade +class="flex fixed inset-0 z-50 items-center justify-center bg-black/70 backdrop-blur-xs p-4 sm:p-6" +onclick={(e) => { +if (e.target === e.currentTarget) hideModal() +}} +onkeydown={(e) => { +if (e.target === e.currentTarget && e.key === 'Escape') hideModal() +}} +role="presentation" +transition:fade > - -
e.stopPropagation()} - onkeydown={(e) => e.stopPropagation()} - role="dialog" - aria-modal="true" - tabindex="-1" - > - {#if theme} -
-
- -
-
-

- {theme.name} -

- {#if isCommunity} - - Community - - {/if} - {#if theme.featured === true} - - - Featured - - {/if} -
- {#if theme.author} -

- By {theme.author} -

- {/if} -
- {#if !adminPreviewMode} - - - {modalDisplayDownloadCount.toLocaleString()} downloads - - {:else} - Admin preview — does not count as a public download - {/if} - {#if showFavorites} - - - {(theme.favorite_count ?? 0).toLocaleString()} favorites - - {/if} -
- {#if heroSlides.length > 0} - {#key theme?.id} -
-
-
- {#each heroSlides as slide, slideIdx (slideIdx)} -
- {slide.caption} -
- {/each} -
-
- {#if heroSlides.length > 1} -
- - -
- {/if} -
- {/key} - {/if} - {#if hasFlavours} - {@const masterThumb = masterCarouselImageUrl(theme)} -

Variants

-
- {#if currentThemes.includes(theme.id)} -
- {#if masterThumb} - + +
e.stopPropagation()} +onkeydown={(e) => e.stopPropagation()} +role="dialog" +aria-modal="true" +tabindex="-1" +> +{#if theme} +
+
+ +
+
+

+{theme.name} +

+{#if isCommunity} + +Community + +{/if} +{#if theme.featured === true} + + + + +Featured + +{/if} +
+{#if theme.author} +

+By {theme.author} +

+{/if} +
+{#if !adminPreviewMode} + + + + +{modalDisplayDownloadCount.toLocaleString()} downloads + +{:else} +Admin preview — does not count as a public download +{/if} +{#if showFavorites} + + + + +{(theme.favorite_count ?? 0).toLocaleString()} favorites + +{/if} +
+{#if heroSlides.length > 0} +{#key theme?.id} +
+
+
+{#each heroSlides as slide, slideIdx (slideIdx)} +
+{slide.caption} +
+{/each} +
+
+{#if heroSlides.length > 1} +
+ + +
+{/if} +
+{/key} +{/if} +{#if hasFlavours} +{@const masterThumb = masterCarouselImageUrl(theme)} +

Variants

+
+{#if currentThemes.includes(theme.id)} +
+{#if masterThumb} + {:else} {/if} -
- {#if installingId === theme.id} - - - - {/if} - - {theme.id === selectedThemeId ? "Applied · " : ""}{theme.name} - - Master · Installed -
- {#if theme.id !== selectedThemeId} - - {/if} - -
-
-
- {:else} - +{/if} + +
+
+
+{:else} + - {/if} - {#each theme.flavours ?? [] as f, flavourIdx (f.id)} - {@const thumb = flavourCarouselImageUrl(f)} - {#if currentThemes.includes(f.id)} -
- {#if thumb} - +
+{#if installingId === theme.id} + + + +{/if} +{theme.name} +Master +
+ +{/if} +{#each theme.flavours ?? [] as f, flavourIdx (f.id)} +{@const thumb = flavourCarouselImageUrl(f)} +{#if currentThemes.includes(f.id)} +
+{#if thumb} + {:else} {/if} -
- {#if installingId === f.id} - - - - {/if} - - {f.id === selectedThemeId ? "Applied · " : ""}{f.name} - - Installed -
- {#if f.id !== selectedThemeId} - - {/if} - -
-
-
- {:else} - +{/if} + +
+
+
+{:else} + - {/if} - {/each} -
- {/if} -

- {theme.description} -

-
- {#if showFavorites && toggleFavorite && theme} - - {/if} - {#if !hasFlavours} - {#if currentThemes.includes(theme.id)} - {#if theme.id === selectedThemeId} - - {:else} - - {/if} - - {:else} - - {/if} - {/if} -
- {#if relatedThemes.length > 0} -
-

Related themes

-
- {#each relatedThemes as relatedTheme (relatedTheme.id)} - - {/each} -
- {/if} -
- {:else} -
- -
- {/if} -
+
+{#if installingId === f.id} + + + +{/if} +{f.name} +
+ +{/if} +{/each} +
+{/if} +

+{theme.description} +

+
+{#if showFavorites && toggleFavorite && theme} + +{/if} +{#if !hasFlavours} +{#if currentThemes.includes(theme.id)} +{#if theme.id === selectedThemeId} + +{:else} + +{/if} + +{:else} + +{/if} +{/if} +
+{#if relatedThemes.length > 0} +
+

+Related themes +

+
+{#each relatedThemes as relatedTheme (relatedTheme.id)} + +{/each} +
+{/if} +
+{:else} +
+ +
+{/if} +
diff --git a/src/interface/components/themes/BackgroundUploader.svelte b/src/interface/components/themes/BackgroundUploader.svelte index 3e098c0f..6fbb765a 100644 --- a/src/interface/components/themes/BackgroundUploader.svelte +++ b/src/interface/components/themes/BackgroundUploader.svelte @@ -1,5 +1,4 @@ @@ -170,26 +162,18 @@ role="list" tabindex="-1" > -
+
{#if themes} {#each themes.themes as theme (theme.id)} @@ -348,7 +285,7 @@ onclick={() => void openThemeCreator()} class="flex justify-center items-center w-full rounded-xl transition aspect-theme bg-zinc-100 dark:bg-zinc-900 dark:text-white" > - + Create your own {/if} diff --git a/src/interface/pages/settings.svelte b/src/interface/pages/settings.svelte index 3b2b345e..97007066 100644 --- a/src/interface/pages/settings.svelte +++ b/src/interface/pages/settings.svelte @@ -1,10 +1,4 @@ {#snippet settingItem(item: SettingItem)} - {#if item.type === "conditional"} - {#if (item.props as ConditionalProps).condition} + {#if item.type === 'conditional'} + {#if (item.props as ConditionalProps).condition }
{@render settingItem((item.props as ConditionalProps).children)}
{/if} {:else} -
+
{ - item.direction === "vertical" && toggleAccordion(item.title, e); - }} - onkeydown={(e) => { - e.key === "Enter" && item.direction === "vertical" && toggleAccordion(item.title, e); - }} - class="flex justify-between pr-4 {item.direction === 'vertical' - ? 'cursor-pointer w-full select-none' - : ''}" - > + onclick={(e) => { item.direction === 'vertical' && toggleAccordion(item.title, e) }} + onkeydown={(e) => { e.key === 'Enter' && item.direction === 'vertical' && toggleAccordion(item.title, e) }} + class="flex justify-between pr-4 {item.direction === 'vertical' ? 'cursor-pointer w-full select-none' : ''}"> +

{item.title}

{item.description}

- {#if item.direction === "vertical"} -
- {#if item.type === "codeEditor"} + {#if item.direction === 'vertical'} +
+ {#if item.type === 'codeEditor'} - {/if} - - + + {'\ue9e6'}
{/if}
{#if !closedAccordions.includes(item.title)} -
- {#if item.type === "switch"} - - {:else if item.type === "button"} -
{/each} - -
- - Add image - + +
+ {'\uec60'} + Add image +
- {:else if item.type === "lightDarkToggle"} + {:else if item.type === 'lightDarkToggle'} {/if}
@@ -494,11 +425,7 @@

Custom CSS

- +
{/if} -
+
+

Theme Creator

- - - Need help? Check out the docs! + + {'\ueb44'} + + Need help? Check out the docs! +
-
Theme Name
+
Theme Name
+ class='p-2 mb-4 w-full rounded-lg border-0 transition dark:placeholder-zinc-300 bg-zinc-200 dark:bg-zinc-700 focus:bg-zinc-300/50 dark:focus:bg-zinc-600' />
-
- Description (optional) -
+
Description (optional)
+ class='p-2 w-full rounded-lg border-0 transition dark:placeholder-zinc-300 bg-zinc-200 dark:bg-zinc-700 focus:outline-hidden focus:ring-1 focus:ring-zinc-100 dark:focus:ring-zinc-700 focus:bg-zinc-300/50 dark:focus:bg-zinc-600'>

Accent colour

-

- Default accent and gradient start colour. -

+

Default accent and gradient start colour.

Images & page background

- Upload images, then choose how each one is used. Set one as the live SEQTA page background - to preview it on the main page. + Upload images, then choose how each one is used. Set one as the live SEQTA page background to preview it on the main page.

@@ -614,22 +530,15 @@ placeholder="CSS variable" class="min-w-0 flex-1 rounded-lg border-0 bg-zinc-100 p-2 text-sm dark:bg-zinc-600 dark:text-white" /> -
@@ -694,14 +601,11 @@

Adaptive CSS variables

- One per line, each must start with --. These receive the same - colour as the adaptive accent when "Adaptive theme colour" is enabled in general - settings. Use them in Custom CSS, e.g. - border-color: var(--my-accent); + One per line, each must start with --. These receive the same colour as the adaptive accent when "Adaptive theme colour" is enabled in general settings. Use them in Custom CSS, e.g. border-color: var(--my-accent);

@@ -721,13 +625,58 @@ - {#each [{ type: "switch", title: "Hide Theme Name", description: "Useful when your cover image contains text", props: { state: theme.hideThemeName, onChange: (value: boolean) => (theme = { ...theme, hideThemeName: value }) } }, { type: "switch", title: "Force Theme", description: "Force users to use either dark or light mode", props: { state: shouldForceThemeAppearance(theme), onChange: (value: boolean) => { - if (value) { - theme = { ...theme, forceTheme: true, forceDark: false }; - } else { - theme = { ...theme, forceTheme: false, forceDark: undefined }; - } - } } }, { type: "conditional", props: { condition: shouldForceThemeAppearance(theme), children: { type: "lightDarkToggle", title: "Mode", description: "Choose whether to force light or dark mode", props: { state: theme.forceDark === true, onChange: (value: boolean) => (theme = { ...theme, forceDark: value, forceTheme: true }) } } } }, { type: "codeEditor", title: "Custom CSS", description: "Extra CSS appended after generated theme rules", direction: "vertical", props: { value: creatorMeta.userCustomCss, onChange: (value: string) => patchCreatorMeta( { userCustomCss: value } ) } }] as SettingItem[] as setting} + {#each [ + { + type: 'switch', + title: 'Hide Theme Name', + description: 'Useful when your cover image contains text', + props: { + state: theme.hideThemeName, + onChange: (value: boolean) => theme = { ...theme, hideThemeName: value } + } + }, + { + type: 'switch', + title: 'Force Theme', + description: 'Force users to use either dark or light mode', + props: { + state: shouldForceThemeAppearance(theme), + onChange: (value: boolean) => { + if (value) { + theme = { ...theme, forceTheme: true, forceDark: false }; + } else { + theme = { ...theme, forceTheme: false, forceDark: undefined }; + } + } + } + }, + { + type: 'conditional', + props: { + condition: shouldForceThemeAppearance(theme), + children: { + type: 'lightDarkToggle', + title: 'Mode', + description: 'Choose whether to force light or dark mode', + props: { + state: theme.forceDark === true, + onChange: (value: boolean) => + (theme = { ...theme, forceDark: value, forceTheme: true }) + } + } + } + }, + { + type: 'codeEditor', + title: 'Custom CSS', + description: 'Extra CSS appended after generated theme rules', + direction: 'vertical', + props: { + value: creatorMeta.userCustomCss, + onChange: (value: string) => patchCreatorMeta({ userCustomCss: value }) + } + } + ] as SettingItem[] as setting} {@render settingItem(setting)} {/each} @@ -759,4 +708,4 @@ {/if}
-
+
\ No newline at end of file diff --git a/src/lib/icon.ts b/src/lib/icon.ts deleted file mode 100644 index 1482c2e8..00000000 --- a/src/lib/icon.ts +++ /dev/null @@ -1,19 +0,0 @@ -type IconOptions = { - class?: string; - id?: string; - size?: number | string; - style?: string; -}; - -export function icon(svg: string, options: IconOptions = {}): string { - const size = options.size ?? 24; - let markup = svg - .trim() - .replace(/\swidth="24"/, ` width="${size}"`) - .replace(/\sheight="24"/, ` height="${size}"`) - .replace("
diff --git a/src/plugins/built-in/assessmentsOverview/AssessmentsOverview.svelte b/src/plugins/built-in/assessmentsOverview/AssessmentsOverview.svelte index 56563854..1f112c53 100644 --- a/src/plugins/built-in/assessmentsOverview/AssessmentsOverview.svelte +++ b/src/plugins/built-in/assessmentsOverview/AssessmentsOverview.svelte @@ -10,15 +10,11 @@ import { settingsState } from "@/seqta/utils/listeners/settingsState"; import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage"; import { buildEngageAssessmentPagePath } from "@/seqta/utils/engageAssessmentStudent"; - import CalendarDaysIcon from "@lucide/svelte/icons/calendar-days"; - import ClipboardListIcon from "@lucide/svelte/icons/clipboard-list"; - import EllipsisVerticalIcon from "@lucide/svelte/icons/ellipsis-vertical"; - import EyeIcon from "@lucide/svelte/icons/eye"; + import OverviewIcon from "./OverviewIcon.svelte"; import { - DEFAULT_COLUMN_ICON, GROUP_SORT_ICONS, STATUS_COLUMN_ICONS, - type OverviewIcon, + type OverviewIconName, } from "./icons"; import confetti from "canvas-confetti"; @@ -34,43 +30,18 @@ key: string; title: string; className: string; - icon: OverviewIcon; + icon: OverviewIconName; }; const HIDDEN_ASSESSMENTS_KEY = "betterseqta-hidden-assessments"; const COMPLETED_ASSESSMENTS_KEY = "betterseqta-completed-assessments"; const STATUS_COLUMNS: Column[] = [ - { - key: "UPCOMING", - title: "Upcoming", - className: "column-upcoming", - icon: STATUS_COLUMN_ICONS.UPCOMING, - }, - { - key: "DUE_SOON", - title: "Due Soon", - className: "column-due-soon", - icon: STATUS_COLUMN_ICONS.DUE_SOON, - }, - { - key: "OVERDUE", - title: "Overdue", - className: "column-overdue", - icon: STATUS_COLUMN_ICONS.OVERDUE, - }, - { - key: "SUBMITTED", - title: "Submitted", - className: "column-submitted", - icon: STATUS_COLUMN_ICONS.SUBMITTED, - }, - { - key: "MARKS_RELEASED", - title: "Marked", - className: "column-marked", - icon: STATUS_COLUMN_ICONS.MARKS_RELEASED, - }, + { key: "UPCOMING", title: "Upcoming", className: "column-upcoming", icon: "calendar-days" }, + { key: "DUE_SOON", title: "Due Soon", className: "column-due-soon", icon: "clock" }, + { key: "OVERDUE", title: "Overdue", className: "column-overdue", icon: "exclamation-triangle" }, + { key: "SUBMITTED", title: "Submitted", className: "column-submitted", icon: "document-check" }, + { key: "MARKS_RELEASED", title: "Marked", className: "column-marked", icon: "check-circle" }, ]; const isEngage = isSeqtaEngageExperience(); @@ -172,11 +143,7 @@ if (hiddenIds.includes(String(a.id))) return false; if (subjectFilters[a.code] === false) return false; if (currentFilters.subject !== "all" && a.code !== currentFilters.subject) return false; - if ( - isEngage && - currentFilters.student !== "all" && - String(a.studentId) !== currentFilters.student - ) { + if (isEngage && currentFilters.student !== "all" && String(a.studentId) !== currentFilters.student) { return false; } return true; @@ -189,7 +156,7 @@ return { filteredAssessments: filtered, statusGroups: groups, columns: STATUS_COLUMNS }; } - const icon = GROUP_SORT_ICONS[currentFilters.sortBy] ?? DEFAULT_COLUMN_ICON; + const icon = GROUP_SORT_ICONS[currentFilters.sortBy] ?? "queue-list"; const keys = Object.keys(groups); const subjectTitles = new Map( data?.subjects?.map((s: any) => [s.code, `${s.code} - ${s.title}`]) ?? [], @@ -260,15 +227,7 @@ if (overdueCount === 0 && dueSoonCount === 0) { setTimeout(() => { const end = Date.now() + 100; - const side = { - particleCount: 17, - spread: 65, - startVelocity: 40, - scalar: 2, - gravity: 2, - decay: 0.97, - ticks: 300, - }; + const side = { particleCount: 17, spread: 65, startVelocity: 40, scalar: 2, gravity: 2, decay: 0.97, ticks: 300 }; const frame = () => { fireConfetti({ ...side, angle: 60, drift: 0.8, origin: { x: 0, y: 1 } }); fireConfetti({ ...side, angle: 120, drift: -0.8, origin: { x: 1, y: 1 } }); @@ -334,11 +293,7 @@ {/each} - @@ -352,7 +307,7 @@ onclick={() => (showVisibilityPanel = !showVisibilityPanel)} title="Manage hidden subjects and assessments" > - + Visibility ({hiddenSubjects.length + hiddenAssessmentsWithInfo.length}) {/if} @@ -369,10 +324,7 @@ {#each hiddenSubjects as subject} {subject.code} - + {/each}
@@ -385,9 +337,7 @@ {#each hiddenAssessmentsWithInfo as assessment} {assessment.title} - + {/each}
@@ -399,7 +349,7 @@
{#if board.filteredAssessments.length === 0}
- +

No assessments found matching your filters

{:else} @@ -410,12 +360,15 @@
- - - {column.title} - - {board.statusGroups[column.key].length} -
+ + + {column.title} + + {board.statusGroups[column.key].length} +
{#each board.statusGroups[column.key] as assessment} @@ -423,7 +376,7 @@ {@const dueDateClass = getDueDateClass(assessment)} {@const isCompleted = completedIds.includes(assessment.id)} {@const color = data.colors[assessment.code] || "#6366f1"} -
handleCardClick(assessment, e)} role="button" tabindex="0" - onkeydown={(e) => e.key === "Enter" && handleCardClick(assessment, e)} + onkeydown={(e) => e.key === 'Enter' && handleCardClick(assessment, e)} >
{#if isEngage && assessment.studentName} @@ -439,58 +392,37 @@ {/if} {assessment.code} {#if assessment.submitted} - + {/if} {#if isCompleted && status === "MARKS_RELEASED" && !assessmentHasGradeDisplay(assessment)} - Completed + Completed {/if}
{#if status !== "MARKS_RELEASED" || isCompleted}
- -