mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-08-28 17:21:05 +00:00
feaf4dced5
Downgrade to Vite 6 with crxjs 2.6, add dev-only CSP for HMR, and stop the background script from importing Svelte plugin UI into the service worker.
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
/**
|
|
* Serializable plugin setting defaults for cloud sync backfill.
|
|
*
|
|
* Kept separate from `@/plugins` so the service worker never imports Svelte UI or
|
|
* Vite HMR clients. Values must match each plugin's non-component settings.
|
|
*/
|
|
function defaultSearchHotkey(): string {
|
|
if (typeof navigator !== "undefined") {
|
|
return navigator.platform.toUpperCase().includes("MAC") ? "cmd+k" : "ctrl+k";
|
|
}
|
|
return "ctrl+k";
|
|
}
|
|
|
|
/** `plugin.<id>.settings` defaults (component/button keys omitted). */
|
|
export const SYNCABLE_PLUGIN_SETTING_DEFAULTS: Record<
|
|
string,
|
|
Record<string, unknown>
|
|
> = {
|
|
themes: {},
|
|
"animated-background": { speed: 1 },
|
|
"assessments-average": { lettergrade: false },
|
|
notificationCollector: {},
|
|
timetable: {},
|
|
timetableEdit: {},
|
|
"profile-picture": { useCloudPfp: false },
|
|
"assessments-overview": {},
|
|
"background-music": { volume: 0.5, pauseOnHidden: true },
|
|
messageFolders: {
|
|
showTagsInAllMessages: true,
|
|
hideFolderedMessagesInAll: true,
|
|
},
|
|
"enhanced-navigation": { autoScrollOnClick: false },
|
|
"global-search": {
|
|
searchHotkey: defaultSearchHotkey(),
|
|
showRecentFirst: true,
|
|
transparencyEffects: true,
|
|
runIndexingOnLoad: true,
|
|
passiveIndexing: true,
|
|
},
|
|
"grade-analytics": { cacheTtlHours: 24 },
|
|
};
|