mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
feat: auto sync popoup
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user