feat: auto sync popoup

This commit is contained in:
2026-04-13 19:39:57 +09:30
parent 6748b15024
commit 249d1c1b4a
4 changed files with 109 additions and 1 deletions
+10 -1
View File
@@ -8,12 +8,17 @@ import {
shouldShowEngageParentsAnnouncement,
showEngageParentsAnnouncement,
} from "./OpenEngageParentsAnnouncement";
import {
shouldShowBsCloudAutoSyncAnnouncement,
showBsCloudAutoSyncAnnouncement,
} from "./OpenBsCloudAutoSyncAnnouncement";
type QueueStep = (goNext: () => void) => void;
/**
* Runs startup modals in order: What's New (if the extension just updated),
* privacy statement (if required), then the SEQTA Engage announcement (once).
* privacy statement (if required), SEQTA Engage announcement (once), then BS Cloud
* auto-sync (once, last).
*/
export function runStartupPopupQueue() {
const steps: QueueStep[] = [];
@@ -30,6 +35,10 @@ export function runStartupPopupQueue() {
steps.push((goNext) => showEngageParentsAnnouncement(goNext));
}
if (shouldShowBsCloudAutoSyncAnnouncement()) {
steps.push((goNext) => showBsCloudAutoSyncAnnouncement(goNext));
}
function runNext() {
const step = steps.shift();
if (step) step(runNext);