diff --git a/masqr.js b/masqr.js index 3861831..54c3865 100644 --- a/masqr.js +++ b/masqr.js @@ -13,23 +13,23 @@ export async function masqrCheck(config) { next(); return; } - + if (req.cookies["refreshcheck"] != "true") { res.cookie("refreshcheck", "true", { maxAge: 10000 }); // 10s refresh check MasqFail(req, res); return; } - + if (!authheader) { res.setHeader("WWW-Authenticate", "Basic"); res.status(401); MasqFail(req, res); return; } - + const auth = Buffer.from(authheader.split(" ")[1], "base64").toString().split(":"); const pass = auth[1]; - + const licenseCheck = ( await (await fetch(config.licenseServer + pass + "&host=" + req.headers.host)).json() )["status"]; @@ -37,14 +37,16 @@ export async function masqrCheck(config) { config.licenseServer + pass + "&host=" + req.headers.host + " returned " + licenseCheck ); if (licenseCheck == "License valid") { - res.cookie("authcheck", "true", { expires: new Date(Date.now() + 365 * 24 * 60 * 60 * 1000) }); // authorize session, for like a year, by then the link will be expired lol + res.cookie("authcheck", "true", { + expires: new Date(Date.now() + 365 * 24 * 60 * 60 * 1000), + }); // authorize session, for like a year, by then the link will be expired lol res.send(``); // fun hack to make the browser refresh and remove the auth params from the URL return; } - + MasqFail(req, res); return; - } + }; } async function MasqFail(req, res) { diff --git a/src/i18n/en.json b/src/i18n/en.json index ed7605e..6d9f6bd 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -27,7 +27,7 @@ "footer.brand": "Alu", "footer.madeWithLove": "Made with ❤️ by wearr", - "footer.poweredBy": "Powered by Ultraviolet", + "footer.poweredBy": "Titanium Network", "footer.services": "Services", "footer.socials": "Socials", "footer.aluProject": "Alu Project", diff --git a/src/i18n/jp.json b/src/i18n/jp.json index 8cc555d..40584aa 100644 --- a/src/i18n/jp.json +++ b/src/i18n/jp.json @@ -27,7 +27,7 @@ "footer.brand": "アルー", "footer.madeWithLove": "wearrによる❤️で作られました", - "footer.poweredBy": "「ウルトラバイオレット」による駆動", + "footer.poweredBy": "チタンネットワークサービス", "footer.services": "サービス", "footer.socials": "ソーシャル", "footer.aluProject": "アループロジェクト", diff --git a/src/json/marketplace.json b/src/json/marketplace.json index 7eff5bc..b6c6ebc 100644 --- a/src/json/marketplace.json +++ b/src/json/marketplace.json @@ -1,9 +1,14 @@ { - "adblock": { - "title": "Adblocker", - "version": "0.0.1", - "image": "/marketplace/adblock/adblock.png", - "script": "/marketplace/adblock/adblocker.js", - "slug": "adblock" - } -} \ No newline at end of file + "dev.wearr.adblock": { + "title": "Adblocker", + "version": "0.0.1", + "image": "/marketplace/adblock/adblock.png", + "script": "/marketplace/adblock/adblocker.js" + }, + "dev.wearr.adblock2": { + "title": "Adblocker2", + "version": "0.0.2", + "image": "/marketplace/adblock/adblock.png", + "script": "/marketplace/adblock/adblocker.js" + } +} diff --git a/src/pages/[lang]/marketplace.astro b/src/pages/[lang]/marketplace.astro index 5a7cc03..bdb6933 100644 --- a/src/pages/[lang]/marketplace.astro +++ b/src/pages/[lang]/marketplace.astro @@ -1,76 +1,219 @@ --- import { STATIC_PATHS } from "@i18n/utils"; -import Layout from "src/layouts/Layout.astro" -import marketplace from "../../json/marketplace.json" +import Layout from "src/layouts/Layout.astro"; +import marketplace from "../../json/marketplace.json"; -export const getStaticPaths = (() => { - return STATIC_PATHS; -}); +export const getStaticPaths = () => { + return STATIC_PATHS; +}; type MarketplaceItem = { - title: string, - version: string | number, - image: string, - script: string, - slug: string + title: string; + version: string | number; + image: string; + script: string; }; --- -
-

Marketplace

-
- {Object.keys(marketplace).map((mp_item) => { - const item = (marketplace as {[key: string ]: MarketplaceItem})[mp_item] - return
- {`${item.title} -
{item.title}
- -
- })} -
+
+

Marketplace

+
+ { + Object.keys(marketplace).map((mp_item) => { + const item = (marketplace as { [key: string]: MarketplaceItem })[mp_item]; + const slug = mp_item; + console.log(slug); + return ( +
+ {`${item.title} +
{item.title}
+ +
+ ); + }) + }
+
\ No newline at end of file + .marketplace-ext-grid { + display: grid; + width: 90%; + margin: 0 auto; + color: var(--text-color); + display: grid; + display: flex; + flex-direction: row; + flex-wrap: wrap; + text-align: center; + justify-content: center; + gap: 20px; + } + .marketplace-item { + border: 3px solid var(--accent-color); + padding: 20px; + border-radius: 15px; + width: 180px; + } + .marketplace-item-image { + width: 64px; + height: 64px; + } + .marketplace-install-btn { + width: 100%; + background-color: var(--accent-color); + color: var(--text-color); + border: none; + margin-top: 3px; + padding: 3px; + cursor: pointer; + font-family: "Varela Round", sans-serif; + } +