Compare commits

..

9 Commits

Author SHA1 Message Date
doprz
f29e3ef97d chore: update CHANGELOG.md 2024-10-16 23:50:52 -05:00
Samuel Gunter
79dd29cfc9 feat: spring 2024 instructors db (#317) 2024-10-16 23:47:04 -05:00
Razboy20
e082158592 build: sentry instrumentation (#316) 2024-10-16 22:18:18 -05:00
Razboy20
e261641e59 fix: add a little error checking to settings (#315)
* fix: add a little error checking to settings

* fix: add a little more
2024-10-16 22:16:17 -05:00
Razboy20
5634fbed8a chore: bump version 2024-10-16 17:17:56 -05:00
Samuel Gunter
ceba38b1ac fix: show calendar in active window (#312)
* fix: show calendar in active window

* fix: update calendarBackgroundHandler.ts

---------

Co-authored-by: Razboy20 <razboy20@gmail.com>
2024-10-16 17:14:02 -05:00
Razboy20
05f00b23d2 fix: gulp zip (#314) 2024-10-16 17:13:44 -05:00
Samuel Gunter
59f173c4e7 style: remove ugly period after async (#313) 2024-10-16 17:13:33 -05:00
Razboy20
aeff5e09a2 fix: migration loop 2024-10-16 16:46:20 -05:00
9 changed files with 75 additions and 31 deletions

View File

@@ -1,4 +1,17 @@
## 2.0.0 (2024-10-15) ## [2.0.1](https://github.com/Longhorn-Developers/UT-Registration-Plus/compare/v2.0.0...v2.0.1) (2024-10-17)
### Features
- spring 2024 instructors db ([#317](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/317)) ([79dd29c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/79dd29cfc9e849b09e7d91bd0eed51c1c93b3352))
### Bug Fixes
- add a little error checking to settings ([#315](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/315)) ([e261641](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/e261641e5985d8bd5047d8a0be5d1caae844e40f))
- gulp zip ([#314](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/314)) ([05f00b2](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/05f00b23d26b90f564710db4364426e90c8d6831))
- migration loop ([aeff5e0](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/aeff5e09a238503293c3882d97d40270da1e4883))
- show calendar in active window ([#312](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/312)) ([ceba38b](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/ceba38b1ac74ec9e6630222183bd466a8d12c27d))
## [2.0.0](https://github.com/Longhorn-Developers/UT-Registration-Plus/compare/b4e8c7589e53f1064d70703459cc6d66fae1b04c...v2.0.0) (2024-10-15)
### Features ### Features
@@ -133,12 +146,14 @@
- splash text additions before v2 release ([#296](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/296)) ([e774f31](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/e774f316e3f92c03e79274a55f1f729178c9a14a)) - splash text additions before v2 release ([#296](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/296)) ([e774f31](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/e774f316e3f92c03e79274a55f1f729178c9a14a))
- splash text has arrived! ([#246](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/246)) ([9971435](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/9971435716dec11e954dc26c14bf7d1505563d0d)) - splash text has arrived! ([#246](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/246)) ([9971435](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/9971435716dec11e954dc26c14bf7d1505563d0d))
- Storybook for Vite ([#52](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/52)) ([9cc299c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/9cc299ced6132644a5c2375b95a8a16a3482601b)) - Storybook for Vite ([#52](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/52)) ([9cc299c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/9cc299ced6132644a5c2375b95a8a16a3482601b))
- swe title updates ([#310](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/310)) ([4629626](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/4629626a31934c491758ddca874e5018d9c22e57))
- switch button ([#229](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/229)) ([abae7a5](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/abae7a5c22ab944262d66ae897298b008a03c5f1)) - switch button ([#229](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/229)) ([abae7a5](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/abae7a5c22ab944262d66ae897298b008a03c5f1))
- temporary removal of waitlist etc ([#236](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/236)) ([d424ccc](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/d424ccce49ba05305b24cb61aeb4ffeada5bab33)) - temporary removal of waitlist etc ([#236](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/236)) ([d424ccc](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/d424ccce49ba05305b24cb61aeb4ffeada5bab33))
- UnoCSS (TailwindCSS) (Storybook only) ([#61](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/61)) ([85c7f78](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/85c7f7817c58f13f6a4e8bec13a45f6412ad87db)) - UnoCSS (TailwindCSS) (Storybook only) ([#61](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/61)) ([85c7f78](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/85c7f7817c58f13f6a4e8bec13a45f6412ad87db))
- UnoCSS (TailwindCSS) (Storybook only) ([#61](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/61)) ([6521a4b](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/6521a4b2a90af06e182c779f2fc7cb1a3b1e55c1)) - UnoCSS (TailwindCSS) (Storybook only) ([#61](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/61)) ([6521a4b](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/6521a4b2a90af06e182c779f2fc7cb1a3b1e55c1))
- unplugin-icons ([#62](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/62)) ([2d67b12](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/2d67b1218ff852c59901b77909615c5f54794a67)) - unplugin-icons ([#62](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/62)) ([2d67b12](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/2d67b1218ff852c59901b77909615c5f54794a67))
- unplugin-icons ([#62](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/62)) ([945e09b](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/945e09b49e4ffa9bd4b02442f6567bb99831923e)) - unplugin-icons ([#62](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/62)) ([945e09b](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/945e09b49e4ffa9bd4b02442f6567bb99831923e))
- update admin titles ([4cf8c3f](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/4cf8c3f9645cd8fda07244413cdc406105b12fec))
- update badge count when schedule changes ([#150](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/150)) ([a5e9e3c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/a5e9e3c2145d61d8cc5788eb50fa19718e6d13bf)) - update badge count when schedule changes ([#150](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/150)) ([a5e9e3c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/a5e9e3c2145d61d8cc5788eb50fa19718e6d13bf))
- update Button to v2 design ([863521f](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/863521fb3bb268131bd3f369064ae10a442b4fbc)) - update Button to v2 design ([863521f](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/863521fb3bb268131bd3f369064ae10a442b4fbc))
- update dialog component to headlessui ([#159](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/159)) ([442be8c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/442be8cbee06ec403467b100d8d5300dd4a7ea72)) - update dialog component to headlessui ([#159](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/159)) ([442be8c](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/442be8cbee06ec403467b100d8d5300dd4a7ea72))

View File

@@ -1,18 +1,31 @@
// (Thanks go to https://github.com/pnd280/complexity/blob/alpha/gulpfile.js) // (Thanks go to https://github.com/pnd280/complexity/blob/alpha/gulpfile.js)
import cp from 'child_process';
import fs from 'fs'; import fs from 'fs';
import gulp from 'gulp'; import gulp from 'gulp';
import gulpZip from 'gulp-zip'; import gulpZip from 'gulp-zip';
import { createRequire } from 'module'; import { createRequire } from 'module';
function zip() { // Make sure sentry is configured https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/typescript/#2-configure-sentry-cli
function instrumentWithSentry() {
return cp.exec('sentry-cli sourcemaps inject dist/ && sentry-cli sourcemaps upload dist/');
}
function zipDist() {
const require = createRequire(import.meta.url); const require = createRequire(import.meta.url);
const manifest = require('./package.json'); const manifest = require('./package.json');
const zipFileName = `${manifest.name.replaceAll(' ', '-')}-${manifest.version}.zip`; const zipFileName = `${manifest.name.replaceAll(' ', '-')}-${manifest.version}.zip`;
return gulp.src('dist/**').pipe(gulpZip(zipFileName)).pipe(gulp.dest('package')); return gulp
.src('dist/**', {
encoding: false,
})
.pipe(gulpZip(zipFileName))
.pipe(gulp.dest('package'));
} }
const zip = gulp.series(instrumentWithSentry, zipDist);
// Temp fix for CSP on Chrome 130 // Temp fix for CSP on Chrome 130
// Manually remove them because there is no option to disable use_dynamic_url on @crxjs/vite-plugin // Manually remove them because there is no option to disable use_dynamic_url on @crxjs/vite-plugin
function forceDisableUseDynamicUrl(done) { function forceDisableUseDynamicUrl(done) {

View File

@@ -1,7 +1,7 @@
{ {
"name": "ut-registration-plus", "name": "ut-registration-plus",
"displayName": "UT Registration Plus", "displayName": "UT Registration Plus",
"version": "2.0.0", "version": "2.0.1",
"description": "UT Registration Plus is a Chrome extension that allows students to easily register for classes.", "description": "UT Registration Plus is a Chrome extension that allows students to easily register for classes.",
"private": true, "private": true,
"homepage": "https://github.com/Longhorn-Developers/UT-Registration-Plus", "homepage": "https://github.com/Longhorn-Developers/UT-Registration-Plus",

View File

@@ -30,7 +30,8 @@ const calendarBackgroundHandler: MessageHandler<CalendarBackgroundMessages> = {
if (openCalendarTabInfo !== undefined) { if (openCalendarTabInfo !== undefined) {
const tabid = openCalendarTabInfo.tab.id; const tabid = openCalendarTabInfo.tab.id;
chrome.tabs.update(tabid, { active: true }); await chrome.tabs.update(tabid, { active: true });
await chrome.windows.update(openCalendarTabInfo.tab.windowId, { focused: true, drawAttention: true });
if (uniqueId !== undefined) await tabs.openCoursePopup({ uniqueId }, tabid); if (uniqueId !== undefined) await tabs.openCoursePopup({ uniqueId }, tabid);
sendResponse(openCalendarTabInfo.tab); sendResponse(openCalendarTabInfo.tab);

View File

@@ -37,7 +37,7 @@ export default function CalendarBottomBar({ courseCells, setCourse }: CalendarBo
{displayCourses && ( {displayCourses && (
<> <>
<Text variant='p' className='text-ut-black'> <Text variant='p' className='text-ut-black'>
ASYNC./OTHER ASYNC/OTHER
</Text> </Text>
<Text variant='h4' className='text-gray-300'> <Text variant='h4' className='text-gray-300'>

View File

@@ -32,7 +32,7 @@ function MigrationButtons({ close }: { close: () => void }): JSX.Element {
} }
setProcessState(2); setProcessState(2);
close(); close();
} else { } else if (processState === 0) {
const { pendingMigration } = await chrome.storage.session.get('pendingMigration'); const { pendingMigration } = await chrome.storage.session.get('pendingMigration');
if (pendingMigration) setProcessState(1); if (pendingMigration) setProcessState(1);
} }

View File

@@ -101,8 +101,12 @@ export default function Settings(): JSX.Element {
useEffect(() => { useEffect(() => {
const fetchGitHubStats = async () => { const fetchGitHubStats = async () => {
try {
const stats = await gitHubStatsService.fetchGitHubStats(); const stats = await gitHubStatsService.fetchGitHubStats();
setGitHubStats(stats); setGitHubStats(stats);
} catch (error) {
console.warn('Error fetching GitHub stats:', error);
}
}; };
const initAndSetSettings = async () => { const initAndSetSettings = async () => {
@@ -207,7 +211,14 @@ export default function Settings(): JSX.Element {
// Exit if the user cancels the prompt // Exit if the user cancels the prompt
if (link === null) return; if (link === null) return;
const response = await fetch(link); try {
let response: Response;
try {
response = await fetch(link);
} catch (e) {
alert(`Failed to fetch url '${link}'`);
return;
}
const text = await response.text(); const text = await response.text();
const doc = new DOMParser().parseFromString(text, 'text/html'); const doc = new DOMParser().parseFromString(text, 'text/html');
@@ -231,6 +242,9 @@ export default function Settings(): JSX.Element {
} else { } else {
console.log(courses); console.log(courses);
} }
} catch (error) {
console.error('Error scraping course:', error);
}
}; };
const [devMode, toggleDevMode] = useDevMode(10); const [devMode, toggleDevMode] = useDevMode(10);

View File

@@ -187,6 +187,7 @@ export default defineConfig({
target: ['chrome120', 'edge120', 'firefox120'], target: ['chrome120', 'edge120', 'firefox120'],
emptyOutDir: true, emptyOutDir: true,
reportCompressedSize: false, reportCompressedSize: false,
sourcemap: true,
rollupOptions: { rollupOptions: {
input: { input: {
debug: 'src/pages/debug/index.html', debug: 'src/pages/debug/index.html',