diff --git a/.gitignore b/.gitignore index 6d4c0aa..aef91ac 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ pnpm-debug.log* .env.production # macOS-specific files -.DS_Store +.DS_Store \ No newline at end of file diff --git a/index.js b/index.js index 1301d25..6e2be34 100644 --- a/index.js +++ b/index.js @@ -6,6 +6,7 @@ import express from 'express'; import { handler as ssrHandler } from './dist/server/entry.mjs'; import dotenv from 'dotenv'; import compression from "compression" +import chalk from "chalk" dotenv.config(); const PORT = process.env.PORT || 3000; @@ -30,25 +31,26 @@ app.get('*', function(req, res){ }); server.on("request", (req, res) => { - if (bareServer.shouldRoute(req)) { - bareServer.routeRequest(req, res); - } else { - app(req, res); - } - }); + if (bareServer.shouldRoute(req)) { + bareServer.routeRequest(req, res); + } else { + app(req, res); + } +}); - server.on("upgrade", (req, socket, head) => { - if (bareServer.shouldRoute(req)) { - bareServer.routeUpgrade(req, socket, head); - } else { - socket.end(); - } - }); - - server.on("listening", () => { - console.log(`Server running at http://localhost:${PORT}/.`); - }); - - server.listen({ - port: PORT - }); \ No newline at end of file +server.on("upgrade", (req, socket, head) => { + if (bareServer.shouldRoute(req)) { + bareServer.routeUpgrade(req, socket, head); + } else { + socket.end(); + } +}); + +console.log(chalk.gray("Starting Alu...")) +server.on("listening", () => { + console.log(chalk.green(`Server running at http://localhost:${PORT}/.`)); +}); + +server.listen({ + port: PORT +}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2290aaf..334e7c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "astro": "^4.1.1", "astro-i18n": "^2.2.4", "astro-i18next": "^1.0.0-beta.21", + "chalk": "^5.3.0", "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", @@ -192,6 +193,19 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", @@ -425,6 +439,19 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { "version": "7.23.6", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", @@ -2205,17 +2232,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/boxen/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -2368,16 +2384,14 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { - "node": ">=4" + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/character-entities": { @@ -4439,17 +4453,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -8265,17 +8268,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/ora/node_modules/string-width": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", diff --git a/package.json b/package.json index 51f8add..338471b 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "astro": "^4.1.1", "astro-i18n": "^2.2.4", "astro-i18next": "^1.0.0-beta.21", + "chalk": "^5.3.0", "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", diff --git a/src/components/SettingsContent/CloakingTab.astro b/src/components/SettingsContent/CloakingTab.astro new file mode 100644 index 0000000..a3ba6f7 --- /dev/null +++ b/src/components/SettingsContent/CloakingTab.astro @@ -0,0 +1,43 @@ +--- + + const presetCloaks = [ + {"cloakTitle": "Alu", "favicon": "/favicon.png"}, + {"cloakTitle": "Google", "favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://google.com&size=128"}, + {"cloakTitle": "Instructure", "favicon": "https://du11hjcvx0uqb.cloudfront.net/dist/images/favicon-e10d657a73.ico"}, + {"cloakTitle": "Google Classroom", "favicon": "https://ssl.gstatic.com/classroom/ic_product_classroom_144.png"}, + {"cloakTitle": "Classlink", "favicon": "https://cdn.classlink.com/production/launchpad/resources/images/favicon/favicon-32x32.png"}, + {"cloakTitle": "Google Drive", "favicon": "https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png"}, + {"cloakTitle": "Schoology", "favicon": "https://asset-cdn.schoology.com/sites/all/themes/schoology_theme/favicon.ico"} + ] + +--- + +
Cloaking settings
+Change how your tab looks...
+Credits settings
+Credits..