From b8bc307fe73e2a0cb7dad26249ee8400ba5c9c0b Mon Sep 17 00:00:00 2001 From: MotorTruck1221 Date: Sat, 9 Mar 2024 02:52:11 -0700 Subject: [PATCH] Format --- package.json | 132 +++++++-------- public/crismas.json | 220 ++++++++++++------------- public/particlesjs-config.json | 220 ++++++++++++------------- public/themes/hacker.css | 60 +++---- server.ts | 12 +- src/components/Header.tsx | 6 +- src/components/iframe/IframeHeader.tsx | 2 +- src/components/logo.tsx | 32 ++-- src/index.tsx | 49 +++--- src/pages/Settings/Proxy.tsx | 5 +- src/style.css | 2 +- src/util/transports.ts | 11 +- vite.config.ts | 8 +- 13 files changed, 392 insertions(+), 367 deletions(-) diff --git a/package.json b/package.json index 8629647..ef5a8ed 100644 --- a/package.json +++ b/package.json @@ -1,66 +1,66 @@ -{ - "name": "nebula", - "private": true, - "type": "module", - "scripts": { - "dev": "concurrently \"vite\" \"bare-server-node --port 8080\"", - "build": "vite build", - "bstart": "npm run build && tsx server.ts", - "start": "tsx server.ts", - "preview": "vite preview", - "format": "prettier --write ." - }, - "dependencies": { - "@fastify/compress": "^6.5.0", - "@fastify/cookie": "^9.3.1", - "@fastify/static": "^6.12.0", - "@mercuryworkshop/bare-mux": "^1.0.4", - "@mercuryworkshop/epoxy-transport": "^1.0.2", - "@mercuryworkshop/libcurl-transport": "^1.2.0", - "@nebula-services/dynamic": "0.7.2-patch.2", - "@titaniumnetwork-dev/ultraviolet": "^3.0.0", - "@tomphttp/bare-server-node": "2.0.3", - "@tsparticles/engine": "^3.3.0", - "@tsparticles/react": "^3.0.0", - "@tsparticles/slim": "^3.3.0", - "@types/express": "^4.17.21", - "chalk": "^5.3.0", - "classnames": "^2.5.1", - "compression": "^1.7.4", - "cookie-parser": "^1.4.6", - "crypto-js": "^4.2.0", - "express": "^4.18.3", - "fastify": "^4.26.2", - "framer-motion": "^10.18.0", - "i18next": "^23.10.1", - "i18next-browser-languagedetector": "^7.2.0", - "localforage": "^1.10.0", - "million": "^2.6.4", - "preact": "^10.19.6", - "preact-iso": "^2.4.0", - "preact-render-to-string": "^6.4.0", - "preact-router": "^4.1.2", - "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", - "react-helmet": "^6.1.0", - "react-i18next": "^13.5.0", - "react-icons": "^4.12.0", - "react-toastify": "^9.1.3", - "tsx": "^4.7.1", - "wisp-server-node": "^1.0.1", - "ws": "^8.16.0" - }, - "devDependencies": { - "@preact/preset-vite": "^2.8.1", - "autoprefixer": "^10.4.18", - "concurrently": "^8.2.2", - "eslint": "^8.57.0", - "eslint-config-preact": "^1.3.0", - "postcss": "^8.4.35", - "prettier": "^3.2.5", - "prettier-plugin-tailwindcss": "^0.5.12", - "tailwindcss": "^3.4.1", - "typescript": "^5.4.2", - "vite": "^5.1.5", - "vite-plugin-static-copy": "^1.0.1" - } -} +{ + "name": "nebula", + "private": true, + "type": "module", + "scripts": { + "dev": "concurrently \"vite\" \"bare-server-node --port 8080\"", + "build": "vite build", + "bstart": "npm run build && tsx server.ts", + "start": "tsx server.ts", + "preview": "vite preview", + "format": "prettier --write ." + }, + "dependencies": { + "@fastify/compress": "^6.5.0", + "@fastify/cookie": "^9.3.1", + "@fastify/static": "^6.12.0", + "@mercuryworkshop/bare-mux": "^1.0.4", + "@mercuryworkshop/epoxy-transport": "^1.0.2", + "@mercuryworkshop/libcurl-transport": "^1.2.0", + "@nebula-services/dynamic": "0.7.2-patch.2", + "@titaniumnetwork-dev/ultraviolet": "^3.0.0", + "@tomphttp/bare-server-node": "2.0.3", + "@tsparticles/engine": "^3.3.0", + "@tsparticles/react": "^3.0.0", + "@tsparticles/slim": "^3.3.0", + "@types/express": "^4.17.21", + "chalk": "^5.3.0", + "classnames": "^2.5.1", + "compression": "^1.7.4", + "cookie-parser": "^1.4.6", + "crypto-js": "^4.2.0", + "express": "^4.18.3", + "fastify": "^4.26.2", + "framer-motion": "^10.18.0", + "i18next": "^23.10.1", + "i18next-browser-languagedetector": "^7.2.0", + "localforage": "^1.10.0", + "million": "^2.6.4", + "preact": "^10.19.6", + "preact-iso": "^2.4.0", + "preact-render-to-string": "^6.4.0", + "preact-router": "^4.1.2", + "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", + "react-helmet": "^6.1.0", + "react-i18next": "^13.5.0", + "react-icons": "^4.12.0", + "react-toastify": "^9.1.3", + "tsx": "^4.7.1", + "wisp-server-node": "^1.0.1", + "ws": "^8.16.0" + }, + "devDependencies": { + "@preact/preset-vite": "^2.8.1", + "autoprefixer": "^10.4.18", + "concurrently": "^8.2.2", + "eslint": "^8.57.0", + "eslint-config-preact": "^1.3.0", + "postcss": "^8.4.35", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.12", + "tailwindcss": "^3.4.1", + "typescript": "^5.4.2", + "vite": "^5.1.5", + "vite-plugin-static-copy": "^1.0.1" + } +} diff --git a/public/crismas.json b/public/crismas.json index 62202c3..715317b 100644 --- a/public/crismas.json +++ b/public/crismas.json @@ -1,110 +1,110 @@ -{ - "particles": { - "number": { - "value": 300, - "density": { - "enable": true, - "value_area": 800 - } - }, - "color": { - "value": "#ffffff" - }, - "shape": { - "type": "circle", - "stroke": { - "width": 0, - "color": "#000000" - }, - "polygon": { - "nb_sides": 5 - }, - "image": { - "src": "img/github.svg", - "width": 100, - "height": 100 - } - }, - "opacity": { - "value": 0.5, - "random": false, - "anim": { - "enable": false, - "speed": 1, - "opacity_min": 0.1, - "sync": false - } - }, - "size": { - "value": 1.5, - "random": true, - "anim": { - "enable": false, - "speed": 40, - "size_min": 0.1, - "sync": false - } - }, - "line_linked": { - "enable": false, - "distance": 150, - "color": "#ffffff", - "opacity": 0.4, - "width": 1 - }, - "move": { - "enable": true, - "speed": 6.3974410235905665, - "direction": "bottom-right", - "random": false, - "straight": false, - "out_mode": "out", - "bounce": false, - "attract": { - "enable": false, - "rotateX": 600, - "rotateY": 1200 - } - } - }, - "interactivity": { - "detect_on": "canvas", - "events": { - "onhover": { - "enable": false, - "mode": "repulse" - }, - "onclick": { - "enable": false, - "mode": "push" - }, - "resize": true - }, - "modes": { - "grab": { - "distance": 400, - "line_linked": { - "opacity": 1 - } - }, - "bubble": { - "distance": 400, - "size": 40, - "duration": 2, - "opacity": 8, - "speed": 3 - }, - "repulse": { - "distance": 200, - "duration": 0.4 - }, - "push": { - "particles_nb": 4 - }, - "remove": { - "particles_nb": 2 - } - } - }, - "retina_detect": true -} \ No newline at end of file +{ + "particles": { + "number": { + "value": 300, + "density": { + "enable": true, + "value_area": 800 + } + }, + "color": { + "value": "#ffffff" + }, + "shape": { + "type": "circle", + "stroke": { + "width": 0, + "color": "#000000" + }, + "polygon": { + "nb_sides": 5 + }, + "image": { + "src": "img/github.svg", + "width": 100, + "height": 100 + } + }, + "opacity": { + "value": 0.5, + "random": false, + "anim": { + "enable": false, + "speed": 1, + "opacity_min": 0.1, + "sync": false + } + }, + "size": { + "value": 1.5, + "random": true, + "anim": { + "enable": false, + "speed": 40, + "size_min": 0.1, + "sync": false + } + }, + "line_linked": { + "enable": false, + "distance": 150, + "color": "#ffffff", + "opacity": 0.4, + "width": 1 + }, + "move": { + "enable": true, + "speed": 6.3974410235905665, + "direction": "bottom-right", + "random": false, + "straight": false, + "out_mode": "out", + "bounce": false, + "attract": { + "enable": false, + "rotateX": 600, + "rotateY": 1200 + } + } + }, + "interactivity": { + "detect_on": "canvas", + "events": { + "onhover": { + "enable": false, + "mode": "repulse" + }, + "onclick": { + "enable": false, + "mode": "push" + }, + "resize": true + }, + "modes": { + "grab": { + "distance": 400, + "line_linked": { + "opacity": 1 + } + }, + "bubble": { + "distance": 400, + "size": 40, + "duration": 2, + "opacity": 8, + "speed": 3 + }, + "repulse": { + "distance": 200, + "duration": 0.4 + }, + "push": { + "particles_nb": 4 + }, + "remove": { + "particles_nb": 2 + } + } + }, + "retina_detect": true +} diff --git a/public/particlesjs-config.json b/public/particlesjs-config.json index bc57868..e5d3a73 100644 --- a/public/particlesjs-config.json +++ b/public/particlesjs-config.json @@ -1,110 +1,110 @@ -{ - "particles": { - "number": { - "value": 80, - "density": { - "enable": true, - "value_area": 800 - } - }, - "color": { - "value": "#ffffff" - }, - "shape": { - "type": "circle", - "stroke": { - "width": 0, - "color": "#000000" - }, - "polygon": { - "nb_sides": 5 - }, - "image": { - "src": "img/github.svg", - "width": 100, - "height": 100 - } - }, - "opacity": { - "value": 0.5, - "random": false, - "anim": { - "enable": false, - "speed": 1, - "opacity_min": 0.1, - "sync": false - } - }, - "size": { - "value": 3, - "random": true, - "anim": { - "enable": false, - "speed": 40, - "size_min": 0.1, - "sync": false - } - }, - "line_linked": { - "enable": true, - "distance": 150, - "color": "#ffffff", - "opacity": 0.4, - "width": 1 - }, - "move": { - "enable": true, - "speed": 6, - "direction": "none", - "random": false, - "straight": false, - "out_mode": "out", - "bounce": false, - "attract": { - "enable": false, - "rotateX": 600, - "rotateY": 1200 - } - } - }, - "interactivity": { - "detect_on": "canvas", - "events": { - "onhover": { - "enable": true, - "mode": "repulse" - }, - "onclick": { - "enable": true, - "mode": "push" - }, - "resize": true - }, - "modes": { - "grab": { - "distance": 400, - "line_linked": { - "opacity": 1 - } - }, - "bubble": { - "distance": 400, - "size": 40, - "duration": 2, - "opacity": 8, - "speed": 3 - }, - "repulse": { - "distance": 200, - "duration": 0.4 - }, - "push": { - "particles_nb": 4 - }, - "remove": { - "particles_nb": 2 - } - } - }, - "retina_detect": true -} \ No newline at end of file +{ + "particles": { + "number": { + "value": 80, + "density": { + "enable": true, + "value_area": 800 + } + }, + "color": { + "value": "#ffffff" + }, + "shape": { + "type": "circle", + "stroke": { + "width": 0, + "color": "#000000" + }, + "polygon": { + "nb_sides": 5 + }, + "image": { + "src": "img/github.svg", + "width": 100, + "height": 100 + } + }, + "opacity": { + "value": 0.5, + "random": false, + "anim": { + "enable": false, + "speed": 1, + "opacity_min": 0.1, + "sync": false + } + }, + "size": { + "value": 3, + "random": true, + "anim": { + "enable": false, + "speed": 40, + "size_min": 0.1, + "sync": false + } + }, + "line_linked": { + "enable": true, + "distance": 150, + "color": "#ffffff", + "opacity": 0.4, + "width": 1 + }, + "move": { + "enable": true, + "speed": 6, + "direction": "none", + "random": false, + "straight": false, + "out_mode": "out", + "bounce": false, + "attract": { + "enable": false, + "rotateX": 600, + "rotateY": 1200 + } + } + }, + "interactivity": { + "detect_on": "canvas", + "events": { + "onhover": { + "enable": true, + "mode": "repulse" + }, + "onclick": { + "enable": true, + "mode": "push" + }, + "resize": true + }, + "modes": { + "grab": { + "distance": 400, + "line_linked": { + "opacity": 1 + } + }, + "bubble": { + "distance": 400, + "size": 40, + "duration": 2, + "opacity": 8, + "speed": 3 + }, + "repulse": { + "distance": 200, + "duration": 0.4 + }, + "push": { + "particles_nb": 4 + }, + "remove": { + "particles_nb": 2 + } + } + }, + "retina_detect": true +} diff --git a/public/themes/hacker.css b/public/themes/hacker.css index ae7446e..ed10228 100644 --- a/public/themes/hacker.css +++ b/public/themes/hacker.css @@ -1,30 +1,30 @@ -@import url("https://fonts.googleapis.com/css2?family=Dongle&family=Roboto:wght@100&display=swap"); - -:root { - --background-primary: #000 !important; - --background-lighter: #000 !important; - --navbar-color: #000 !important; - --navbar-height: 60px !important; - --navbar-text-color: greenyellow !important; - --navbar-link-color: greenyellow !important; - --navbar-link-hover-color: green !important; - --navbar-font: "Roboto" !important; - --input-text-color: greenyellow !important; - --input-placeholder-color: white !important; - --input-background-color: #000 !important; - --input-border-color: greenyellow !important; - --input-border-size: 1.3px !important; - --navbar-logo-filter: none !important; - --dropdown-option-hover-color: #312a49 !important; - --tab-color: var(--black) !important; - --border-color: greenyellow !important; -} - -.font-inter { - font-family: "Inter", sans-serif; - font-weight: 300; -} - -.font-roboto { - font-family: "Roboto"; -} +@import url("https://fonts.googleapis.com/css2?family=Dongle&family=Roboto:wght@100&display=swap"); + +:root { + --background-primary: #000 !important; + --background-lighter: #000 !important; + --navbar-color: #000 !important; + --navbar-height: 60px !important; + --navbar-text-color: greenyellow !important; + --navbar-link-color: greenyellow !important; + --navbar-link-hover-color: green !important; + --navbar-font: "Roboto" !important; + --input-text-color: greenyellow !important; + --input-placeholder-color: white !important; + --input-background-color: #000 !important; + --input-border-color: greenyellow !important; + --input-border-size: 1.3px !important; + --navbar-logo-filter: none !important; + --dropdown-option-hover-color: #312a49 !important; + --tab-color: var(--black) !important; + --border-color: greenyellow !important; +} + +.font-inter { + font-family: "Inter", sans-serif; + font-weight: 300; +} + +.font-roboto { + font-family: "Roboto"; +} diff --git a/server.ts b/server.ts index 044fced..4550d7d 100644 --- a/server.ts +++ b/server.ts @@ -123,14 +123,16 @@ async function MasqFail(req: Request, res: Response) { return; }) */ -app.use(express.static("dist", { +app.use( + express.static("dist", { //force .cjs files to be served as text/javascript (libcurl) setHeaders: (res, path) => { - if (path.endsWith(".cjs")) { - res.setHeader("Content-Type", "text/javascript"); - } + if (path.endsWith(".cjs")) { + res.setHeader("Content-Type", "text/javascript"); + } } -})); + }) +); app.get("/search=:query", async (req: Request, res: Response) => { const { query } = req.params; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 4438204..7bbfa7b 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -18,13 +18,11 @@ export function Header() { return (