refactor: consolidate and debloat calendar sync implementation

Merge duplicated Google/Outlook engines, background handlers, and API
layers into shared calendarSync modules to cut complexity without changing
user-facing sync behavior.
This commit is contained in:
SethBurkart123
2026-06-28 10:45:45 +10:00
parent f4230e02b9
commit 7779edb063
52 changed files with 1965 additions and 3258 deletions
+1 -34
View File
@@ -1,38 +1,5 @@
import { settingsState } from "@/seqta/utils/listeners/SettingsState";
const VERBOSE_LOG_ATTR = "data-bsplus-verbose-log";
export function isVerboseLoggingEnabled(): boolean {
return Boolean(settingsState.devMode && settingsState.verboseLogging);
}
export function syncVerboseLogDomFlag(): void {
if (typeof document === "undefined") return;
document.documentElement.toggleAttribute(
VERBOSE_LOG_ATTR,
isVerboseLoggingEnabled(),
);
}
let initialized = false;
/** Register DOM flag sync when dev / verbose toggles change. Call after settings load. */
export function initVerboseLogging(): void {
if (initialized) return;
initialized = true;
syncVerboseLogDomFlag();
settingsState.register("devMode", () => syncVerboseLogDomFlag());
settingsState.register("verboseLogging", () => syncVerboseLogDomFlag());
}
export function verboseDebug(...args: unknown[]): void {
if (isVerboseLoggingEnabled()) console.debug(...args);
}
export function verboseInfo(...args: unknown[]): void {
if (isVerboseLoggingEnabled()) console.info(...args);
}
export function verboseLog(...args: unknown[]): void {
if (isVerboseLoggingEnabled()) console.log(...args);
if (settingsState.devMode) console.log(...args);
}