From 2be27299a5deb55eb8deb42c170daf064bc89d2f Mon Sep 17 00:00:00 2001 From: StroepWafel Date: Mon, 22 Jun 2026 20:19:17 +0930 Subject: [PATCH] fix(timetable): reopen colour picker + some quick fixes to dropdowns again --- lib/closePlugin.ts | 3 +- src/SEQTA.ts | 4 + src/css/injected.scss | 54 ++- src/interface/components/Select.svelte | 173 ++++++-- src/interface/pages/settings/general.svelte | 6 +- src/lib/extensionAssetUrl.ts | 9 + .../built-in/gradeAnalytics/core/index.ts | 6 +- .../built-in/gradeAnalytics/styles.css | 2 +- src/plugins/built-in/timetable/index.ts | 16 +- src/plugins/built-in/timetableEdit/index.ts | 170 ++++++-- src/plugins/built-in/timetableEdit/styles.css | 26 +- src/seqta/main.ts | 5 +- src/seqta/ui/colors/Manager.ts | 25 +- src/seqta/ui/fonts/Manager.ts | 3 +- .../utils/patchSeqtaMenuUpdateColours.ts | 74 ++++ src/seqta/utils/seqtaMenuColourPatch.js | 397 ++++++++++++++++++ src/seqta/utils/timetableColoris.ts | 82 +++- vite.config.ts | 7 + 18 files changed, 922 insertions(+), 140 deletions(-) create mode 100644 src/lib/extensionAssetUrl.ts create mode 100644 src/seqta/utils/patchSeqtaMenuUpdateColours.ts create mode 100644 src/seqta/utils/seqtaMenuColourPatch.js diff --git a/lib/closePlugin.ts b/lib/closePlugin.ts index 7a043fd3..6241c02a 100644 --- a/lib/closePlugin.ts +++ b/lib/closePlugin.ts @@ -52,7 +52,8 @@ export default function ClosePlugin(): Plugin { */ closeBundle() { console.log("Bundle closed"); // Log successful closure of the bundle - process.exit(0); // Exit with status 0 indicating a successful build + // Do not process.exit here — it can mask Vite render errors and break + // multi-target builds (`npm run build` runs chrome then firefox). }, }; } diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 60a6b6a7..3c897407 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -10,6 +10,7 @@ import * as plugins from "@/plugins"; import { main } from "@/seqta/main"; import { delay } from "./seqta/utils/delay"; import { initializeHideSensitiveToggle } from "@/seqta/utils/hideSensitiveToggle"; +import { installSeqtaMenuColourPatch } from "@/seqta/utils/patchSeqtaMenuUpdateColours"; function registerFetchSeqtaAppLinkListener() { browser.runtime.onMessage.addListener((request, _sender, sendResponse) => { @@ -46,6 +47,9 @@ if (document.childNodes[1]) { document.childNodes[1].textContent?.includes( "Copyright (c) SEQTA Software", ) ?? false; + if (hasSEQTAText) { + installSeqtaMenuColourPatch(); + } init(); } diff --git a/src/css/injected.scss b/src/css/injected.scss index 358da60e..b863e781 100644 --- a/src/css/injected.scss +++ b/src/css/injected.scss @@ -34,7 +34,8 @@ display: none; } -button.uiButton.timetable-zoom.iconFamily, +button.timetable-zoom.iconFamily, +button.bsplus-timetable-control.iconFamily, .iconFamily { font-family: "IconFamily" !important; } @@ -219,6 +220,13 @@ select option { pointer-events: none !important; } +/* Colour picker dialog teardown can leave an empty shell that blocks clicks */ +.modaliser-container:not(:has(.modaliser > *)) { + display: none !important; + visibility: hidden !important; + pointer-events: none !important; +} + .connectedNotificationsWrapper > div > button > svg > g { fill: var(--theme-primary) !important; } @@ -335,12 +343,18 @@ select option { } .timetable-zoom, -.timetable-hide { +.timetable-hide, +.bsplus-timetable-control { font-size: 14px !important; line-height: 1 !important; display: inline-flex !important; align-items: center; justify-content: center; + background: transparent; + border: none; + color: var(--text-primary); + cursor: pointer; + padding: 4px 8px; } #main > .dashboard { @@ -848,6 +862,11 @@ ol:has([class*="MessageList__avatar___"] svg) { .quickbar .actions [title="Choose a colour"] > svg { scale: 0.9; } + +.quickbar .actions .timetable-edit-quickbar-btn > svg { + scale: 0.9; + padding-top: 1px; +} .quickbar[data-yiq="light"] .actions { color: white !important; } @@ -1078,7 +1097,13 @@ div > ol:has(.uiFileHandlerWrapper) { min-height: 128px !important; } body.student #menu > ul::before { + content: ""; + display: block; + width: 100%; background-image: var(--betterseqta-logo) !important; + background-position: center; + background-repeat: no-repeat; + background-size: auto 48px; position: -webkit-sticky; position: sticky; top: 0; @@ -2712,11 +2737,24 @@ body { .days { width: 100%; } -.modaliser { - display: none; +/* Do not hide .modaliser globally — SEQTA Modaliser relies on transitionend to + dispose; display:none prevents that and leaves empty shells that block clicks. */ +.modaliser-container:not(.visible) { + display: none !important; + pointer-events: none !important; +} + +.modaliser-container.visible .modaliser { background: var(--better-main); } +/* ColourChooser teardown can leave a full-screen uiSlidePane that blocks entry clicks */ +.uiSlidePane:not(.shown):has(.pane.colourChooser) { + display: none !important; + pointer-events: none !important; + visibility: hidden !important; +} + [class*="MessageList__unread___"] { position: relative; background: var(--background-secondary, rgb(228 225 225)); @@ -2809,6 +2847,14 @@ body { border-radius: 4px; } +/* Never let a closed Coloris picker intercept timetable clicks */ +body:not(.clr-open) .clr-picker, +.clr-picker:not(.clr-open) { + display: none !important; + pointer-events: none !important; + visibility: hidden !important; +} + .dark [class*="MessageList__MessageList___"] > ol diff --git a/src/interface/components/Select.svelte b/src/interface/components/Select.svelte index 96cd1c69..b0ffe8c1 100644 --- a/src/interface/components/Select.svelte +++ b/src/interface/components/Select.svelte @@ -1,83 +1,170 @@ -
- - + {selectedLabel} + + + + {#if isOpen} + + {/if}
diff --git a/src/interface/pages/settings/general.svelte b/src/interface/pages/settings/general.svelte index f9d1bc8b..2f48d6d1 100644 --- a/src/interface/pages/settings/general.svelte +++ b/src/interface/pages/settings/general.svelte @@ -249,7 +249,7 @@ id: 10, Component: Select, props: { - state: $settingsState.defaultPage ?? "home", + value: $settingsState.defaultPage ?? "home", onChange: (value: string) => (settingsState.defaultPage = value), options: [ { value: "home", label: "Home" }, @@ -268,7 +268,7 @@ id: 11, Component: Select, props: { - state: $settingsState.newsSource, + value: $settingsState.newsSource, onChange: (value: string) => settingsState.newsSource = value, options: [ { value: "australia", label: "Australia" }, @@ -405,7 +405,7 @@ /> {:else if setting.type === 'select'}