From 3e1f94bf78e151e220e08675e417475886b13765 Mon Sep 17 00:00:00 2001 From: dvelo <52332868+DeveloLongScript@users.noreply.github.com> Date: Wed, 21 May 2025 20:45:21 -0500 Subject: [PATCH] feat: v2 beta --- .vscode/settings.json | 5 +- apps/www/next.config.mjs | 4 + apps/www/package.json | 2 +- apps/www/src/app/(main)/layout.tsx | 61 ++--- .../app/(sl-modification-frame)/layout.tsx | 2 +- .../[category]/modification/[mod]/page.tsx | 64 ++--- .../modification/custom/[custom-mod]/page.tsx | 10 +- .../embedded/sl-modification-frame/page.tsx | 2 - apps/www/src/app/globals.css | 6 +- apps/www/src/app/layout.tsx | 3 +- apps/www/src/components/feat/embeds/embed.tsx | 2 +- .../www/src/components/feat/footer/footer.tsx | 4 +- .../feat/server-list/server-list.tsx | 9 +- .../discord/server-discord-row.tsx | 25 ++ .../feat/server-page/motd/motd-row.tsx | 2 +- .../customizations/server-discord-box.tsx | 115 ++++++++ .../customizations/server-unown-box.tsx | 126 +++++++++ .../server-editor/server-editor-provider.tsx | 55 ++-- .../feat/server-page/server-provider.tsx | 4 +- .../feat/server-page/server-rows.tsx | 4 +- .../feat/settings/account-settings.tsx | 235 +++++++++++++++++ .../feat/settings/browser-settings.tsx | 222 +++++++++------- .../feat/settings/linking-dialog.tsx | 248 ++++++++++++++++++ .../src/components/feat/settings/settings.tsx | 2 + .../feat/waitlist/waitlist-page.tsx | 6 +- apps/www/src/components/ui/dialog.tsx | 2 +- apps/www/src/components/ui/input-otp.tsx | 77 ++++++ .../www/src/components/util/font-boundary.tsx | 2 + apps/www/src/lib/api.ts | 6 +- apps/www/src/lib/check-owned-server.ts | 2 +- apps/www/src/lib/hooks/use-filters.tsx | 8 +- .../hooks/use-minecraft-head.tsx} | 41 +-- .../favorites.ts => lib/hooks/use-user.tsx} | 67 +++-- .../pages/api/v1/server/get/[server]/index.ts | 132 +++++++--- .../api/v1/server/get/[server]/own-server.ts | 2 +- .../get/[server]/settings/change-discord.ts} | 61 +++-- .../get/[server]/settings/unlink-server.ts} | 35 ++- .../user}/claim-account-code.ts | 11 +- apps/www/src/pages/api/v1/user/get.ts | 88 +++++++ yarn.lock | 4 +- 40 files changed, 1402 insertions(+), 354 deletions(-) create mode 100644 apps/www/src/components/feat/server-page/discord/server-discord-row.tsx create mode 100644 apps/www/src/components/feat/server-page/server-editor/customizations/server-discord-box.tsx create mode 100644 apps/www/src/components/feat/server-page/server-editor/customizations/server-unown-box.tsx create mode 100644 apps/www/src/components/feat/settings/account-settings.tsx create mode 100644 apps/www/src/components/feat/settings/linking-dialog.tsx create mode 100644 apps/www/src/components/ui/input-otp.tsx rename apps/www/src/{pages/api/v0/sorting/favorites.ts => lib/hooks/use-minecraft-head.tsx} (64%) rename apps/www/src/{pages/api/v1/user/favorites.ts => lib/hooks/use-user.tsx} (58%) rename apps/www/src/pages/api/{v0/account-sl/change.ts => v1/server/get/[server]/settings/change-discord.ts} (59%) rename apps/www/src/pages/api/v1/{user/claimed-user.ts => server/get/[server]/settings/unlink-server.ts} (66%) rename apps/www/src/pages/api/{v0/account-linking => v1/user}/claim-account-code.ts (89%) create mode 100644 apps/www/src/pages/api/v1/user/get.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index e68acd7..83317c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,6 @@ { - "copyright-header-injector.copyrightText": "/*\n * MHSF, Minehut Server List\n * All external content is rather licensed under the ECA Agreement\n * located here: https://mhsf.app/docs/legal/external-content-agreement\n *\n * All code under MHSF is licensed under the MIT License\n * by open source contributors\n *\n * Copyright (c) 2025 dvelo\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */" + "copyright-header-injector.copyrightText": "/*\n * MHSF, Minehut Server List\n * All external content is rather licensed under the ECA Agreement\n * located here: https://mhsf.app/docs/legal/external-content-agreement\n *\n * All code under MHSF is licensed under the MIT License\n * by open source contributors\n *\n * Copyright (c) 2025 dvelo\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */", + "cSpell.words": [ + "MHSF" + ] } \ No newline at end of file diff --git a/apps/www/next.config.mjs b/apps/www/next.config.mjs index 7d9a7cc..b62a329 100644 --- a/apps/www/next.config.mjs +++ b/apps/www/next.config.mjs @@ -51,6 +51,10 @@ const nextConfig = { hostname: "exh89c9lva.ufs.sh", pathname: "/f/*", }, + { + protocol: "https", + hostname: "api.mineatar.io" + } ], }, async redirects() { diff --git a/apps/www/package.json b/apps/www/package.json index a02c5a4..93d0f4a 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -68,7 +68,7 @@ "framer-motion": "^12.7.4", "github-slugger": "^2.0.0", "inngest": "^3.21.2", - "input-otp": "^1.2.4", + "input-otp": "^1.4.2", "json-beautify": "^1.1.1", "lodash": "^4.17.21", "lucide-react": "^0.487.0", diff --git a/apps/www/src/app/(main)/layout.tsx b/apps/www/src/app/(main)/layout.tsx index 8975969..5a8357a 100644 --- a/apps/www/src/app/(main)/layout.tsx +++ b/apps/www/src/app/(main)/layout.tsx @@ -40,36 +40,37 @@ import { Footer } from "@/components/feat/footer/footer"; import { NuqsAdapter } from "nuqs/adapters/next/app"; export default function RootLayout({ - children, + children, }: { - children: React.ReactNode; + children: React.ReactNode; }) { - - return ( - <> - - - - - - - - - -
{children}
-