diff --git a/src/back/index.ts b/src/back/index.ts index 5dcc0e4..2ddeb38 100644 --- a/src/back/index.ts +++ b/src/back/index.ts @@ -10,7 +10,7 @@ const build = async () => { minify: !development, sourcemap: development ? "inline" : "none", splitting: true, - publicPath: "/assets/" + publicPath: "/assets/", }); }; @@ -65,10 +65,7 @@ const postAnalytics = async ( "Content-Type": "application/json", "User-Agent": req.headers.get("user-agent") || "", "X-Forwarded-For": String( - cfIp || - realIp || - forwardedIp?.split(",")[0] || - serverIp, + cfIp || realIp || forwardedIp?.split(",")[0] || serverIp, ), }, body: JSON.stringify({ diff --git a/src/front/App.tsx b/src/front/App.tsx index 8a30ad6..858223c 100644 --- a/src/front/App.tsx +++ b/src/front/App.tsx @@ -24,4 +24,4 @@ export default () => {

); -}; \ No newline at end of file +}; diff --git a/src/front/components/Lanyard/index.tsx b/src/front/components/Lanyard/index.tsx index ca5d211..a6ace73 100644 --- a/src/front/components/Lanyard/index.tsx +++ b/src/front/components/Lanyard/index.tsx @@ -37,13 +37,18 @@ export default () => { container.current.textContent = JSON.stringify( { status: lanyard.discord_status, - activities: [... new Set(lanyard.activities.map((act) => { - const type = activityTypes[act.type]; - const parts = [`${type} ${act.name}`]; - if (act.details && act.details !== act.name) parts.push(act.details); - if (act.state && act.state !== act.name) parts.push(act.state); - return parts; - }))], + activities: [ + ...new Set( + lanyard.activities.map((act) => { + const type = activityTypes[act.type]; + const parts = [`${type} ${act.name}`]; + if (act.details && act.details !== act.name) + parts.push(act.details); + if (act.state && act.state !== act.name) parts.push(act.state); + return parts; + }), + ), + ], }, null, 2, diff --git a/src/front/index.css b/src/front/index.css index 846d489..54dd0fb 100644 --- a/src/front/index.css +++ b/src/front/index.css @@ -14,9 +14,11 @@ body { body { color: #dedede; text-shadow: 0 0 5px #c8c8c8; - background: radial-gradient(at bottom right, - var(--gradient-color, rgba(150, 150, 150, 0.1)) 0%, - rgba(0, 0, 0, 1) 100%); + background: radial-gradient( + at bottom right, + var(--gradient-color, rgba(150, 150, 150, 0.1)) 0%, + rgba(0, 0, 0, 1) 100% + ); display: flex; height: 100vh; width: 100vw; @@ -39,4 +41,4 @@ p { flex-direction: column; box-sizing: border-box; gap: 0.4em; -} \ No newline at end of file +} diff --git a/src/index.ts b/src/index.ts index 158beb8..68e5f9e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,7 @@ let lanyard: LanyardData = { activities: [], }; -await fs.rm("./dist", { recursive: true, force: true }).catch(() => { }); +await fs.rm("./dist", { recursive: true, force: true }).catch(() => {}); if (!Backend.development) { await Backend.build(); @@ -30,7 +30,8 @@ const server = serve({ "/assets/:file": async (req) => Backend.Responses.file(file(`./dist/${req.params.file}`)), - "/robots.txt": async () => Backend.Responses.file(file("./public/robots.txt")), + "/robots.txt": async () => + Backend.Responses.file(file("./public/robots.txt")), "/favicon.svg": async () => Backend.Responses.file(file("./public/favicon.svg")),