From 9593a0e46bb305ae64d913545518ef1cb389f8b9 Mon Sep 17 00:00:00 2001 From: incognitotgt Date: Tue, 30 Jan 2024 21:29:06 -0500 Subject: [PATCH 1/2] chore: add seo tags, prettier was also ran :whale: --- Checkfailed.html | 1 - index.html | 14 ++--- public/robots.txt | 5 ++ public/sw.js | 3 +- server.ts | 1 - src/components/Meta.tsx | 88 ++++++++++++++++++++++++++++++++ src/index.tsx | 2 + src/pages/Faq.css | 2 +- src/pages/Home.tsx | 2 +- src/pages/Settings/BareInput.tsx | 2 +- 10 files changed, 102 insertions(+), 18 deletions(-) create mode 100644 public/robots.txt create mode 100644 src/components/Meta.tsx diff --git a/Checkfailed.html b/Checkfailed.html index 84cf7b0..1bf52a5 100644 --- a/Checkfailed.html +++ b/Checkfailed.html @@ -32,4 +32,3 @@

Thank you for using nginx.

- diff --git a/index.html b/index.html index 743486e..2f93031 100644 --- a/index.html +++ b/index.html @@ -3,17 +3,9 @@ - - - - - - - - + + + + + + ); +} diff --git a/src/index.tsx b/src/index.tsx index b6e6945..8e1dee1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2,6 +2,7 @@ import { render } from "preact"; import { Suspense, lazy } from "preact/compat"; import { LoadSuspense } from "./LoadSuspense"; import { Helmet } from "react-helmet"; +import Meta from "./components/Meta"; const Routes = lazy(() => import("./routes")); @@ -10,6 +11,7 @@ const theme = localStorage.getItem("theme") || "main"; export default function App() { return (
+ diff --git a/src/pages/Faq.css b/src/pages/Faq.css index 3c35ea7..d8570a5 100644 --- a/src/pages/Faq.css +++ b/src/pages/Faq.css @@ -1,4 +1,4 @@ .highlighted { background-color: var(--navbar-text-color); - transition: background-color 1s ease; + transition: background-color 1s ease; } diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 7700497..6dfd8f0 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -45,7 +45,7 @@ export function Home() { const usUrl = "https://us." + nonProtocolOrigin; const jpUrl = "https://jp." + nonProtocolOrigin; - console.log(usUrl, jpUrl) + console.log(usUrl, jpUrl); const [usTime, jpTime] = await Promise.all([ ping(usUrl), diff --git a/src/pages/Settings/BareInput.tsx b/src/pages/Settings/BareInput.tsx index 34d8d8e..8d26aac 100644 --- a/src/pages/Settings/BareInput.tsx +++ b/src/pages/Settings/BareInput.tsx @@ -68,7 +68,7 @@ function BareInput(props: BareInputProps) { value={inputValue} onKeyPress={(event) => { if (event.key === "Enter") { - handleChange() + handleChange(); } }} id="input" From ef06e6e6a329037ccdc8db30ef32e298f7cb86d8 Mon Sep 17 00:00:00 2001 From: incognitotgt Date: Tue, 30 Jan 2024 22:48:26 -0500 Subject: [PATCH 2/2] fix: text color on some pages chore: add compression for lighthouse, meta tags feat: near perfect lighthouse scores???? --- server.ts | 3 +++ src/index.tsx | 3 ++- src/pages/Home.tsx | 2 +- src/pages/Settings/BareInput.tsx | 4 ++-- src/pages/Settings/ProxyInput.tsx | 6 +++--- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/server.ts b/server.ts index 8beffb2..22d140f 100644 --- a/server.ts +++ b/server.ts @@ -77,6 +77,9 @@ const serverFactory = (handler, opts) => { const app = fastify({ logger: true, serverFactory }); app.register(cookieParser); +await app.register( + import("@fastify/compress") + ); // Uncomment if you wish to add masqr. /* app.addHook("preHandler", async (req, reply) => { diff --git a/src/index.tsx b/src/index.tsx index 8e1dee1..07d40bd 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,7 +11,8 @@ const theme = localStorage.getItem("theme") || "main"; export default function App() { return (
- + {window.location.origin === "https://nebulaproxy.io" && } + {/* {window.location.origin === "http://localhost:8080" && } */} diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 6dfd8f0..26e6d84 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -157,7 +157,7 @@ export function Home() { } >
{t("settings.bare.select")} diff --git a/src/pages/Settings/ProxyInput.tsx b/src/pages/Settings/ProxyInput.tsx index 14682f0..6c397d7 100644 --- a/src/pages/Settings/ProxyInput.tsx +++ b/src/pages/Settings/ProxyInput.tsx @@ -116,17 +116,17 @@ function ProxyInput(props: BareInputProps) { } }} id="pinput" - className="font-roboto flex h-14 w-56 flex-row rounded-2xl border border-input-border-color bg-input p-4 text-center text-sm" + className="font-roboto flex h-14 w-56 flex-row rounded-2xl border text-input-text border-input-border-color bg-input p-4 text-center text-sm" />
{t("settings.bare.select")}
{t("settings.httpProxy.reset")}