diff --git a/src/css/injected.scss b/src/css/injected.scss index 555bea18..4e6a1b6e 100644 --- a/src/css/injected.scss +++ b/src/css/injected.scss @@ -3615,26 +3615,6 @@ div.day-empty { font-size: 1em; color: var(--text-primary); } -.whatsnewHeader.engageParentsAnnouncementHeader { - height: auto; - min-height: unset; -} -.whatsnewHeader.engageParentsAnnouncementHeader h1 { - line-height: 1.2; -} -.whatsnewHeader.engageParentsAnnouncementHeader .engageParentsSubheading { - margin-top: 0.35rem; - font-size: 1.05rem; - font-weight: 600; - opacity: 0.92; -} -.seqtaEngageAccent { - color: #ea580c; - font-weight: 700; -} -.dark .seqtaEngageAccent { - color: #fb923c; -} .whatsnewBackground { width: 100%; height: 100%; @@ -3763,25 +3743,6 @@ div.day-empty { object-fit: cover; margin-bottom: 12px; } -.whatsnewTextContainer .engageParentsPromoWrap { - width: 100%; - margin-bottom: 12px; - border-radius: 16px; - overflow: hidden; - aspect-ratio: 16 / 9; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.28); - background: color-mix(in srgb, var(--background-secondary) 88%, var(--text-primary) 12%); -} -.whatsnewTextContainer .engageParentsPromoWrap .engageParentsPromoImg { - display: block; - width: 100%; - height: 100%; - margin: 0; - border-radius: 0; - aspect-ratio: unset; - object-fit: contain; - object-position: center; -} .whatsnewHeader.bsCloudAutoSyncAnnouncementHeader { height: auto; @@ -5014,66 +4975,3 @@ h2.home-subtitle { font-size: 20px; font-weight: 400; } - -.bsplus-toast { - position: fixed; - right: max(18px, env(safe-area-inset-right)); - bottom: max(18px, env(safe-area-inset-bottom)); - z-index: 10000; - width: min(360px, calc(100vw - 36px)); - padding: 14px 16px 16px; - border: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent); - border-radius: 20px; - background: var(--background-primary, #fff); - color: var(--text-primary, #1a1a1a); - box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35); - font-size: 0.9rem; - line-height: 1.45; -} -.bsplus-toast-eyebrow { - margin: 0 0 6px !important; - font-size: 0.72rem !important; - font-weight: 700; - letter-spacing: 0.08em; - text-transform: uppercase; - color: color-mix(in srgb, #ea580c 82%, var(--text-primary) 18%); - opacity: 1 !important; -} -.dark .bsplus-toast-eyebrow { - color: color-mix(in srgb, #fb923c 82%, var(--text-primary) 18%); -} -.bsplus-toast-content strong { - display: block; - padding-right: 34px; - font-size: 1.2rem; - line-height: 1.2; -} -.bsplus-toast-content p:not(.bsplus-toast-eyebrow) { - display: -webkit-box; - margin: 8px 0 0; - overflow: hidden; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; - color: color-mix(in srgb, var(--text-primary) 78%, transparent); - font-size: 0.92rem; - line-height: 1.45; -} -.bsplus-toast-close { - position: absolute !important; - top: 4px !important; - right: 4px !important; - z-index: 2; - width: 32px; - height: 32px; - border: 1px solid rgba(255, 255, 255, 0.22); - border-radius: 16px !important; - background: rgba(0, 0, 0, 0.42); - color: white; - cursor: pointer; - font-size: 1.35rem; - line-height: 1; - transition: filter 0.15s ease; -} -.bsplus-toast-close:hover { - filter: brightness(1.08); -} diff --git a/src/seqta/utils/Openers/OpenEngageParentsAnnouncement.ts b/src/seqta/utils/Openers/OpenEngageParentsAnnouncement.ts deleted file mode 100644 index 126f9e51..00000000 --- a/src/seqta/utils/Openers/OpenEngageParentsAnnouncement.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { settingsState } from "../listeners/SettingsState"; -import { animate as motionAnimate } from "motion"; - -export function shouldShowEngageParentsAnnouncement(): boolean { - return !settingsState.engageParentsAnnouncementShown; -} - -/** - * Non-blocking bottom-right toast announcing SEQTA Engage support. Shown once. - */ -export function showEngageParentsToast() { - if (!shouldShowEngageParentsAnnouncement()) return; - - settingsState.engageParentsAnnouncementShown = true; - - const toast = document.createElement("div"); - toast.className = "bsplus-toast engageParentsToast"; - toast.innerHTML = /* html */ ` - -
-

SEQTA Engage support

- BetterSEQTA+ now supports SEQTA Engage -

Buy your mum a BetterSEQTA Plus! Parents now get themes, a cleaner home page, and all the Plus polish on SEQTA Engage.

-
- `; - - toast.style.opacity = "0"; - document.getElementById("container")?.append(toast); - - if (settingsState.animations) { - (motionAnimate as any)( - toast, - { opacity: [0, 1], y: [40, 0] }, - { duration: 0.35, easing: [0.22, 0.03, 0.26, 1] }, - ); - } else { - toast.style.opacity = "1"; - } - - const dismiss = () => { - if (settingsState.animations) { - (motionAnimate as any)( - toast, - { opacity: [1, 0], y: [0, 40] }, - { duration: 0.2, easing: [0.22, 0.03, 0.26, 1] }, - ).then(() => toast.remove()); - } else { - toast.remove(); - } - }; - - toast.querySelector(".bsplus-toast-close")!.addEventListener("click", dismiss); - - setTimeout(dismiss, 10000); -} diff --git a/src/seqta/utils/Openers/StartupPopupQueue.ts b/src/seqta/utils/Openers/StartupPopupQueue.ts index de10ee8b..63e66d40 100644 --- a/src/seqta/utils/Openers/StartupPopupQueue.ts +++ b/src/seqta/utils/Openers/StartupPopupQueue.ts @@ -1,9 +1,5 @@ import { settingsState } from "../listeners/SettingsState"; import { OpenWhatsNewPopup } from "./OpenWhatsNewPopup"; -import { - shouldShowEngageParentsAnnouncement, - showEngageParentsToast, -} from "./OpenEngageParentsAnnouncement"; import { fetchThemeOfTheMonth, OpenThemeOfTheMonthPopup, @@ -15,8 +11,7 @@ type QueueStep = (goNext: () => void) => void; /** * Runs startup modals in order: What's New (if the extension just updated), - * Theme of the Month (when the user hasn't dismissed this calendar month), then shows - * the SEQTA Engage toast (once, non-blocking). + * Theme of the Month (when the user hasn't dismissed this calendar month). */ export async function runStartupPopupQueue() { // Make sure the background script knows about any dev-mode API override @@ -41,11 +36,6 @@ export async function runStartupPopupQueue() { function runNext() { const step = steps.shift(); if (step) step(runNext); - else { - if (shouldShowEngageParentsAnnouncement()) { - showEngageParentsToast(); - } - } } runNext(); diff --git a/src/seqta/utils/defaultSettings.ts b/src/seqta/utils/defaultSettings.ts index e5004775..8605a747 100644 --- a/src/seqta/utils/defaultSettings.ts +++ b/src/seqta/utils/defaultSettings.ts @@ -67,7 +67,6 @@ export function getDefaultSettingsState(): SettingsState { selectedFont: "rubik", timeFormat: "24", privacyStatementShown: false, - engageParentsAnnouncementShown: false, bsCloudAutoSyncAnnouncementShown: false, }; } diff --git a/src/seqta/utils/ensureSyncableStorageDefaults.ts b/src/seqta/utils/ensureSyncableStorageDefaults.ts index df8757dc..fb79fc68 100644 --- a/src/seqta/utils/ensureSyncableStorageDefaults.ts +++ b/src/seqta/utils/ensureSyncableStorageDefaults.ts @@ -24,7 +24,6 @@ const OPTIONAL_UNSET_MEANS_DEFAULT_KEYS = [ "selectedFont", "privacyStatementShown", "privacyStatementLastUpdated", - "engageParentsAnnouncementShown", "bsCloudAutoSyncAnnouncementShown", "themeOfTheMonthDismissedMonth", "themeOfTheMonthLastSeenId", diff --git a/src/types/storage.ts b/src/types/storage.ts index 8734918e..365421ea 100644 --- a/src/types/storage.ts +++ b/src/types/storage.ts @@ -32,8 +32,6 @@ export interface SettingsState { justupdated?: boolean; privacyStatementShown?: boolean; privacyStatementLastUpdated?: string; - /** One-time announcement: SEQTA Engage support for parents (dismissed popup queue). */ - engageParentsAnnouncementShown?: boolean; /** One-time announcement: BS Cloud automatic settings sync (last in startup popup queue). */ bsCloudAutoSyncAnnouncementShown?: boolean; /**