Compare commits
10 Commits
fix/vite-h
...
sgunter/fe
| Author | SHA1 | Date | |
|---|---|---|---|
| bb4fbc3700 | |||
|
|
e8a8b8e1ae | ||
|
|
c21cbd77f0 | ||
| 99a035e29d | |||
|
|
64baa6d290 | ||
|
|
35d903e7c8 | ||
|
|
1fffb3c2e7 | ||
|
|
4590a74896 | ||
| 190d1db2fa | |||
|
|
b8a44b45b8 |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,9 +1,27 @@
|
|||||||
|
## [2.2.2](https://github.com/Longhorn-Developers/UT-Registration-Plus/compare/v2.2.1...v2.2.2) (2025-10-13)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add nix flake ([#593](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/593)) ([7b401ad](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/7b401add1565ff401bad99745ff9e53b9a7f899f))
|
||||||
|
* automatically select new or duplicated schedules ([#583](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/583)) ([#589](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/589)) ([2a50f55](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/2a50f5580d3dbeb0d66546c23cf29bbb37d80da2))
|
||||||
|
* **env:** add SENTRY env vars ([8f7e1bc](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/8f7e1bc0af6336549068e02b80df21d4e8f4ef9c))
|
||||||
|
* export schedule button add to calendar ([#594](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/594)) ([5994ded](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/5994ded8be876cb55174d27d3fdb0832b21a0ff9))
|
||||||
|
* search result shading ([#617](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/617)) ([be861b8](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/be861b823cb2cb7f6f4a1f266351eec3fc1c2f99))
|
||||||
|
* show warning for courses of different semesters ([#570](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/570)) ([2e7dac1](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/2e7dac1e3eba757231ac07ac966231c08c703a16))
|
||||||
|
* support summer grades, fix summer course parser ([#596](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/596)) ([2d92dd4](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/2d92dd47f00a44b7d48e92a8ffba94480e4e73f9))
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix or ignore various eslint warning ([#609](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/609)) ([95de8df](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/95de8df37243b6d59625df515a60442f11b7a9d3))
|
||||||
|
* limit height of schedule list dropdown in the extension popup ([#543](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/543)) ([eb8141e](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/eb8141ee8c3d32bce901457178d50781b78f86dd))
|
||||||
|
* whitespace wrapping in semester warning ([#629](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/629)) ([46fe591](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/46fe591fa72ef017eea7cfb8aa37d12d8f223926))
|
||||||
## [2.2.1](https://github.com/Longhorn-Developers/UT-Registration-Plus/compare/v2.2.0...v2.2.1) (2025-06-04)
|
## [2.2.1](https://github.com/Longhorn-Developers/UT-Registration-Plus/compare/v2.2.0...v2.2.1) (2025-06-04)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* add dining app promo ([#598](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/598)) ([be1dccf](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/be1dccfcb9d052c6b291b50cc53418d6bb645beb))
|
* add dining app promo ([#598](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/598)) ([be1dccf](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/be1dccfcb9d052c6b291b50cc53418d6bb645beb))
|
||||||
* inside jokes005 ([#590](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/590)) ([37471ef](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/37471efb740c7a5828cf3b54bac70954694359d7))
|
* inside jokes005 ([#590](https://github.com/Longhorn-Developers/UT-Registration-Plus/issues/590)) ([37471ef](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/37471efb740c7a5828cf3b54bac70954694359d7))
|
||||||
|
* **release:** v2.2.1 ([234f3d6](https://github.com/Longhorn-Developers/UT-Registration-Plus/commit/234f3d627d603adf8555b4d0e93106d198918169))
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
|||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754725699,
|
"lastModified": 1759831965,
|
||||||
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
|
"narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
|
"rev": "c9b6fb798541223bbb396d287d16f43520250518",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
25
flake.nix
25
flake.nix
@@ -14,22 +14,29 @@
|
|||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = (import nixpkgs { inherit system; });
|
pkgs = (import nixpkgs { inherit system; });
|
||||||
|
|
||||||
|
commonPackages = with pkgs; [
|
||||||
|
nodejs_20 # v20.19.5
|
||||||
|
pnpm_10 # v10.18.0
|
||||||
|
];
|
||||||
|
|
||||||
|
additionalPackages = with pkgs; [
|
||||||
|
bun
|
||||||
|
nodePackages.conventional-changelog-cli
|
||||||
|
sentry-cli
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
formatter = pkgs.nixfmt-rfc-style;
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
name = "utrp-dev";
|
name = "utrp-dev";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = commonPackages;
|
||||||
nodejs_20 # v20.19.4
|
};
|
||||||
pnpm_10 # v10.14.0
|
|
||||||
];
|
|
||||||
|
|
||||||
shellHook = ''
|
devShells.full = pkgs.mkShell {
|
||||||
echo "UTRP Nix Flake Environment Loaded"
|
name = "utrp-dev-full";
|
||||||
echo "Node: $(node --version)"
|
buildInputs = commonPackages ++ additionalPackages;
|
||||||
echo "pnpm: $(pnpm --version)"
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
44
package.json
44
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ut-registration-plus",
|
"name": "ut-registration-plus",
|
||||||
"displayName": "UT Registration Plus",
|
"displayName": "UT Registration Plus",
|
||||||
"version": "2.2.1",
|
"version": "2.2.2",
|
||||||
"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",
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
"@phosphor-icons/react": "^2.1.7",
|
"@phosphor-icons/react": "^2.1.7",
|
||||||
"@sentry/react": "^8.55.0",
|
"@sentry/react": "^8.55.0",
|
||||||
"@tanstack/react-query": "^5.69.0",
|
"@tanstack/react-query": "^5.69.0",
|
||||||
"@unocss/vite": "^66.5.1",
|
"@unocss/vite": "^0.63.6",
|
||||||
"@vitejs/plugin-react": "^5.0.2",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"chrome-extension-toolkit": "^0.0.54",
|
"chrome-extension-toolkit": "^0.0.54",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"conventional-changelog": "^6.0.0",
|
"conventional-changelog": "^6.0.0",
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
"@commitlint/cli": "^19.7.1",
|
"@commitlint/cli": "^19.7.1",
|
||||||
"@commitlint/config-conventional": "^19.7.1",
|
"@commitlint/config-conventional": "^19.7.1",
|
||||||
"@commitlint/types": "^19.5.0",
|
"@commitlint/types": "^19.5.0",
|
||||||
"@crxjs/vite-plugin": "2.2.0",
|
"@crxjs/vite-plugin": "2.0.0-beta.21",
|
||||||
"@iconify-json/bi": "^1.2.2",
|
"@iconify-json/bi": "^1.2.2",
|
||||||
"@iconify-json/ic": "^1.2.2",
|
"@iconify-json/ic": "^1.2.2",
|
||||||
"@iconify-json/iconoir": "^1.2.7",
|
"@iconify-json/iconoir": "^1.2.7",
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
"@types/conventional-changelog": "^3.1.5",
|
"@types/conventional-changelog": "^3.1.5",
|
||||||
"@types/gulp": "^4.0.17",
|
"@types/gulp": "^4.0.17",
|
||||||
"@types/gulp-zip": "^4.0.4",
|
"@types/gulp-zip": "^4.0.4",
|
||||||
"@types/node": "^22.18.0",
|
"@types/node": "^22.13.5",
|
||||||
"@types/prompts": "^2.4.9",
|
"@types/prompts": "^2.4.9",
|
||||||
"@types/react": "^18.3.18",
|
"@types/react": "^18.3.18",
|
||||||
"@types/react-dom": "^18.3.5",
|
"@types/react-dom": "^18.3.5",
|
||||||
@@ -98,14 +98,14 @@
|
|||||||
"@types/sql.js": "^1.4.9",
|
"@types/sql.js": "^1.4.9",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||||
"@typescript-eslint/parser": "^7.18.0",
|
"@typescript-eslint/parser": "^7.18.0",
|
||||||
"@unocss/eslint-config": "^66.5.1",
|
"@unocss/eslint-config": "^0.63.6",
|
||||||
"@unocss/postcss": "^66.5.1",
|
"@unocss/postcss": "^0.63.6",
|
||||||
"@unocss/preset-web-fonts": "^66.5.1",
|
"@unocss/preset-uno": "^0.63.6",
|
||||||
"@unocss/preset-wind4": "^66.5.1",
|
"@unocss/preset-web-fonts": "^0.63.6",
|
||||||
"@unocss/reset": "^66.5.1",
|
"@unocss/reset": "^0.63.6",
|
||||||
"@unocss/transformer-directives": "^66.5.1",
|
"@unocss/transformer-directives": "^0.63.6",
|
||||||
"@unocss/transformer-variant-group": "^66.5.1",
|
"@unocss/transformer-variant-group": "^0.63.6",
|
||||||
"@vitejs/plugin-react-swc": "^4.0.1",
|
"@vitejs/plugin-react-swc": "^3.8.0",
|
||||||
"@vitest/coverage-v8": "^2.1.9",
|
"@vitest/coverage-v8": "^2.1.9",
|
||||||
"@vitest/ui": "^2.1.9",
|
"@vitest/ui": "^2.1.9",
|
||||||
"chalk": "^5.4.1",
|
"chalk": "^5.4.1",
|
||||||
@@ -141,11 +141,11 @@
|
|||||||
"semantic-release": "^24.2.3",
|
"semantic-release": "^24.2.3",
|
||||||
"storybook": "^8.6.0",
|
"storybook": "^8.6.0",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
"unocss": "^66.5.1",
|
"unocss": "^0.63.6",
|
||||||
"unocss-preset-primitives": "0.0.2-beta.2",
|
"unocss-preset-primitives": "0.0.2-beta.1",
|
||||||
"unplugin-icons": "^0.19.3",
|
"unplugin-icons": "^0.19.3",
|
||||||
"vite": "^7.1.5",
|
"vite": "^5.4.20",
|
||||||
"vite-plugin-inspect": "^11.3.3",
|
"vite-plugin-inspect": "^0.8.9",
|
||||||
"vitest": "^2.1.9"
|
"vitest": "^2.1.9"
|
||||||
},
|
},
|
||||||
"engineStrict": true,
|
"engineStrict": true,
|
||||||
@@ -154,12 +154,12 @@
|
|||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"@unocss/vite": "patches/@unocss__vite.patch",
|
"@crxjs/vite-plugin@2.0.0-beta.21": "patches/@crxjs__vite-plugin@2.0.0-beta.21.patch",
|
||||||
"@crxjs/vite-plugin": "patches/@crxjs__vite-plugin.patch"
|
"@unocss/vite": "patches/@unocss__vite.patch"
|
||||||
},
|
},
|
||||||
"onlyBuiltDependencies": [
|
"overrides": {
|
||||||
"@swc/core"
|
"es-module-lexer": "^1.5.4"
|
||||||
]
|
}
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "20.19.4",
|
"node": "20.19.4",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
105
patches/@crxjs__vite-plugin@2.0.0-beta.21.patch
Normal file
105
patches/@crxjs__vite-plugin@2.0.0-beta.21.patch
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
diff --git a/dist/index.mjs b/dist/index.mjs
|
||||||
|
index 5c3f6291168987c56b816428080e6f1fe9de7107..abaf6290fe9454ae036a81eacbe7dc3be2fdfbc3 100644
|
||||||
|
--- a/dist/index.mjs
|
||||||
|
+++ b/dist/index.mjs
|
||||||
|
@@ -499,16 +499,43 @@ ${sourceMap}
|
||||||
|
}),
|
||||||
|
mergeMap(async ({ target, code, deps }) => {
|
||||||
|
await lexer.init;
|
||||||
|
- const [imports] = lexer.parse(code, fileName);
|
||||||
|
+ const [imports, exports] = lexer.parse(code, fileName);
|
||||||
|
const depSet = new Set(deps);
|
||||||
|
const magic = new MagicString(code);
|
||||||
|
- for (const i of imports)
|
||||||
|
+ for (const i of imports) {
|
||||||
|
if (i.n) {
|
||||||
|
depSet.add(i.n);
|
||||||
|
const fileName2 = getFileName({ type: "module", id: i.n });
|
||||||
|
const fullImport = code.substring(i.s, i.e);
|
||||||
|
- magic.overwrite(i.s, i.e, fullImport.replace(i.n, `/${fileName2}`));
|
||||||
|
+ const hmrTimestamp = fullImport.match(/\bt=\d{13}&?\b/);
|
||||||
|
+ magic.overwrite(
|
||||||
|
+ i.s,
|
||||||
|
+ i.e,
|
||||||
|
+ fullImport.replace(
|
||||||
|
+ i.n,
|
||||||
|
+ `/${fileName2}${hmrTimestamp ? `?${hmrTimestamp[0]}` : ""}`
|
||||||
|
+ )
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ for (const e of exports) {
|
||||||
|
+ if (e.n === "default") {
|
||||||
|
+ const regex = /\s+['"](.*)['"]/y;
|
||||||
|
+ regex.lastIndex = e.e;
|
||||||
|
+ const fullExport = regex.exec(code)?.[1];
|
||||||
|
+ if (!fullExport)
|
||||||
|
+ continue;
|
||||||
|
+ const start = regex.lastIndex - fullExport.length - 1;
|
||||||
|
+ const end = regex.lastIndex - 1;
|
||||||
|
+ if (fullExport.startsWith("/node_modules")) {
|
||||||
|
+ magic.overwrite(
|
||||||
|
+ start,
|
||||||
|
+ end,
|
||||||
|
+ `http://localhost:5173${fullExport}`
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
+ }
|
||||||
|
return { target, source: magic.toString(), deps: [...depSet] };
|
||||||
|
})
|
||||||
|
);
|
||||||
|
@@ -1229,10 +1256,14 @@ const pluginHMR = () => {
|
||||||
|
handleHotUpdate({ modules, server }) {
|
||||||
|
const { root } = server.config;
|
||||||
|
const relFiles = /* @__PURE__ */ new Set();
|
||||||
|
- for (const m of modules)
|
||||||
|
+ function getRelFile(file) {
|
||||||
|
+ return file.startsWith(root) ? file.slice(server.config.root.length) : file;
|
||||||
|
+ }
|
||||||
|
+ for (const m of modules) {
|
||||||
|
if (m.id?.startsWith(root)) {
|
||||||
|
relFiles.add(m.id.slice(server.config.root.length));
|
||||||
|
}
|
||||||
|
+ }
|
||||||
|
if (inputManifestFiles.background.length) {
|
||||||
|
const background = prefix$1("/", inputManifestFiles.background[0]);
|
||||||
|
if (relFiles.has(background) || modules.some(isImporter(join(server.config.root, background)))) {
|
||||||
|
@@ -1244,7 +1275,14 @@ const pluginHMR = () => {
|
||||||
|
for (const [key, script] of contentScripts)
|
||||||
|
if (key === script.id) {
|
||||||
|
if (relFiles.has(script.id) || modules.some(isImporter(join(server.config.root, script.id)))) {
|
||||||
|
- relFiles.forEach((relFile) => update(relFile));
|
||||||
|
+ modules.filter((mod) => mod.id?.startsWith(root)).forEach((mod) => {
|
||||||
|
+ update(getRelFile(mod.id));
|
||||||
|
+ if (mod.file?.endsWith(".scss")) {
|
||||||
|
+ mod.importers.forEach((imp) => {
|
||||||
|
+ update(getRelFile(imp.id));
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1882,7 +1920,7 @@ const pluginWebAccessibleResources = () => {
|
||||||
|
if (contentScripts.size > 0) {
|
||||||
|
const viteManifest = parseJsonAsset(
|
||||||
|
bundle,
|
||||||
|
- "manifest.json"
|
||||||
|
+ ".vite/manifest.json"
|
||||||
|
);
|
||||||
|
const viteFiles = /* @__PURE__ */ new Map();
|
||||||
|
for (const [, file] of Object.entries(viteManifest))
|
||||||
|
diff --git a/package.json b/package.json
|
||||||
|
index e0c47ae66ff399ad3a78abf38d8d93d1f038c55d..f84eb09ffbb5c41094935dd06e04ffe831e2d05a 100644
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -70,7 +70,7 @@
|
||||||
|
"connect-injector": "^0.4.4",
|
||||||
|
"convert-source-map": "^1.7.0",
|
||||||
|
"debug": "^4.3.3",
|
||||||
|
- "es-module-lexer": "^0.10.0",
|
||||||
|
+ "es-module-lexer": "^1.4.1",
|
||||||
|
"fast-glob": "^3.2.11",
|
||||||
|
"fs-extra": "^10.0.1",
|
||||||
|
"jsesc": "^3.0.2",
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/dist/index.mjs b/dist/index.mjs
|
diff --git a/dist/index.mjs b/dist/index.mjs
|
||||||
index 3b94c870f00ce7e70be208199db48a3bd5569830..4aaaec7d5b656f1c4066c6295d5228d746420d17 100644
|
index 7210f5fd650a0b7bb36b467fff85feb0d8e4ec63..c8f98bd314daec0b91c514ea9d9fc2b79cea8502 100644
|
||||||
--- a/dist/index.mjs
|
--- a/dist/index.mjs
|
||||||
+++ b/dist/index.mjs
|
+++ b/dist/index.mjs
|
||||||
@@ -24,8 +24,8 @@ const VIRTUAL_ENTRY_ALIAS = [
|
@@ -369,15 +369,15 @@ const VIRTUAL_ENTRY_ALIAS = [
|
||||||
/^(?:virtual:)?uno(?::(.+))?\.css(\?.*)?$/
|
/^(?:virtual:)?uno(?::(.+))?\.css(\?.*)?$/
|
||||||
];
|
];
|
||||||
const LAYER_MARK_ALL = "__ALL__";
|
const LAYER_MARK_ALL = "__ALL__";
|
||||||
@@ -10,19 +10,27 @@ index 3b94c870f00ce7e70be208199db48a3bd5569830..4aaaec7d5b656f1c4066c6295d5228d7
|
|||||||
-const RESOLVED_ID_RE = /[/\\]__uno(?:_(.*?))?\.css$/;
|
-const RESOLVED_ID_RE = /[/\\]__uno(?:_(.*?))?\.css$/;
|
||||||
+const RESOLVED_ID_WITH_QUERY_RE = /[/\\]uno(_.*?)?\.css(\?.*)?$/;
|
+const RESOLVED_ID_WITH_QUERY_RE = /[/\\]uno(_.*?)?\.css(\?.*)?$/;
|
||||||
+const RESOLVED_ID_RE = /[/\\]uno(?:_(.*?))?\.css$/;
|
+const RESOLVED_ID_RE = /[/\\]uno(?:_(.*?))?\.css$/;
|
||||||
|
function resolveId(id) {
|
||||||
const defaultPipelineExclude = [cssIdRE];
|
if (id.match(RESOLVED_ID_WITH_QUERY_RE))
|
||||||
const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|html)($|\?)/];
|
return id;
|
||||||
@@ -468,7 +468,7 @@ function resolveId(id, importer) {
|
|
||||||
for (const alias of VIRTUAL_ENTRY_ALIAS) {
|
for (const alias of VIRTUAL_ENTRY_ALIAS) {
|
||||||
const match = id.match(alias);
|
const match = id.match(alias);
|
||||||
if (match) {
|
if (match) {
|
||||||
- let virtual = match[1] ? `__uno_${match[1]}.css` : "__uno.css";
|
- return match[1] ? `/__uno_${match[1]}.css` : "/__uno.css";
|
||||||
+ let virtual = match[1] ? `uno_${match[1]}.css` : "uno.css";
|
+ return match[1] ? `/uno_${match[1]}.css` : "/uno.css";
|
||||||
virtual += match[2] || "";
|
}
|
||||||
if (importer)
|
}
|
||||||
virtual = resolve$1(importer, "..", virtual);
|
}
|
||||||
@@ -813,7 +813,7 @@ function GlobalModeDevPlugin(ctx) {
|
@@ -652,7 +652,7 @@ function GlobalModeBuildPlugin(ctx) {
|
||||||
|
css = await applyCssTransform(css, fakeCssId, options.dir, this);
|
||||||
|
const transformHandler = "handler" in cssPost.transform ? cssPost.transform.handler : cssPost.transform;
|
||||||
|
if (isLegacy) {
|
||||||
|
- await transformHandler.call({}, css, "/__uno.css");
|
||||||
|
+ await transformHandler.call({}, css, "/uno.css");
|
||||||
|
} else {
|
||||||
|
const hash = getHash(css);
|
||||||
|
await transformHandler.call({}, getHashPlaceholder(hash), fakeCssId);
|
||||||
|
@@ -914,7 +914,7 @@ function GlobalModeDevPlugin({ uno, tokens, tasks, flushTasks, affectedModules,
|
||||||
const { hash, css } = await generateCSS(layer);
|
const { hash, css } = await generateCSS(layer);
|
||||||
return {
|
return {
|
||||||
// add hash to the chunk of CSS that it will send back to client to check if there is new CSS generated
|
// add hash to the chunk of CSS that it will send back to client to check if there is new CSS generated
|
||||||
@@ -31,7 +39,7 @@ index 3b94c870f00ce7e70be208199db48a3bd5569830..4aaaec7d5b656f1c4066c6295d5228d7
|
|||||||
map: { mappings: "" }
|
map: { mappings: "" }
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -832,7 +832,7 @@ function GlobalModeDevPlugin(ctx) {
|
@@ -933,7 +933,7 @@ function GlobalModeDevPlugin({ uno, tokens, tasks, flushTasks, affectedModules,
|
||||||
if (layer && code.includes("import.meta.hot")) {
|
if (layer && code.includes("import.meta.hot")) {
|
||||||
let hmr = `
|
let hmr = `
|
||||||
try {
|
try {
|
||||||
|
|||||||
2621
pnpm-lock.yaml
generated
2621
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -38,12 +38,7 @@ const manifest = defineManifest(async () => ({
|
|||||||
host_permissions: process.env.MODE === 'development' ? [...HOST_PERMISSIONS, '<all_urls>'] : HOST_PERMISSIONS,
|
host_permissions: process.env.MODE === 'development' ? [...HOST_PERMISSIONS, '<all_urls>'] : HOST_PERMISSIONS,
|
||||||
action: {
|
action: {
|
||||||
default_popup: 'src/pages/popup/index.html',
|
default_popup: 'src/pages/popup/index.html',
|
||||||
default_icon: {
|
default_icon: `icons/icon_${mode}_32.png`,
|
||||||
'16': `icons/icon_${mode}_16.png`,
|
|
||||||
'32': `icons/icon_${mode}_32.png`,
|
|
||||||
'48': `icons/icon_${mode}_48.png`,
|
|
||||||
'128': `icons/icon_${mode}_128.png`,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
'16': `icons/icon_${mode}_16.png`,
|
'16': `icons/icon_${mode}_16.png`,
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ const support = getSiteSupport(window.location.href);
|
|||||||
|
|
||||||
const renderComponent = (Component: React.ComponentType) => {
|
const renderComponent = (Component: React.ComponentType) => {
|
||||||
const container = document.createElement('div');
|
const container = document.createElement('div');
|
||||||
|
container.id = 'extension-root';
|
||||||
|
document.body.appendChild(container);
|
||||||
|
|
||||||
// all components are portaled away, not actually rendered to screen
|
|
||||||
createRoot(container).render(
|
createRoot(container).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<Component />
|
<Component />
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import ExtensionRoot from '@views/components/common/ExtensionRoot/ExtensionRoot';
|
||||||
import ReportIssueMain from '@views/components/ReportIssueMain';
|
import ReportIssueMain from '@views/components/ReportIssueMain';
|
||||||
import SentryProvider from '@views/contexts/SentryContext';
|
import SentryProvider from '@views/contexts/SentryContext';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
@@ -5,6 +6,8 @@ import { createRoot } from 'react-dom/client';
|
|||||||
|
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
<SentryProvider fullInit>
|
<SentryProvider fullInit>
|
||||||
|
<ExtensionRoot>
|
||||||
<ReportIssueMain />
|
<ReportIssueMain />
|
||||||
|
</ExtensionRoot>
|
||||||
</SentryProvider>
|
</SentryProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ export interface IOptionsStore {
|
|||||||
|
|
||||||
/** whether the promo should be shown */
|
/** whether the promo should be shown */
|
||||||
showUTDiningPromo: boolean;
|
showUTDiningPromo: boolean;
|
||||||
|
|
||||||
|
/** whether the user's email address should be remembered by the extension */
|
||||||
|
rememberMyEmail: boolean;
|
||||||
|
|
||||||
|
/** the user's email address, if set and chosen to be remembered */
|
||||||
|
emailAddress: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const OptionsStore = createSyncStore<IOptionsStore>({
|
export const OptionsStore = createSyncStore<IOptionsStore>({
|
||||||
@@ -34,6 +40,8 @@ export const OptionsStore = createSyncStore<IOptionsStore>({
|
|||||||
alwaysOpenCalendarInNewTab: false,
|
alwaysOpenCalendarInNewTab: false,
|
||||||
showCalendarSidebar: true,
|
showCalendarSidebar: true,
|
||||||
showUTDiningPromo: true,
|
showUTDiningPromo: true,
|
||||||
|
rememberMyEmail: false,
|
||||||
|
emailAddress: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,6 +58,8 @@ export const initSettings = async () =>
|
|||||||
alwaysOpenCalendarInNewTab: await OptionsStore.get('alwaysOpenCalendarInNewTab'),
|
alwaysOpenCalendarInNewTab: await OptionsStore.get('alwaysOpenCalendarInNewTab'),
|
||||||
showCalendarSidebar: await OptionsStore.get('showCalendarSidebar'),
|
showCalendarSidebar: await OptionsStore.get('showCalendarSidebar'),
|
||||||
showUTDiningPromo: await OptionsStore.get('showUTDiningPromo'),
|
showUTDiningPromo: await OptionsStore.get('showUTDiningPromo'),
|
||||||
|
rememberMyEmail: await OptionsStore.get('rememberMyEmail'),
|
||||||
|
emailAddress: await OptionsStore.get('emailAddress'),
|
||||||
}) satisfies IOptionsStore;
|
}) satisfies IOptionsStore;
|
||||||
|
|
||||||
// Clothing retailer right
|
// Clothing retailer right
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import 'uno.css';
|
import 'uno.css';
|
||||||
|
|
||||||
import { captureFeedback } from '@sentry/react';
|
import { captureFeedback } from '@sentry/react';
|
||||||
|
import { OptionsStore } from '@shared/storage/OptionsStore';
|
||||||
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import { Button } from './common/Button';
|
import { Button } from './common/Button';
|
||||||
@@ -12,19 +14,57 @@ import Text from './common/Text/Text';
|
|||||||
* @returns The rendered component.
|
* @returns The rendered component.
|
||||||
*/
|
*/
|
||||||
export default function ReportIssueMain(): JSX.Element {
|
export default function ReportIssueMain(): JSX.Element {
|
||||||
const [email, setEmail] = useState('');
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
|
const { data: emailAddress } = useQuery({
|
||||||
|
queryKey: ['settings', 'emailAddress'],
|
||||||
|
queryFn: () => OptionsStore.get('emailAddress'),
|
||||||
|
staleTime: Infinity, // Prevent loading state on refocus
|
||||||
|
});
|
||||||
|
|
||||||
|
const { mutate: setEmailAddress } = useMutation({
|
||||||
|
mutationKey: ['settings', 'emailAddress'],
|
||||||
|
mutationFn: async ({ rememberMyEmail, emailAddress }: { rememberMyEmail: boolean; emailAddress: string }) => {
|
||||||
|
queryClient.setQueryData(['settings', 'emailAddress'], emailAddress);
|
||||||
|
if (rememberMyEmail) {
|
||||||
|
OptionsStore.set('emailAddress', emailAddress);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { data: rememberMyEmail } = useQuery({
|
||||||
|
queryKey: ['settings', 'rememberMyEmail'],
|
||||||
|
queryFn: () => OptionsStore.get('rememberMyEmail'),
|
||||||
|
staleTime: Infinity, // Prevent loading state on refocus
|
||||||
|
});
|
||||||
|
|
||||||
|
const { mutate: setRememberMyEmail } = useMutation({
|
||||||
|
mutationKey: ['settings', 'rememberMyEmail'],
|
||||||
|
mutationFn: async ({ rememberMyEmail, emailAddress }: { rememberMyEmail: boolean; emailAddress: string }) => {
|
||||||
|
queryClient.setQueryData(['settings', 'rememberMyEmail'], rememberMyEmail);
|
||||||
|
OptionsStore.set('rememberMyEmail', rememberMyEmail);
|
||||||
|
|
||||||
|
if (rememberMyEmail) {
|
||||||
|
OptionsStore.set('emailAddress', emailAddress);
|
||||||
|
} else {
|
||||||
|
OptionsStore.set('emailAddress', '');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const [feedback, setFeedback] = useState('');
|
const [feedback, setFeedback] = useState('');
|
||||||
const [isSubmitted, setIsSubmitted] = useState(false);
|
const [isSubmitted, setIsSubmitted] = useState(false);
|
||||||
|
|
||||||
const submitFeedback = async () => {
|
const submitFeedback = async () => {
|
||||||
if (!email || !feedback) {
|
if (!emailAddress || !feedback) {
|
||||||
throw new Error('Email and feedback are required');
|
throw new Error('Email and feedback are required');
|
||||||
}
|
}
|
||||||
// Here you would typically send the feedback to a server
|
|
||||||
await captureFeedback(
|
// Send the feedback to Sentry
|
||||||
|
captureFeedback(
|
||||||
{
|
{
|
||||||
message: feedback || 'No feedback provided',
|
message: feedback || 'No feedback provided',
|
||||||
email,
|
email: emailAddress,
|
||||||
tags: {
|
tags: {
|
||||||
version: chrome.runtime.getManifest().version,
|
version: chrome.runtime.getManifest().version,
|
||||||
},
|
},
|
||||||
@@ -34,16 +74,14 @@ export default function ReportIssueMain(): JSX.Element {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Reset form fields and close the dialog
|
// Close the dialog
|
||||||
setEmail('');
|
|
||||||
setFeedback('');
|
|
||||||
setIsSubmitted(true);
|
setIsSubmitted(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isSubmitted) {
|
if (isSubmitted) {
|
||||||
return (
|
return (
|
||||||
<div className='w-80 flex flex-col rounded-lg bg-white p-6 shadow-lg'>
|
<div className='w-92 flex flex-col rounded-lg bg-white p-6 shadow-lg'>
|
||||||
<Text variant='h2' className='mb-4'>
|
<Text variant='h2' className='my-4'>
|
||||||
Thank you
|
Thank you
|
||||||
</Text>
|
</Text>
|
||||||
<Text variant='p' className='mb-6'>
|
<Text variant='p' className='mb-6'>
|
||||||
@@ -56,28 +94,13 @@ export default function ReportIssueMain(): JSX.Element {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSubmitted) {
|
|
||||||
return (
|
return (
|
||||||
<div className='w-80 bg-white p-6'>
|
<div className='w-92 bg-white p-6'>
|
||||||
<h2 className='mb-4 text-2xl text-orange font-bold'>{`Hook'em Horns!`}</h2>
|
<h2 className='my-4 text-2xl text-ut-burntorange font-bold'>Longhorn Feedback</h2>
|
||||||
<p className='mb-6 text-gray-600'>Your feedback is music to our ears. Thanks for helping us improve!</p>
|
|
||||||
<button
|
|
||||||
className='w-full rounded bg-orange-600 px-4 py-2 text-white font-bold transition duration-300 hover:bg-orange-700'
|
|
||||||
onClick={() => window.close()}
|
|
||||||
>
|
|
||||||
Close
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='w-80 bg-white p-6'>
|
|
||||||
<h2 className='mb-4 text-2xl text-ut-burntorange font-bold'>Longhorn Feedback</h2>
|
|
||||||
<p className='mb-4 text-sm text-ut-black'>Help us make UT Registration Plus even better!</p>
|
<p className='mb-4 text-sm text-ut-black'>Help us make UT Registration Plus even better!</p>
|
||||||
|
|
||||||
<form onSubmit={submitFeedback}>
|
<form onSubmit={submitFeedback}>
|
||||||
<div className='mb-4'>
|
<div className='mb-1'>
|
||||||
<label htmlFor='email' className='mb-1 block text-sm text-ut-black font-medium'>
|
<label htmlFor='email' className='mb-1 block text-sm text-ut-black font-medium'>
|
||||||
Your @utexas.edu email
|
Your @utexas.edu email
|
||||||
</label>
|
</label>
|
||||||
@@ -85,8 +108,13 @@ export default function ReportIssueMain(): JSX.Element {
|
|||||||
<input
|
<input
|
||||||
type='email'
|
type='email'
|
||||||
id='email'
|
id='email'
|
||||||
value={email}
|
value={emailAddress}
|
||||||
onChange={e => setEmail(e.target.value)}
|
onChange={e =>
|
||||||
|
setEmailAddress({
|
||||||
|
emailAddress: e.target.value,
|
||||||
|
rememberMyEmail: rememberMyEmail ?? false,
|
||||||
|
})
|
||||||
|
}
|
||||||
className='w-full border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-500'
|
className='w-full border border-gray-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-500'
|
||||||
placeholder='bevo@utexas.edu'
|
placeholder='bevo@utexas.edu'
|
||||||
required
|
required
|
||||||
@@ -94,6 +122,23 @@ export default function ReportIssueMain(): JSX.Element {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className='mb-4'>
|
||||||
|
<label className='mb-1 flex cursor-pointer content-center gap-1.25 text-sm text-ut-black font-medium'>
|
||||||
|
<input
|
||||||
|
type='checkbox'
|
||||||
|
className='cursor-pointer'
|
||||||
|
checked={rememberMyEmail}
|
||||||
|
onChange={e =>
|
||||||
|
setRememberMyEmail({
|
||||||
|
rememberMyEmail: e.target.checked,
|
||||||
|
emailAddress: emailAddress ?? '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>{' '}
|
||||||
|
Remember my email
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='mb-4'>
|
<div className='mb-4'>
|
||||||
<label htmlFor='feedback' className='mb-1 block text-sm text-ut-black font-medium'>
|
<label htmlFor='feedback' className='mb-1 block text-sm text-ut-black font-medium'>
|
||||||
Your feedback
|
Your feedback
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ const links: LinkItem[] = [
|
|||||||
text: "Fall '25 Course Schedule",
|
text: "Fall '25 Course Schedule",
|
||||||
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20259/',
|
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20259/',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: "Summer '25 Course Schedule",
|
|
||||||
url: 'https://utdirect.utexas.edu/apps/registrar/course_schedule/20256/',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
text: 'Course Schedule Archives',
|
text: 'Course Schedule Archives',
|
||||||
url: 'https://registrar.utexas.edu/schedules/archive',
|
url: 'https://registrar.utexas.edu/schedules/archive',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import presetWind4 from '@unocss/preset-wind4';
|
import presetUno from '@unocss/preset-uno';
|
||||||
import presetWebFonts from '@unocss/preset-web-fonts';
|
import presetWebFonts from '@unocss/preset-web-fonts';
|
||||||
import transformerDirectives from '@unocss/transformer-directives';
|
import transformerDirectives from '@unocss/transformer-directives';
|
||||||
import transformerVariantGroup from '@unocss/transformer-variant-group';
|
import transformerVariantGroup from '@unocss/transformer-variant-group';
|
||||||
@@ -50,8 +50,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
presets: [
|
presets: [
|
||||||
presetWind4(),
|
presetUno(),
|
||||||
// todo: for some reason, breaking eslint ._.
|
|
||||||
presetWebFonts({
|
presetWebFonts({
|
||||||
provider: 'none',
|
provider: 'none',
|
||||||
fonts: {
|
fonts: {
|
||||||
|
|||||||
@@ -207,9 +207,6 @@ export default defineConfig({
|
|||||||
hmr: {
|
hmr: {
|
||||||
clientPort: 5173,
|
clientPort: 5173,
|
||||||
},
|
},
|
||||||
cors: {
|
|
||||||
origin: [/chrome-extension:\/\//],
|
|
||||||
},
|
|
||||||
proxy: {
|
proxy: {
|
||||||
'/debug.html': {
|
'/debug.html': {
|
||||||
target: 'http://localhost:5173',
|
target: 'http://localhost:5173',
|
||||||
@@ -259,16 +256,16 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// test: {
|
test: {
|
||||||
// coverage: {
|
coverage: {
|
||||||
// provider: "v8",
|
provider: 'v8',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// css: {
|
css: {
|
||||||
// preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
// scss: {
|
scss: {
|
||||||
// api: "modern-compiler",
|
api: 'modern-compiler',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user