From e3133f28d486cc95735e4d9925e7f323a92600f0 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 10:07:09 -0600 Subject: [PATCH 1/6] add suika combination --- index.js | 6 ++++++ package-lock.json | 9 +++++++++ package.json | 1 + public/games | 2 +- src/json/games.json | 5 +++++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c9f7e06..2118c02 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ import { build } from "astro"; import chalk from "chalk"; import { existsSync } from "fs"; import dotenv from "dotenv"; +import helmet from "helmet"; dotenv.config(); if (!existsSync("./dist")) build(); @@ -47,6 +48,11 @@ app.use( extended: true, }) ); +app.use(function(req, res, next) { + res.header("Cross-Origin-Embedder-Policy", "require-corp"); + res.header("Cross-Origin-Opener-Policy", "same-origin"); + next(); +}); app.use("/", express.static("dist/client/")); app.get("/search", async (req, res) => { try { diff --git a/package-lock.json b/package-lock.json index 578bd5d..de05d44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", + "helmet": "^7.1.0", "npm": "^10.2.5", "path": "^0.12.7", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", @@ -3465,6 +3466,14 @@ "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.3.0.tgz", "integrity": "sha512-5e57etwBpNcDc0b6KCVWEh/Ro063OxPvzVimUdM0/tsYM/T7Hfy3kknIGj78SFTOhNd8AZY41U8mOHoO4LzmIQ==" }, + "node_modules/helmet": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.1.0.tgz", + "integrity": "sha512-g+HZqgfbpXdCkme/Cd/mZkV0aV3BZZZSugecH03kl38m/Kmdx8jKjBikpDj2cr+Iynv4KpYEviojNdTJActJAg==", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", diff --git a/package.json b/package.json index c3c7017..605926f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "compression": "^1.7.4", "dotenv": "^16.3.1", "express": "^4.18.2", + "helmet": "^7.1.0", "npm": "^10.2.5", "path": "^0.12.7", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", diff --git a/public/games b/public/games index 11287d0..2e6cd67 160000 --- a/public/games +++ b/public/games @@ -1 +1 @@ -Subproject commit 11287d0a834c672a55d10164dbfefe9ee1922d3d +Subproject commit 2e6cd673ab519025af951713868860b7895b11b8 diff --git a/src/json/games.json b/src/json/games.json index c501e13..9ff7b73 100644 --- a/src/json/games.json +++ b/src/json/games.json @@ -214,6 +214,11 @@ "image": "/games/sort-the-court/logo.jpg", "slug": "sort-the-court" }, + "suika-combination": { + "name": "Suika Combination", + "image": "/games/suika-combination/logo.png", + "slug": "suika-combination" + }, "superhot": { "name": "Superhot", "image": "/games/superhot/logo.png", From de7fbef45d74dd089e6a924a63b075c7ffcb4450 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 10:07:46 -0600 Subject: [PATCH 2/6] update games --- public/games | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/games b/public/games index 2e6cd67..5be0e4a 160000 --- a/public/games +++ b/public/games @@ -1 +1 @@ -Subproject commit 2e6cd673ab519025af951713868860b7895b11b8 +Subproject commit 5be0e4a97f305c9e5860d5cc997df73bf78f43d0 From cb6323288e92165200eb6f2ba42d8228a123802a Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 13:06:29 -0600 Subject: [PATCH 3/6] Fix suika game --- src/json/games.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json/games.json b/src/json/games.json index 9ff7b73..5a13ec1 100644 --- a/src/json/games.json +++ b/src/json/games.json @@ -216,7 +216,7 @@ }, "suika-combination": { "name": "Suika Combination", - "image": "/games/suika-combination/logo.png", + "image": "/games/suika-combination/logo.webp", "slug": "suika-combination" }, "superhot": { From a9df5402e5a91134252c30cd7174080af8276831 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 13:06:54 -0600 Subject: [PATCH 4/6] Update games submodule --- public/games | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/games b/public/games index 5be0e4a..8793db1 160000 --- a/public/games +++ b/public/games @@ -1 +1 @@ -Subproject commit 5be0e4a97f305c9e5860d5cc997df73bf78f43d0 +Subproject commit 8793db1e2fe64cae8936c00bcd4f333f158f6ebd From 5636a910285db9afc94531aa01fadbceb50ee02c Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 13:56:21 -0600 Subject: [PATCH 5/6] Mobile responsive settings, and fix bug with index.js --- index.js | 6 ++- src/components/SettingsTablist.astro | 59 ++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/index.js b/index.js index 2118c02..bf253f7 100644 --- a/index.js +++ b/index.js @@ -49,8 +49,10 @@ app.use( }) ); app.use(function(req, res, next) { - res.header("Cross-Origin-Embedder-Policy", "require-corp"); - res.header("Cross-Origin-Opener-Policy", "same-origin"); + if (req.originalUrl.includes("/games")) { + res.header("Cross-Origin-Embedder-Policy", "require-corp"); + res.header("Cross-Origin-Opener-Policy", "same-origin"); + } next(); }); app.use("/", express.static("dist/client/")); diff --git a/src/components/SettingsTablist.astro b/src/components/SettingsTablist.astro index fe72117..2e89718 100644 --- a/src/components/SettingsTablist.astro +++ b/src/components/SettingsTablist.astro @@ -385,6 +385,7 @@ const t = useTranslations(lang); gap: 20px; position: relative; z-index: 2; + flex-wrap: wrap; } .content-setting-header { color: var(--text-color); @@ -460,6 +461,38 @@ const t = useTranslations(lang); position: relative; gap: 25px; } + @media (max-width: 880px) { + .popup { + flex-direction: column; + min-height: 80%; + max-height: 80%; + } + .tabs { + flex-direction: row; + max-width: 100%; + max-height: 70px; + min-height: 70px; + gap: 0; + align-items: center; + } + label { + width: auto; + margin-left: 0; + } + } + @media (max-width: 500px) { + label { + font-size: 20px; + } + } + @media (max-width: 375px) { + label { + font-size: 18px; + } + } + .setting { + width: 140px + } .marker { position: absolute; width: 100%; @@ -484,16 +517,18 @@ const t = useTranslations(lang); height: calc(50% - 72px); border-radius: 0 32px 0 0; } - #setting-tab-proxy:checked ~ .marker { - transform: translateY(0%); + @media (min-width: 880px) { + #setting-tab-proxy:checked ~ .marker { + transform: translateY(0%); + } + #setting-tab-customization:checked ~ .marker { + transform: translateY(13.5%); + } + #setting-tab-cloaking:checked ~ .marker { + transform: translateY(27%); + } + #setting-tab-credits:checked ~ .marker { + transform: translateY(41%); + } } - #setting-tab-customization:checked ~ .marker { - transform: translateY(13.5%); - } - #setting-tab-cloaking:checked ~ .marker { - transform: translateY(27%); - } - #setting-tab-credits:checked ~ .marker { - transform: translateY(41%); - } - + \ No newline at end of file From c5a2b2563b2d06d9720f6ea416a1e792d7bc83e0 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 23 Feb 2024 14:55:24 -0600 Subject: [PATCH 6/6] Fix body overflow issues and add some forgotten i18n keys. --- index.js | 2 +- src/components/ProxyRegistrar.astro | 2 ++ src/components/SettingsTablist.astro | 4 ++-- src/i18n/en.json | 6 ++++++ src/i18n/jp.json | 5 +++++ src/pages/[lang]/index.astro | 13 ++++++++----- 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index bf253f7..5988670 100644 --- a/index.js +++ b/index.js @@ -48,7 +48,7 @@ app.use( extended: true, }) ); -app.use(function(req, res, next) { +app.use(function (req, res, next) { if (req.originalUrl.includes("/games")) { res.header("Cross-Origin-Embedder-Policy", "require-corp"); res.header("Cross-Origin-Opener-Policy", "same-origin"); diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index af7571a..3f78713 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -58,12 +58,14 @@ iframe.style.opacity = 1; topbar.style.opacity = 1; topbar.style.pointerEvents = "auto"; + document.body.style.overflow = "hidden"; closeButton.onclick = () => { iframe.style.opacity = 0; topbar.style.opacity = 0; iframe.style.pointerEvents = "none"; topbar.style.pointerEvents = "none"; + document.body.style.overflow = "auto"; iframe.removeEventListener("load", boundIFrameLoad); setTimeout(() => { diff --git a/src/components/SettingsTablist.astro b/src/components/SettingsTablist.astro index 2e89718..e1eb309 100644 --- a/src/components/SettingsTablist.astro +++ b/src/components/SettingsTablist.astro @@ -491,7 +491,7 @@ const t = useTranslations(lang); } } .setting { - width: 140px + width: 140px; } .marker { position: absolute; @@ -531,4 +531,4 @@ const t = useTranslations(lang); transform: translateY(41%); } } - \ No newline at end of file + diff --git a/src/i18n/en.json b/src/i18n/en.json index 88edbf6..0b5c433 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -17,6 +17,12 @@ "faq.whyIsAluSoSlow": "Why is Alu so slow?", "faq.whyIsAluSoSlow.answer": "This could be for a number of reasons, but it is most likely due to the proxy you are using. If you are far away from where Alu is hosted, it will take longer for the request to be sent and received. If the proxy you are using is congested with traffic, it will also be slower.", + + "faq.contributeToAlu": "How can I contribute to Alu?", + "faq.contributeToAlu.answer.segment1": "Spreading the word of Alu is a great start, but if you really enjoy Alu, and want private links, consider supporting me through Patreon!", + "faq.contributeToAlu.answer.patreonLinkText": "You can support me here!", + "faq.contributeToAlu.answer.segment2": "Thank you for helping to make Alu great!", + "footer.brand": "Alu", "footer.madeWithLove": "Made with ❤️ by wearr", "footer.poweredBy": "Powered by Ultraviolet", diff --git a/src/i18n/jp.json b/src/i18n/jp.json index c156819..5dd1811 100644 --- a/src/i18n/jp.json +++ b/src/i18n/jp.json @@ -18,6 +18,11 @@ "faq.whyIsAluSoSlow": "なぜアルーは遅いのですか?", "faq.whyIsAluSoSlow.answer": "アルーは、プロキシを使用してウェブサイトにアクセスするため、ウェブサイトの読み込みに時間がかかることがあります。また、アルーはまだ開発中のため、パフォーマンスが低いことがあります。", + "faq.contributeToAlu": "アルーの発展にどのように貢献できますか?", + "faq.contributeToAlu.answer.segment1": "アルーの言葉を広めることは素晴らしいスタートですが、Alu が本当に好きで、プライベート リンクが必要な場合は、Patreon を通じて私をサポートすることを検討してください。", + "faq.contributeToAlu.answer.patreonLinkText": "ここで私をサポートできます", + "faq.contributeToAlu.answer.segment2": "アルーを素晴らしいものにするのにご協力いただき、ありがとうございます。", + "footer.brand": "アルー", "footer.madeWithLove": "wearrによる❤️で作られました", "footer.poweredBy": "「ウルトラバイオレット」による駆動", diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index be17956..867acc7 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -43,12 +43,15 @@ export function getStaticPaths() {

{t("faq.whyIsAluSoSlow.answer")}

-

How can I contribute to the development of Alu?

+

{t("faq.contributeToAlu")}

- Spreading the word of Alu is a great start, but if you really enjoy Alu, and want private - links, consider supporting me through Patreon! You can support me - , thank you - for helping to make Alu great! + {t("faq.contributeToAlu.answer.segment1")} + + {t("faq.contributeToAlu.answer.segment2")}