infra changes
This commit is contained in:
14
package-lock.json
generated
14
package-lock.json
generated
@@ -9,7 +9,7 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/sql.js": "^1.4.4",
|
"@types/sql.js": "^1.4.4",
|
||||||
"chrome-extension-toolkit": "^0.0.32",
|
"chrome-extension-toolkit": "^0.0.37",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"highcharts": "^10.3.3",
|
"highcharts": "^10.3.3",
|
||||||
@@ -4808,9 +4808,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chrome-extension-toolkit": {
|
"node_modules/chrome-extension-toolkit": {
|
||||||
"version": "0.0.32",
|
"version": "0.0.37",
|
||||||
"resolved": "https://registry.npmjs.org/chrome-extension-toolkit/-/chrome-extension-toolkit-0.0.32.tgz",
|
"resolved": "https://registry.npmjs.org/chrome-extension-toolkit/-/chrome-extension-toolkit-0.0.37.tgz",
|
||||||
"integrity": "sha512-0MZFp7MfVVgW1OSZbJD120+21GLS5DFjUG3sAsmAUoPUxbOhmqltGkQT9S23KuipjslcRCwzSlWR+lIkxeXHKw==",
|
"integrity": "sha512-j8umRVPr6uKx77a191zIUCaQlq4KE2J1+ShXxsW1TEJIPKBxGcOfwH3N3OhDGnoCF/3shAgs6nZSg2uIvZJsfg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
@@ -21236,9 +21236,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"chrome-extension-toolkit": {
|
"chrome-extension-toolkit": {
|
||||||
"version": "0.0.32",
|
"version": "0.0.37",
|
||||||
"resolved": "https://registry.npmjs.org/chrome-extension-toolkit/-/chrome-extension-toolkit-0.0.32.tgz",
|
"resolved": "https://registry.npmjs.org/chrome-extension-toolkit/-/chrome-extension-toolkit-0.0.37.tgz",
|
||||||
"integrity": "sha512-0MZFp7MfVVgW1OSZbJD120+21GLS5DFjUG3sAsmAUoPUxbOhmqltGkQT9S23KuipjslcRCwzSlWR+lIkxeXHKw==",
|
"integrity": "sha512-j8umRVPr6uKx77a191zIUCaQlq4KE2J1+ShXxsW1TEJIPKBxGcOfwH3N3OhDGnoCF/3shAgs6nZSg2uIvZJsfg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/sql.js": "^1.4.4",
|
"@types/sql.js": "^1.4.4",
|
||||||
"chrome-extension-toolkit": "^0.0.32",
|
"chrome-extension-toolkit": "^0.0.37",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"clean-webpack-plugin": "^4.0.0",
|
"clean-webpack-plugin": "^4.0.0",
|
||||||
"highcharts": "^10.3.3",
|
"highcharts": "^10.3.3",
|
||||||
|
|||||||
@@ -24,4 +24,5 @@ export const DevStore = createLocalStore<IDevStore>({
|
|||||||
reloadTabId: undefined,
|
reloadTabId: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
debugStore({ DevStore });
|
debugStore({ DevStore });
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ interface Actions {
|
|||||||
getDeviceId(): Promise<string>;
|
getDeviceId(): Promise<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ExtensionStore = createLocalStore<IExtensionStore, Actions>(
|
export const ExtensionStore = createLocalStore<IExtensionStore, Actions>(
|
||||||
{
|
{
|
||||||
version: chrome.runtime.getManifest().version,
|
version: chrome.runtime.getManifest().version,
|
||||||
lastUpdate: Date.now(),
|
lastUpdate: Date.now(),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createLocalStore, debugStore, Serialized } from 'chrome-extension-toolkit';
|
import { createLocalStore, debugStore } from 'chrome-extension-toolkit';
|
||||||
import { Course } from 'src/shared/types/Course';
|
import { Course } from 'src/shared/types/Course';
|
||||||
/**
|
/**
|
||||||
* A store that is used for storing user options
|
* A store that is used for storing user options
|
||||||
@@ -44,7 +44,7 @@ const UserScheduleStore = createLocalStore<IUserScheduleStore, Actions>(
|
|||||||
const schedules = await store.getSchedules();
|
const schedules = await store.getSchedules();
|
||||||
const scheduleToEdit = schedules[name];
|
const scheduleToEdit = schedules[name];
|
||||||
if (scheduleToEdit) {
|
if (scheduleToEdit) {
|
||||||
scheduleToEdit.push(course as Serialized<Course>);
|
scheduleToEdit.push(course);
|
||||||
await store.setSchedules(schedules);
|
await store.setSchedules(schedules);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class Course {
|
|||||||
/** Which semester is the course from */
|
/** Which semester is the course from */
|
||||||
semester: Semester;
|
semester: Semester;
|
||||||
|
|
||||||
constructor(course: Serialized<Course> | Course) {
|
constructor(course: Serialized<Course>) {
|
||||||
Object.assign(this, course);
|
Object.assign(this, course);
|
||||||
this.schedule = new CourseSchedule(course.schedule);
|
this.schedule = new CourseSchedule(course.schedule);
|
||||||
this.instructors = course.instructors.map(i => new Instructor(i));
|
this.instructors = course.instructors.map(i => new Instructor(i));
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export class CourseMeeting {
|
|||||||
/** The location that the course is taught */
|
/** The location that the course is taught */
|
||||||
location?: Location;
|
location?: Location;
|
||||||
|
|
||||||
constructor(meeting: Serialized<CourseMeeting> | CourseMeeting) {
|
constructor(meeting: Serialized<CourseMeeting>) {
|
||||||
Object.assign(this, meeting);
|
Object.assign(this, meeting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { CourseMeeting, Day, DAY_MAP } from './CourseMeeting';
|
|||||||
export class CourseSchedule {
|
export class CourseSchedule {
|
||||||
meetings: CourseMeeting[] = [];
|
meetings: CourseMeeting[] = [];
|
||||||
|
|
||||||
constructor(courseSchedule?: Serialized<CourseSchedule> | CourseSchedule) {
|
constructor(courseSchedule?: Serialized<CourseSchedule>) {
|
||||||
if (!courseSchedule) {
|
if (!courseSchedule) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user