Remove the one-time SEQTA Engage support startup toast.

This commit is contained in:
SethBurkart123
2026-06-16 16:25:33 +10:00
parent 9bfd1bbf0e
commit 7d18b2483f
6 changed files with 1 additions and 172 deletions
@@ -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 */ `
<button class="bsplus-toast-close" aria-label="Dismiss">&times;</button>
<div class="bsplus-toast-content">
<p class="bsplus-toast-eyebrow">SEQTA Engage support</p>
<strong>BetterSEQTA+ now supports <span class="seqtaEngageAccent">SEQTA Engage</span></strong>
<p>Buy your mum a BetterSEQTA Plus! Parents now get themes, a cleaner home page, and all the Plus polish on SEQTA Engage.</p>
</div>
`;
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);
}
+1 -11
View File
@@ -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();
-1
View File
@@ -67,7 +67,6 @@ export function getDefaultSettingsState(): SettingsState {
selectedFont: "rubik",
timeFormat: "24",
privacyStatementShown: false,
engageParentsAnnouncementShown: false,
bsCloudAutoSyncAnnouncementShown: false,
};
}
@@ -24,7 +24,6 @@ const OPTIONAL_UNSET_MEANS_DEFAULT_KEYS = [
"selectedFont",
"privacyStatementShown",
"privacyStatementLastUpdated",
"engageParentsAnnouncementShown",
"bsCloudAutoSyncAnnouncementShown",
"themeOfTheMonthDismissedMonth",
"themeOfTheMonthLastSeenId",