From bba5504f5d9debecda51f6154f0be6cc7c6e4790 Mon Sep 17 00:00:00 2001 From: dvelo <52332868+DeveloLongScript@users.noreply.github.com> Date: Sat, 15 Mar 2025 16:58:24 -0500 Subject: [PATCH] feat: figure it out urself --- .../src/components/ui/github.tsx | 2 +- .../src/components/ui/github.tsx | 2 +- apps/www/package.json | 8 +- apps/www/src/app/globals.css | 4 + apps/www/src/app/layout.tsx | 1 - .../www/src/components/feat/footer/footer.tsx | 2 +- .../components/feat/home-page/home-page.tsx | 2 +- .../components/feat/icons/branding-icons.tsx | 2 +- .../components/feat/navbar/menu-dropdown.tsx | 38 +- .../www/src/components/feat/navbar/navbar.tsx | 4 +- .../feat/server-list/server-list.tsx | 5 + .../feat/server-list/statistics.tsx | 2 +- .../feat/server-page/debug/debug-menu.tsx | 187 ++++++++++ .../feat/server-page/debug/debug-provider.tsx | 45 +++ .../server-page/debug/debug-shiki-parsed.tsx | 29 ++ .../feat/server-page/motd/motd-row.tsx | 5 +- .../reporting/reporting-dialog.tsx | 61 +++ .../reporting/reporting-provider.tsx} | 53 ++- .../feat/server-page/server-page-buttons.tsx | 54 ++- .../feat/server-page/server-page.tsx | 42 ++- .../feat/server-page/server-provider.tsx | 63 +++- .../feat/server-page/server-rows.tsx | 5 +- .../feat/server-page/stats/stats-main-row.tsx | 170 ++++++++- .../src/components/feat/server-page/util.ts | 124 ++++++ .../feat/settings/browser-settings.tsx | 18 + .../feat/settings/debug-settings.tsx} | 72 ++-- .../src/components/feat/settings/settings.tsx | 25 ++ apps/www/src/components/ui/alert.tsx | 40 +- apps/www/src/components/ui/animated-text.tsx | 34 ++ apps/www/src/components/ui/chart.tsx | 353 ++++++++++++++++++ apps/www/src/components/ui/dialog.tsx | 6 +- apps/www/src/components/ui/drawer.tsx | 132 +++++++ apps/www/src/components/ui/github.tsx | 2 +- apps/www/src/components/ui/tabs.tsx | 2 +- apps/www/src/components/ui/tooltip.tsx | 2 +- .../src/components/util/clerk-provider.tsx | 2 +- apps/www/src/components/util/mode-toggle.tsx | 2 +- .../src/components/util/theme-provider.tsx | 19 +- apps/www/src/config/tags.tsx | 12 +- apps/www/src/lib/api.ts | 2 +- apps/www/src/lib/getDependentTheming.ts | 6 +- apps/www/src/lib/history-util.tsx | 29 ++ apps/www/src/lib/hooks/use-favorite-store.tsx | 46 ++- apps/www/src/lib/hooks/use-mhsf-multiple.tsx | 141 +++++++ apps/www/src/lib/hooks/use-mhsf-server.tsx | 121 ++++++ apps/www/src/lib/hooks/use-server.tsx | 4 +- apps/www/src/lib/hooks/use-theme.tsx | 10 + .../api/v0/account-linking/own-server.ts | 127 ------- .../v0/favorites/[server]/favorite-server.ts | 105 ------ .../api/v0/history/[server]/get-daily-data.ts | 77 ---- .../v0/history/[server]/get-monthly-data.ts | 90 ----- apps/www/src/pages/api/v1/server/bulk.ts | 32 +- .../server/get/[server]/customize.ts} | 0 .../v1/server/get/[server]/favorite-server.ts | 121 ++++++ .../server/get/[server]/history/daily-data.ts | 103 +++++ .../get/[server]/history/historical-data.ts | 93 +++++ .../get/[server]/history/monthly-data.ts | 119 ++++++ .../get/[server]/history/relative-data.ts | 122 ++++++ .../get/{[server].ts => [server]/index.ts} | 30 +- .../api/v1/server/get/[server]/own-server.ts | 127 +++++++ .../get/[server]}/report-server.ts | 80 ++-- .../server/minehut/daily-avg.ts} | 0 .../server/minehut/short-term-data.ts} | 0 .../user/favorites.ts} | 38 +- .../user}/unlink-account.ts | 0 yarn.lock | 41 +- 66 files changed, 2634 insertions(+), 661 deletions(-) create mode 100644 apps/www/src/components/feat/server-page/debug/debug-menu.tsx create mode 100644 apps/www/src/components/feat/server-page/debug/debug-provider.tsx create mode 100644 apps/www/src/components/feat/server-page/debug/debug-shiki-parsed.tsx create mode 100644 apps/www/src/components/feat/server-page/reporting/reporting-dialog.tsx rename apps/www/src/{pages/api/v0/history/[server]/get-historical-data.ts => components/feat/server-page/reporting/reporting-provider.tsx} (58%) create mode 100644 apps/www/src/components/feat/server-page/util.ts rename apps/www/src/{pages/api/v0/history/[server]/get-relative-data.ts => components/feat/settings/debug-settings.tsx} (51%) create mode 100644 apps/www/src/components/ui/animated-text.tsx create mode 100644 apps/www/src/components/ui/chart.tsx create mode 100644 apps/www/src/components/ui/drawer.tsx create mode 100644 apps/www/src/lib/history-util.tsx create mode 100644 apps/www/src/lib/hooks/use-mhsf-multiple.tsx create mode 100644 apps/www/src/lib/hooks/use-mhsf-server.tsx create mode 100644 apps/www/src/lib/hooks/use-theme.tsx delete mode 100644 apps/www/src/pages/api/v0/account-linking/own-server.ts delete mode 100644 apps/www/src/pages/api/v0/favorites/[server]/favorite-server.ts delete mode 100644 apps/www/src/pages/api/v0/history/[server]/get-daily-data.ts delete mode 100644 apps/www/src/pages/api/v0/history/[server]/get-monthly-data.ts rename apps/www/src/pages/api/{v0/customization/[server]/set.ts => v1/server/get/[server]/customize.ts} (100%) create mode 100644 apps/www/src/pages/api/v1/server/get/[server]/favorite-server.ts create mode 100644 apps/www/src/pages/api/v1/server/get/[server]/history/daily-data.ts create mode 100644 apps/www/src/pages/api/v1/server/get/[server]/history/historical-data.ts create mode 100644 apps/www/src/pages/api/v1/server/get/[server]/history/monthly-data.ts create mode 100644 apps/www/src/pages/api/v1/server/get/[server]/history/relative-data.ts rename apps/www/src/pages/api/v1/server/get/{[server].ts => [server]/index.ts} (90%) create mode 100644 apps/www/src/pages/api/v1/server/get/[server]/own-server.ts rename apps/www/src/pages/api/v1/{ => server/get/[server]}/report-server.ts (58%) rename apps/www/src/pages/api/{v0/history/meta-daily-avg.ts => v1/server/minehut/daily-avg.ts} (100%) rename apps/www/src/pages/api/{v0/history/meta-short-term-data.ts => v1/server/minehut/short-term-data.ts} (100%) rename apps/www/src/pages/api/{v0/favorites/account-favorites.ts => v1/user/favorites.ts} (70%) rename apps/www/src/pages/api/{v0/account-linking => v1/user}/unlink-account.ts (100%) diff --git a/apps/stage1-clk-transfer/src/components/ui/github.tsx b/apps/stage1-clk-transfer/src/components/ui/github.tsx index 2bcb720..619bcc7 100644 --- a/apps/stage1-clk-transfer/src/components/ui/github.tsx +++ b/apps/stage1-clk-transfer/src/components/ui/github.tsx @@ -28,7 +28,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -import { useTheme } from "next-themes"; +import { useTheme } from "@/lib/hooks/use-theme"; import type { SVGProps } from "react"; const Github = (props: SVGProps) => { const { resolvedTheme } = useTheme(); diff --git a/apps/stage2-clk-transfer/src/components/ui/github.tsx b/apps/stage2-clk-transfer/src/components/ui/github.tsx index 2bcb720..619bcc7 100644 --- a/apps/stage2-clk-transfer/src/components/ui/github.tsx +++ b/apps/stage2-clk-transfer/src/components/ui/github.tsx @@ -28,7 +28,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -import { useTheme } from "next-themes"; +import { useTheme } from "@/lib/hooks/use-theme"; import type { SVGProps } from "react"; const Github = (props: SVGProps) => { const { resolvedTheme } = useTheme(); diff --git a/apps/www/package.json b/apps/www/package.json index d67ed77..e8026bb 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -21,10 +21,12 @@ "@emotion/is-prop-valid": "^1.3.0", "@linear/sdk": "^31.0.0", "@monaco-editor/react": "^4.6.0", + "@number-flow/react": "^0.5.7", "@radix-ui/react-aspect-ratio": "1.1.1", "@radix-ui/react-avatar": "1.1.1", "@radix-ui/react-collapsible": "1.1.1", "@radix-ui/react-context-menu": "^2.2.6", + "@radix-ui/react-dialog": "^1.1.6", "@radix-ui/react-hover-card": "1.1.1", "@radix-ui/react-icons": "^1.3.2", "@radix-ui/react-menubar": "1.1.1", @@ -49,7 +51,7 @@ "inngest": "^3.21.2", "input-otp": "^1.2.4", "json-beautify": "^1.1.1", - "lucide-react": "^0.454.0", + "lucide-react": "^0.479.0", "mini-svg-data-uri": "^1.4.4", "minimessage-2-html": "1.6.0", "minimessage-js": "^1.1.3", @@ -71,6 +73,7 @@ "react-hot-toast": "^2.4.1", "react-qr-code": "^2.0.15", "react-snowfall": "^2.2.0", + "recharts": "^2.15.1", "rehype-slug": "^6.0.0", "remark-gfm": "^4.0.0", "sonner": "^1.7.0", @@ -81,7 +84,8 @@ "tailwindcss-animate": "^1.0.7", "tailwindcss-patch": "^4.0.0", "turbo": "^2.4.0", - "unplugin-tailwindcss-mangle": "^3.0.1" + "unplugin-tailwindcss-mangle": "^3.0.1", + "vaul": "^1.1.2" }, "devDependencies": { "@clerk/themes": "^2.1.19", diff --git a/apps/www/src/app/globals.css b/apps/www/src/app/globals.css index af017c9..0c05d96 100644 --- a/apps/www/src/app/globals.css +++ b/apps/www/src/app/globals.css @@ -249,6 +249,10 @@ } } +.shiki { + @apply p-4 rounded max-w-[530px] overflow-x-auto; +} + .system-ui-font--font-boundary { font-family: system-ui, diff --git a/apps/www/src/app/layout.tsx b/apps/www/src/app/layout.tsx index a84131c..ee4bc5f 100644 --- a/apps/www/src/app/layout.tsx +++ b/apps/www/src/app/layout.tsx @@ -47,7 +47,6 @@ export default function RootLayout({ -