feat(settings): add option to always open calendar in new tab (#488)

* feat(settings): add option to always open calendar in new tab

* fix: await setting

---------

Co-authored-by: doprz <52579214+doprz@users.noreply.github.com>
This commit is contained in:
Samuel Gunter
2025-01-20 23:18:00 -06:00
committed by GitHub
parent b74c698866
commit 009de62828
3 changed files with 39 additions and 2 deletions

View File

@@ -18,6 +18,9 @@ export interface IOptionsStore {
/** whether we should automatically refresh the data for the waitlist, course status, and other info with the latest data from UT's site */
enableDataRefreshing: boolean;
/** whether we should open the calendar in a new tab; default is to focus an existing calendar tab */
alwaysOpenCalendarInNewTab: boolean;
}
export const OptionsStore = createSyncStore<IOptionsStore>({
@@ -26,6 +29,7 @@ export const OptionsStore = createSyncStore<IOptionsStore>({
enableHighlightConflicts: true,
enableScrollToLoad: true,
enableDataRefreshing: true,
alwaysOpenCalendarInNewTab: false,
});
/**
@@ -40,6 +44,7 @@ export const initSettings = async () =>
enableHighlightConflicts: await OptionsStore.get('enableHighlightConflicts'),
enableScrollToLoad: await OptionsStore.get('enableScrollToLoad'),
enableDataRefreshing: await OptionsStore.get('enableDataRefreshing'),
alwaysOpenCalendarInNewTab: await OptionsStore.get('alwaysOpenCalendarInNewTab'),
}) satisfies IOptionsStore;
// Clothing retailer right