diff --git a/.env.development b/.env.development deleted file mode 100644 index e976ddb8..00000000 --- a/.env.development +++ /dev/null @@ -1 +0,0 @@ -MANIFEST_KEY= \ No newline at end of file diff --git a/.env.production b/.env.production deleted file mode 100644 index e69de29b..00000000 diff --git a/@types/css-imports.d.ts b/@types/css-imports.d.ts deleted file mode 100644 index 60c46e85..00000000 --- a/@types/css-imports.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare module '*.module.css' { - const classes: { [key: string]: string }; - export default classes; -} - -declare module '*.module.scss' { - const classes: { [key: string]: string }; - export default classes; -} -declare module '*.mp3' { - const src: string; - export default src; -} diff --git a/@types/environment.d.ts b/@types/environment.d.ts deleted file mode 100644 index 3039e99a..00000000 --- a/@types/environment.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare global { - namespace NodeJS { - interface ProcessEnv { - NODE_ENV: 'development' | 'production'; - CI?: string; - /** set this to make sure the extension id is the same for unpacked extensions - * @see https://developer.chrome.com/docs/apps/app_identity/#copy_key */ - MANIFEST_KEY?: string; - /** - * The Node semantic versioning-compatible version of the extension. For preview-style releases, this variable - * converts versions like 1.0.0.100 to 1.0.0-beta.1. - */ - SEMANTIC_VERSION?: string; - } - } - - type Environment = typeof process.env.NODE_ENV; -} - -// If this file has no import/export statements (i.e. is a script) -// convert it into a module by adding an empty export statement. -export {}; diff --git a/@types/svg-import.d.ts b/@types/svg-import.d.ts deleted file mode 100644 index c64c2861..00000000 --- a/@types/svg-import.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module "*.svg" { - import { ReactElement, SVGProps } from "react"; - - const ReactComponent: (props: SVGProps) => ReactElement; - export default ReactComponent; -} \ No newline at end of file diff --git a/@types/vite-env.d.ts b/@types/vite-env.d.ts new file mode 100644 index 00000000..97d9bb07 --- /dev/null +++ b/@types/vite-env.d.ts @@ -0,0 +1,10 @@ +/// + +interface ImportMetaEnv { + readonly VITE_PACKAGE_VERSION: string; + readonly VITE_BETA_BUILD?: 'true'; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} diff --git a/package.json b/package.json index b22ba7f4..d73bf089 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "ut-registration-plus", "displayName": "UT Registration Plus", - "version": "2.0.0-beta1", - "description": "The UT Registration Plus extension is a Chrome extension that allows students to easily register for classes at The University of Texas at Austin.", + "version": "2.0.0-beta2", + "description": "UT Registration Plus is a Chrome extension that allows students to easily register for classes.", "private": true, - "homepage": "sriramhariharan.com", + "homepage": "https://github.com/Longhorn-Developers/UT-Registration-Plus", "type": "module", "scripts": { "dev": "vite", diff --git a/src/pages/options/App.tsx b/src/pages/options/App.tsx index 6de7b184..c3e7d27f 100644 --- a/src/pages/options/App.tsx +++ b/src/pages/options/App.tsx @@ -1,4 +1,5 @@ import ExtensionRoot from '@views/components/common/ExtensionRoot/ExtensionRoot'; +import Link from '@views/components/common/Link'; import React from 'react'; /** @@ -7,7 +8,28 @@ import React from 'react'; export default function App() { return ( -
hello how are you doing today.
+
+
+ “Real powerusers modify the sourcecode instead of using settings” - doprz +
+
+ + “become hackerman, go to{' '} + + github + {' '} + yay” + {' '} + - razboy20 +
+

+ {import.meta.env.VITE_PACKAGE_VERSION} - {import.meta.env.MODE}{' '} + {import.meta.env.VITE_BETA_BUILD ? 'beta' : ''} +

+
); } diff --git a/src/views/components/calendar/CalendarFooter.tsx b/src/views/components/calendar/CalendarFooter.tsx index aae71b71..3e55c17b 100644 --- a/src/views/components/calendar/CalendarFooter.tsx +++ b/src/views/components/calendar/CalendarFooter.tsx @@ -17,10 +17,10 @@ export default function CalendarFooter(): JSX.Element { - + - + diff --git a/src/views/components/calendar/TeamLinks.tsx b/src/views/components/calendar/TeamLinks.tsx index 66f01b63..0904b0c1 100644 --- a/src/views/components/calendar/TeamLinks.tsx +++ b/src/views/components/calendar/TeamLinks.tsx @@ -24,7 +24,7 @@ const links: LinkItem[] = [ }, { text: 'Become a Beta Tester', - url: '#', + url: 'https://discord.gg/bVh9g6VFwB', }, ]; diff --git a/src/views/components/common/LogoIcon.tsx b/src/views/components/common/LogoIcon.tsx index 7345e1f4..a1e88030 100644 --- a/src/views/components/common/LogoIcon.tsx +++ b/src/views/components/common/LogoIcon.tsx @@ -30,7 +30,12 @@ export function SmallLogo({ className }: { className?: string }): JSX.Element {

UT Registration

-

Plus

+

+ Plus{' '} + + {import.meta.env.VITE_BETA_BUILD ? `(${import.meta.env.VITE_PACKAGE_VERSION})` : ''} + +

); @@ -48,7 +53,12 @@ export function LargeLogo({ className }: { className?: string }): JSX.Element {

UT Registration

-

Plus

+

+ Plus{' '} + + {import.meta.env.VITE_BETA_BUILD ? `(${import.meta.env.VITE_PACKAGE_VERSION})` : ''} + +

); diff --git a/tsconfig.json b/tsconfig.json index a17fda0d..b44e73f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,10 @@ "module": "esnext", "noEmit": true, "jsx": "react", - "typeRoots": ["./node_modules/@types", "./@types/"], + "typeRoots": [ + "./node_modules/@types", + "@types" + ], "skipLibCheck": true, "esModuleInterop": true, "resolveJsonModule": true, @@ -32,6 +35,7 @@ "src", "utils", "vite.config.ts", + "@types", "node_modules/@types", "src/manifest.ts", "package.json", @@ -39,5 +43,7 @@ "postcss.config.cjs", ".storybook", "unocss.config.ts" - ] +, +"@types" +] } diff --git a/vite.config.ts b/vite.config.ts index 11fdb4e4..d2f209bf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,15 +8,19 @@ import type { Plugin, ResolvedConfig, Rollup, ViteDevServer } from 'vite'; import { defineConfig } from 'vite'; import inspect from 'vite-plugin-inspect'; +import packageJson from './package.json'; import manifest from './src/manifest'; const root = resolve(__dirname, 'src'); const pagesDir = resolve(root, 'pages'); const assetsDir = resolve(root, 'assets'); -const outDir = resolve(__dirname, 'dist'); const publicDir = resolve(__dirname, 'public'); -const isDev = process.env.NODE_ENV === 'development'; +const isBeta = !!process.env.BETA; +if (isBeta) { + process.env.VITE_BETA_BUILD = 'true'; +} +process.env.VITE_PACKAGE_VERSION = packageJson.version; export const preambleCode = ` import RefreshRuntime from "__BASE__@react-refresh"