added deviceId, ExtensionStore, working on CoursePopup
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import { createStore } from 'chrome-extension-toolkit';
|
||||
|
||||
/**
|
||||
* A store that is used to store data that is only relevant during development
|
||||
*/
|
||||
interface IDevStore {
|
||||
/** the tabId for the debug tab */
|
||||
debugTabId?: number;
|
||||
/** whether the debug tab is visible */
|
||||
wasDebugTabVisible?: boolean;
|
||||
/** whether we should enable extension reloading */
|
||||
isExtensionReloading?: boolean;
|
||||
/** whether we should enable tab reloading */
|
||||
isTabReloading?: boolean;
|
||||
/** The id of the tab that we want to reload (after the extension reloads itself ) */
|
||||
reloadTabId?: number;
|
||||
}
|
||||
|
||||
export const devStore = createStore<IDevStore>('DEV_STORE', {
|
||||
debugTabId: undefined,
|
||||
isTabReloading: true,
|
||||
wasDebugTabVisible: false,
|
||||
isExtensionReloading: true,
|
||||
reloadTabId: undefined,
|
||||
});
|
||||
@@ -1,16 +0,0 @@
|
||||
import { createStore } from 'chrome-extension-toolkit';
|
||||
|
||||
/**
|
||||
* A store that is used for storing user options
|
||||
*/
|
||||
interface IOptionsStore {
|
||||
/** whether we should automatically highlight conflicts on the course schedule page */
|
||||
shouldHighlightConflicts: boolean;
|
||||
/** whether we should automatically scroll to load more courses on the course schedule page (without having to click next) */
|
||||
shouldScrollToLoad: boolean;
|
||||
}
|
||||
|
||||
export const optionsStore = createStore<IOptionsStore>('OPTIONS_STORE', {
|
||||
shouldHighlightConflicts: true,
|
||||
shouldScrollToLoad: true,
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
import { createStore, Store } from 'chrome-extension-toolkit';
|
||||
|
||||
interface ISessionStore {
|
||||
chromeSessionId?: string;
|
||||
}
|
||||
|
||||
export const sessionStore = createStore<ISessionStore>(
|
||||
'SESSION_STORE',
|
||||
{
|
||||
chromeSessionId: undefined,
|
||||
},
|
||||
{
|
||||
area: 'session',
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user