105 Commits

Author SHA1 Message Date
35de49142d Update dependency lucide-react to ^0.454.0 2024-10-28 14:01:51 +00:00
Lee
96ab998031 Merge pull request 'Update dependency react-use-websocket to v4.9.0' (#68) from renovate/react-use-websocket-4.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 2m52s
Reviewed-on: #68
2024-10-10 02:17:12 +00:00
Lee
7de2848f45 Merge pull request 'Update dependency lucide-react to ^0.451.0' (#70) from renovate/lucide-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #70
2024-10-10 02:17:07 +00:00
Lee
63fead44c3 Merge pull request 'Update nextjs monorepo to v14.2.15' (#72) from renovate/nextjs-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #72
2024-10-10 02:16:48 +00:00
f8aa41ed05 Update nextjs monorepo to v14.2.15 2024-10-10 02:01:40 +00:00
50e6506fc4 Update dependency lucide-react to ^0.451.0 2024-10-08 10:01:35 +00:00
2a6488d4e5 Update dependency react-use-websocket to v4.9.0 2024-10-01 20:03:34 +00:00
Lee
7be126fe00 Merge pull request 'Update dependency lucide-react to ^0.446.0' (#64) from renovate/lucide-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m44s
Reviewed-on: #64
2024-09-25 23:49:23 +00:00
0ef741381c Update dependency lucide-react to ^0.446.0 2024-09-25 06:01:24 +00:00
Lee
51ac278329 Merge pull request 'Update dependency postcss to v8.4.41' (#61) from renovate/postcss-8.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 44s
Reviewed-on: #61
2024-08-07 07:46:28 +00:00
Lee
9996df2f92 Merge pull request 'Update dependency @sentry/nextjs to v8.24.0' (#60) from renovate/sentry-javascript-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #60
2024-08-07 07:46:19 +00:00
c1c74ffef7 Update dependency postcss to v8.4.41 2024-08-06 00:03:26 +00:00
cf0e595cfc Update dependency @sentry/nextjs to v8.23.0 2024-08-05 15:01:21 +00:00
Lee
2efcb4a780 Merge pull request 'Update dependency lucide-react to ^0.424.0' (#58) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m12s
Reviewed-on: #58
2024-08-02 17:51:33 +00:00
Lee
50037d9090 Merge pull request 'Update dependency @types/node to v20.14.14' (#59) from renovate/node-20.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #59
2024-08-02 17:51:22 +00:00
8a1263a1dd Update dependency lucide-react to ^0.424.0 2024-08-02 11:01:18 +00:00
137de19133 Update dependency @types/node to v20.14.14 2024-08-02 09:01:18 +00:00
Lee
c9c79c1f29 Merge pull request 'Update dependency lucide-react to ^0.419.0' (#57) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 45s
Reviewed-on: #57
2024-08-01 17:28:56 +00:00
65d0cc7807 Update dependency lucide-react to ^0.419.0 2024-08-01 14:01:26 +00:00
Lee
d44ace3f20 Merge pull request 'Update dependency @sentry/nextjs to v8.22.0' (#56) from renovate/sentry-javascript-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 48s
Reviewed-on: #56
2024-08-01 13:17:37 +00:00
5b251e07ad Update dependency @sentry/nextjs to v8.22.0 2024-08-01 09:01:21 +00:00
Lee
636b0dde29 Merge pull request 'Update dependency lucide-react to ^0.418.0' (#55) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m51s
Reviewed-on: #55
2024-08-01 01:26:18 +00:00
634cf8877a Update dependency lucide-react to ^0.418.0 2024-07-31 17:00:57 +00:00
Lee
6ee34eaf44 Merge pull request 'Update dependency @sentry/nextjs to v8.21.0' (#54) from renovate/sentry-javascript-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m8s
Reviewed-on: #54
2024-07-31 15:59:16 +00:00
d51215a781 Update dependency @sentry/nextjs to v8.21.0 2024-07-31 11:01:06 +00:00
Lee
22dba0bc90 Merge pull request 'Update radix-ui-primitives monorepo' (#53) from renovate/radix-ui-primitives-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 2m46s
Reviewed-on: #53
2024-07-31 00:36:04 +00:00
78ff92eed3 Update radix-ui-primitives monorepo 2024-07-30 23:01:11 +00:00
Lee
7e73cc3e8c Merge pull request 'Update dependency typescript to v5.5.4' (#52) from renovate/typescript-5.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 6s
Reviewed-on: #52
2024-07-30 22:15:34 +00:00
Lee
49cae6930b Merge pull request 'Update dependency mcutils-library to v1.3.4' (#51) from renovate/mcutils-library-1.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #51
2024-07-30 22:15:21 +00:00
33ab92f579 Update dependency typescript to v5.5.4 2024-07-30 22:01:09 +00:00
db6af18475 Update dependency mcutils-library to v1.3.4 2024-07-30 22:01:00 +00:00
Lee
a2cd3d0cf5 Merge pull request 'Update dependency tailwind-merge to v2.4.0' (#50) from renovate/tailwind-merge-2.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #50
2024-07-30 21:05:08 +00:00
Lee
916ee81302 Merge pull request 'Update dependency lucide-react to ^0.417.0' (#49) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #49
2024-07-30 21:05:03 +00:00
Lee
28aa81036f Merge pull request 'Update dependency postcss to v8.4.40' (#43) from renovate/postcss-8.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #43
2024-07-30 21:04:58 +00:00
Lee
5fde0f46c5 Merge pull request 'Update dependency @eslint/eslintrc to v3.1.0' (#40) from renovate/eslint-eslintrc-3.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #40
2024-07-30 21:04:53 +00:00
Lee
5a4056f113 Merge pull request 'Update dependency @types/node to v20.14.13' (#32) from renovate/node-20.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #32
2024-07-30 21:04:47 +00:00
08e270da6f Update dependency tailwind-merge to v2.4.0 2024-07-30 21:02:27 +00:00
b2fbcb6ebf Update dependency lucide-react to ^0.417.0 2024-07-30 21:02:18 +00:00
7b602d64f8 Update dependency @types/node to v20.14.13 2024-07-30 21:02:13 +00:00
4026b08b42 Update dependency @eslint/eslintrc to v3.1.0 2024-07-30 21:02:07 +00:00
d5b48e8bc9 Update dependency postcss to v8.4.40 2024-07-30 21:01:53 +00:00
d3886e4a39 fix
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m26s
2024-07-30 21:32:54 +01:00
94b81e0d69 Merge branch 'master' of https://git.fascinated.cc/MinecraftUtilities/Frontend
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 10s
2024-07-30 21:29:51 +01:00
35e786d9a5 sentry 2024-07-30 21:29:32 +01:00
Lee
9278a23f5a Merge pull request 'Update dependency @types/react-syntax-highlighter to v15.5.13' (#35) from renovate/react-syntax-highlighter-15.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 2m3s
Reviewed-on: #35
2024-07-30 20:23:07 +00:00
Lee
2954dd4955 Merge pull request 'Update dependency @types/react to v18.3.3' (#36) from renovate/react-monorepo into master
Some checks are pending
Deploy App / docker (ubuntu-latest) (push) Waiting to run
Reviewed-on: #36
2024-07-30 20:22:58 +00:00
Lee
0ce04fbc37 Merge pull request 'Update dependency @heroicons/react to v2.1.5' (#42) from renovate/heroicons-react-2.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #42
2024-07-30 20:22:45 +00:00
Lee
9930b8387f Merge pull request 'Update dependency unified to v11.0.5' (#44) from renovate/unified-11.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #44
2024-07-30 20:22:36 +00:00
Lee
9be11a628b Merge pull request 'Update dependency tailwindcss to v3.4.7' (#48) from renovate/tailwindcss-3.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #48
2024-07-30 20:22:25 +00:00
Lee
0afcd08f91 Merge pull request 'Update dependency mcutils-library to v1.3.3' (#47) from renovate/mcutils-library-1.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #47
2024-07-30 20:21:42 +00:00
d1b3b7e1fe Update dependency tailwindcss to v3.4.7 2024-07-30 20:21:19 +00:00
0ae2c2956a Update dependency mcutils-library to v1.3.3 2024-07-30 20:21:10 +00:00
35ad8b458b Update dependency @types/react-syntax-highlighter to v15.5.13 2024-07-30 20:21:04 +00:00
c7365df0bd Update dependency @types/react to v18.3.3 2024-07-30 20:20:58 +00:00
307551dc05 Update dependency @heroicons/react to v2.1.5 2024-07-30 20:20:49 +00:00
Lee
fc90fdd59b Merge pull request 'Update nextjs monorepo to v14.2.5' (#45) from renovate/nextjs-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m17s
Reviewed-on: #45
2024-07-30 20:17:53 +00:00
829a0afea0 Update nextjs monorepo to v14.2.5 2024-07-30 20:17:40 +00:00
Lee
266ac15bb1 Merge pull request 'Update dependency react-spinners to ^0.14.0' (#46) from renovate/react-spinners-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 57s
Reviewed-on: #46
2024-07-30 20:10:14 +00:00
Lee
78987e0c55 Merge pull request 'Update dependency @hookform/resolvers to v3.9.0' (#39) from renovate/hookform-resolvers-3.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m13s
Reviewed-on: #39
2024-07-30 20:06:01 +00:00
65a154a5dc Update dependency @hookform/resolvers to v3.9.0 2024-07-09 14:01:42 +00:00
Lee
179b5eb9d2 revert 2a17ac2d3d6389170a60ce4782bb733f32413874
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m32s
revert Merge pull request 'Update dependency @sentry/nextjs to v8' (#38) from renovate/major-sentry-javascript-monorepo into master

Reviewed-on: #38
2024-07-09 13:02:48 +00:00
24f34ecd03 Update dependency react-spinners to ^0.14.0 2024-07-08 11:01:05 +00:00
8e655681a7 Update dependency unified to v11.0.5 2024-07-08 10:01:09 +00:00
Lee
91867bb718 Delete sentry.edge.config.ts
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 23s
2024-07-08 09:37:33 +00:00
Lee
2a17ac2d3d Merge pull request 'Update dependency @sentry/nextjs to v8' (#38) from renovate/major-sentry-javascript-monorepo into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 1m10s
Reviewed-on: #38
2024-07-08 09:32:03 +00:00
840711604b Update dependency @sentry/nextjs to v8 2024-07-08 09:31:22 +00:00
Lee
260dadda6d Merge pull request 'Update dependency remote-mdx to ^0.0.8' (#37) from renovate/remote-mdx-0.x into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m58s
Reviewed-on: #37
2024-07-08 09:26:35 +00:00
Lee
5370fd7cad Merge pull request 'Update dependency lucide-react to ^0.402.0' (#33) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 6s
Reviewed-on: #33
2024-07-08 09:25:32 +00:00
Lee
725e0cd25d Merge pull request 'Update dependency tailwindcss to v3.4.4' (#41) from renovate/tailwindcss-3.x-lockfile into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #41
2024-07-08 09:23:24 +00:00
649141ece3 Update dependency lucide-react to ^0.402.0 2024-07-08 08:00:57 +00:00
390f1ffd64 Update dependency tailwindcss to v3.4.4 2024-06-05 18:01:39 +00:00
eb32d3786d Update dependency remote-mdx to ^0.0.8 2024-05-11 14:01:34 +00:00
Lee
bc27ed78b1 Merge pull request 'Update react monorepo to v18.3.1' (#31) from renovate/react-monorepo into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m11s
Reviewed-on: #31
2024-04-28 04:28:31 +00:00
11e2efef2e Update react monorepo to v18.3.1 2024-04-27 10:00:58 +00:00
Lee
68e0599159 Merge pull request 'Update dependency lucide-react to ^0.376.0' (#30) from renovate/lucide-react-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 4s
Reviewed-on: #30
2024-04-27 09:50:30 +00:00
Lee
bc04ac8e82 Merge pull request 'Update dependency remote-mdx to ^0.0.7' (#29) from renovate/remote-mdx-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #29
2024-04-27 09:49:27 +00:00
fe0a0d19f9 Update dependency lucide-react to ^0.376.0 2024-04-27 03:01:02 +00:00
cfdc69a078 Update dependency remote-mdx to ^0.0.7 2024-04-27 03:00:56 +00:00
Lee
9abf21e890 Merge pull request 'Update react monorepo to v18.3.1' (#28) from renovate/react-monorepo into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m2s
Reviewed-on: #28
2024-04-27 02:09:39 +00:00
2d3db00551 Update react monorepo to v18.3.0 2024-04-25 17:01:01 +00:00
Lee
73441e0898 Merge pull request 'Update nextjs monorepo to v14.2.3' (#27) from renovate/nextjs-monorepo into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m48s
Reviewed-on: #27
2024-04-24 20:28:55 +00:00
7bee4c1611 Update nextjs monorepo to v14.2.3 2024-04-24 20:02:16 +00:00
Lee
5fd3d2f822 Merge pull request 'Update dependency remark-mdx to v3.0.1' (#25) from renovate/mdx-monorepo into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m12s
Reviewed-on: #25
2024-04-24 16:29:12 +00:00
Lee
3156916b4f Merge pull request 'Update dependency @sentry/nextjs to v7.112.2' (#26) from renovate/sentry-javascript-monorepo into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m9s
Reviewed-on: #26
2024-04-24 16:24:43 +00:00
Lee
a29f0c41ac Merge pull request 'Update dependency lucide-react to ^0.373.0' (#24) from renovate/lucide-react-0.x into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m7s
Reviewed-on: #24
2024-04-24 16:20:42 +00:00
dbcba6682b Update dependency @sentry/nextjs to v7.112.2 2024-04-24 13:01:04 +00:00
cf1f2bce26 Update dependency remark-mdx to v3.0.1 2024-04-24 09:01:50 +00:00
795f02e0e0 Update dependency lucide-react to ^0.373.0 2024-04-24 08:01:01 +00:00
239d2f2078 Merge remote-tracking branch 'origin/master'
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m52s
2024-04-23 17:52:42 +01:00
30e55d43c7 use my paste server 2024-04-23 17:52:37 +01:00
Lee
62919e1b93 Merge pull request 'Update dependency @sentry/nextjs to v7.112.1' (#23) from renovate/sentry-javascript-monorepo into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m41s
Reviewed-on: #23
2024-04-23 14:56:22 +00:00
Lee
0ccc90851a Merge pull request 'Update dependency remote-mdx to ^0.0.5' (#22) from renovate/remote-mdx-0.x into master
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Has been cancelled
Reviewed-on: #22
2024-04-23 14:56:07 +00:00
Lee
fb70dd6ab7 Merge pull request 'Update dependency clsx to v2.1.1' (#21) from renovate/clsx-2.x-lockfile into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m19s
Reviewed-on: #21
2024-04-23 14:51:07 +00:00
4198176b69 Update dependency @sentry/nextjs to v7.112.0 2024-04-23 10:00:59 +00:00
8001ad7a11 Update dependency remote-mdx to ^0.0.5 2024-04-23 06:01:05 +00:00
89805d0442 Update dependency clsx to v2.1.1 2024-04-23 06:00:57 +00:00
Lee
58f4a6edf8 Merge pull request 'Update dependency mcutils-library to v1.3.2' (#20) from renovate/mcutils-library-1.x-lockfile into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 4m39s
Reviewed-on: #20
2024-04-23 02:39:29 +00:00
a0b8777a94 fix the code in the code dialog falling off the dialog
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m32s
2024-04-22 22:56:34 +01:00
1e96ed1b1c add json upload button and add page reload button to server and player pages
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m29s
2024-04-22 22:50:13 +01:00
63e4eedc37 deadmau5
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m59s
2024-04-22 21:14:07 +01:00
c2790054db start work on cleaning up types and add try a player and server to their pages
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m29s
2024-04-22 21:08:44 +01:00
1ab27f69be Update dependency mcutils-library to v1.3.2 2024-04-22 20:01:02 +00:00
52fea3da68 use the server preview from the api in the server route for embeds
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m25s
2024-04-22 20:15:56 +01:00
Lee
4ffd10e9c3 Merge pull request 'Update dependency mcutils-library to v1.3.1' (#19) from renovate/mcutils-library-1.x-lockfile into master
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m2s
Reviewed-on: #19
2024-04-22 19:11:51 +00:00
c2d7f5f33c Update dependency mcutils-library to v1.3.1 2024-04-21 23:01:03 +00:00
29 changed files with 7514 additions and 4963 deletions

3
.gitignore vendored
View File

@ -50,3 +50,6 @@ next-env.d.ts
# Sitemap & Robots # Sitemap & Robots
/public/sitemap* /public/sitemap*
/public/robots.txt /public/robots.txt
# Sentry Config File
.env.sentry-build-plugin

View File

@ -1,7 +1,7 @@
import { withSentryConfig } from "@sentry/nextjs"; import {withSentryConfig} from "@sentry/nextjs";
import nextBuildId from "next-build-id"; import nextBuildId from "next-build-id";
import { fileURLToPath } from "url";
import path from "path"; import path from "path";
import { fileURLToPath } from "url";
/** /**
* The current git commit hash. * The current git commit hash.
@ -37,29 +37,38 @@ const nextConfig = {
}, },
}; };
export default withSentryConfig( export default withSentryConfig(nextConfig, {
nextConfig, // For all available options, see:
{ // https://github.com/getsentry/sentry-webpack-plugin#options
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
silent: true,
org: "minecraft-utilities",
project: "frontend",
url: "https://glitchtip.fascinated.cc/",
authToken: process.env.SENTRY_AUTH_TOKEN || "",
release: `frontend@${buildId}`,
},
{
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
// Upload a larger set of source maps for prettier stack traces (increases build time) org: "minecraft-utilities",
widenClientFileUpload: true, project: "frontend",
sentryUrl: "https://glitchtip.fascinated.cc/",
// Hides source maps from generated client bundles // Only print logs for uploading source maps in CI
hideSourceMaps: true, silent: !process.env.CI,
// Automatically tree-shake Sentry logger statements to reduce bundle size // For all available options, see:
disableLogger: true, // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
},
); // Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",
// Hides source maps from generated client bundles
hideSourceMaps: true,
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});

View File

@ -25,36 +25,36 @@
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.0.7", "@radix-ui/react-tooltip": "^1.0.7",
"@sentry/nextjs": "^7.105.0", "@sentry/nextjs": "^8.20.0",
"@types/mdx": "^2.0.13", "@types/mdx": "^2.0.13",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clipboard-copy": "^4.0.1", "clipboard-copy": "^4.0.1",
"clsx": "^2.1.0", "clsx": "^2.1.0",
"cmdk": "^1.0.0", "cmdk": "^1.0.0",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
"lucide-react": "^0.372.0", "lucide-react": "^0.454.0",
"mcutils-library": "^1.2.6", "mcutils-library": "^1.3.1",
"moment": "^2.30.1", "moment": "^2.30.1",
"next": "14.2.2", "next": "14.2.5",
"next-build-id": "^3.0.0", "next-build-id": "^3.0.0",
"next-sitemap": "^4.2.3", "next-sitemap": "^4.2.3",
"next-themes": "^0.3.0", "next-themes": "^0.3.0",
"react": "^18", "react": "^18",
"react-countup": "^6.5.3", "react-countup": "^6.5.3",
"react-dom": "^18", "react-dom": "^18",
"react-spinners": "^0.13.8", "react-spinners": "^0.14.0",
"react-syntax-highlighter": "^15.5.0", "react-syntax-highlighter": "^15.5.0",
"react-use-websocket": "4.8.1", "react-use-websocket": "4.9.0",
"read-file": "^0.2.0", "read-file": "^0.2.0",
"remark-gfm": "^4.0.0", "remark-gfm": "^4.0.0",
"remote-mdx": "^0.0.4", "remote-mdx": "^0.0.8",
"tailwind-merge": "^2.2.2", "tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7" "tailwindcss-animate": "^1.0.7"
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"remark-mdx": "3.0.0", "remark-mdx": "3.0.1",
"unified": "11.0.4", "unified": "11.0.5",
"remark-parse": "11.0.0", "remark-parse": "11.0.0",
"mdast-util-frontmatter": "2.0.1" "mdast-util-frontmatter": "2.0.1"
} }
@ -64,7 +64,7 @@
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"@types/react-syntax-highlighter": "^15.5.11", "@types/react-syntax-highlighter": "^15.5.11",
"eslint-config-next": "14.2.2", "eslint-config-next": "14.2.5",
"postcss": "^8", "postcss": "^8",
"tailwindcss": "^3.4.1", "tailwindcss": "^3.4.1",
"typescript": "^5" "typescript": "^5"

12005
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -12,4 +12,19 @@ Sentry.init({
// Setting this option to true will print useful information to the console while you're setting up Sentry. // Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false, debug: false,
replaysOnErrorSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
Sentry.replayIntegration({
// Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),
],
}); });

View File

@ -13,6 +13,7 @@ Sentry.init({
// Setting this option to true will print useful information to the console while you're setting up Sentry. // Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false, debug: false,
// uncomment the line below to enable Spotlight (https://spotlightjs.com) // Uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.NODE_ENV === 'development', // spotlight: process.env.NODE_ENV === 'development',
}); });

View File

@ -1,13 +1,13 @@
import { Card } from "@/app/components/card"; import { Colors } from "@/app/common/colors";
import { generateEmbed } from "@/app/common/embed"; import { generateEmbed } from "@/app/common/embed";
import { capitalizeFirstLetter } from "@/app/common/string-utils"; import { capitalizeFirstLetter } from "@/app/common/string-utils";
import { cn } from "@/app/common/utils"; import { cn } from "@/app/common/utils";
import { Card } from "@/app/components/card";
import { Title } from "@/app/components/title";
import { CachedEndpointStatus, getMojangEndpointStatus, Status } from "mcutils-library"; import { CachedEndpointStatus, getMojangEndpointStatus, Status } from "mcutils-library";
import { Metadata, Viewport } from "next"; import { Metadata, Viewport } from "next";
import Link from "next/link"; import Link from "next/link";
import { ReactElement } from "react"; import { ReactElement } from "react";
import { Colors } from "@/app/common/colors";
import { Title } from "@/app/components/title";
/** /**
* Force the page to be dynamic, so it will be regenerated on every request * Force the page to be dynamic, so it will be regenerated on every request
@ -89,20 +89,19 @@ export default async function Page(): Promise<ReactElement> {
> >
{endpoints.length == 0 && <p>Unable to fetch endpoint statuses</p>} {endpoints.length == 0 && <p>Unable to fetch endpoint statuses</p>}
{endpoints.length > 0 && {endpoints.length > 0 &&
endpoints.map((endpoint: CachedEndpointStatus) => { endpoints.map((server: CachedEndpointStatus) => {
const { name, hostname, status } = endpoint; const { name, endpoint, status } = server;
const url = `https://${hostname}`;
return ( return (
<div key={name} className="flex flex-row justify-between pt-2"> <div key={name} className="flex flex-row justify-between pt-2">
<div className="flex flex-col leading-[1.5rem]"> <div className="flex flex-col leading-[1.5rem]">
<p className="font-semibold">{name}</p> <p className="font-semibold">{name}</p>
<Link <Link
href={url} href={endpoint}
className="text-sm text-primary hover:opacity-75 transition-all transform-gpu" className="text-sm text-primary hover:opacity-75 transition-all transform-gpu"
target="_blank" target="_blank"
> >
<p>{url}</p> <p>{endpoint}</p>
</Link> </Link>
</div> </div>
<div className={cn("flex items-center font-semibold", getColor(status))}> <div className={cn("flex items-center font-semibold", getColor(status))}>

View File

@ -5,36 +5,9 @@ import { Button } from "../components/ui/button";
import { Separator } from "../components/ui/separator"; import { Separator } from "../components/ui/separator";
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip"; import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip";
import { Title } from "@/app/components/title"; import { Title } from "@/app/components/title";
import { LandingButton } from "@/app/types/landing/landing-button";
type Button = { const buttons: LandingButton[] = [
/**
* The title of the button.
*/
title: string;
/**
* The tooltip to display for this statistic.
*/
tooltip: string;
/**
* The URL to go to.
*/
url: string;
/**
* Whether clicking the button will
* open the link in a new tab.
*/
openInNewTab?: boolean;
/**
* The class name to apply to the button.
*/
className?: string;
};
const buttons: Button[] = [
{ {
title: "Get Started", title: "Get Started",
tooltip: "Click to get started with the API", tooltip: "Click to get started with the API",

View File

@ -12,23 +12,19 @@ import { CachedPlayer, getPlayer, McUtilsAPIError } from "mcutils-library";
import { Metadata, Viewport } from "next"; import { Metadata, Viewport } from "next";
import { ReactElement } from "react"; import { ReactElement } from "react";
import { Title } from "@/app/components/title"; import { Title } from "@/app/components/title";
import { PlayerPageParams } from "@/app/types/player/page-params";
import { TryAPlayer } from "@/app/components/player/try-a-player";
export const revalidate = 60; export const revalidate = 60;
type Params = { export async function generateViewport({ params: { id } }: PlayerPageParams): Promise<Viewport> {
params: {
id: string;
};
};
export async function generateViewport({ params: { id } }: Params): Promise<Viewport> {
const validPlayer = await isValidPlayer(id); const validPlayer = await isValidPlayer(id);
return { return {
themeColor: validPlayer ? Colors.green : Colors.red, themeColor: validPlayer ? Colors.green : Colors.red,
}; };
} }
export async function generateMetadata({ params: { id } }: Params): Promise<Metadata> { export async function generateMetadata({ params: { id } }: PlayerPageParams): Promise<Metadata> {
// No id provided // No id provided
if (!id || id.length === 0) { if (!id || id.length === 0) {
return generateEmbed({ return generateEmbed({
@ -55,7 +51,7 @@ export async function generateMetadata({ params: { id } }: Params): Promise<Meta
} }
} }
export default async function Page({ params: { id } }: Params): Promise<ReactElement> { export default async function Page({ params: { id } }: PlayerPageParams): Promise<ReactElement> {
let error: string | undefined = undefined; // The error to display let error: string | undefined = undefined; // The error to display
let player: CachedPlayer | undefined = undefined; // The player to display let player: CachedPlayer | undefined = undefined; // The player to display
@ -98,6 +94,9 @@ export default async function Page({ params: { id } }: Params): Promise<ReactEle
</ContextMenuContent> </ContextMenuContent>
</ContextMenu> </ContextMenu>
)} )}
{/* Try a Player */}
{player == null && !error && <TryAPlayer />}
</div> </div>
); );
} }

View File

@ -5,7 +5,6 @@ import { ServerView } from "@/app/components/server/server-view";
import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger } from "@/app/components/ui/context-menu"; import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger } from "@/app/components/ui/context-menu";
import { Colors } from "@/app/common/colors"; import { Colors } from "@/app/common/colors";
import { generateEmbed } from "@/app/common/embed"; import { generateEmbed } from "@/app/common/embed";
import { formatNumber } from "@/app/common/number-utils";
import { isValidServer } from "@/app/common/server"; import { isValidServer } from "@/app/common/server";
import { capitalizeFirstLetter } from "@/app/common/string-utils"; import { capitalizeFirstLetter } from "@/app/common/string-utils";
import config from "@root/config.json"; import config from "@root/config.json";
@ -19,16 +18,11 @@ import {
import { Metadata, Viewport } from "next"; import { Metadata, Viewport } from "next";
import { ReactElement } from "react"; import { ReactElement } from "react";
import { Title } from "@/app/components/title"; import { Title } from "@/app/components/title";
import { ServerPageParams } from "@/app/types/server/page-params";
import { TryAServer } from "@/app/components/server/try-a-server";
export const revalidate = 60; export const revalidate = 60;
type Params = {
params: {
platform: ServerPlatform;
hostname: string;
};
};
/** /**
* Gets the favicon for a server * Gets the favicon for a server
* *
@ -57,14 +51,14 @@ function checkPlatform(platform: ServerPlatform): boolean {
return platform === ServerPlatform.Java || platform === ServerPlatform.Bedrock; return platform === ServerPlatform.Java || platform === ServerPlatform.Bedrock;
} }
export async function generateViewport({ params: { platform, hostname } }: Params): Promise<Viewport> { export async function generateViewport({ params: { platform, hostname } }: ServerPageParams): Promise<Viewport> {
const validPlayer = await isValidServer(platform, hostname); const validPlayer = await isValidServer(platform, hostname);
return { return {
themeColor: validPlayer || !platform ? Colors.green : Colors.red, themeColor: validPlayer || !platform ? Colors.green : Colors.red,
}; };
} }
export async function generateMetadata({ params: { platform, hostname } }: Params): Promise<Metadata> { export async function generateMetadata({ params: { platform, hostname } }: ServerPageParams): Promise<Metadata> {
if (!checkPlatform(platform)) { if (!checkPlatform(platform)) {
// Invalid platform // Invalid platform
return generateEmbed({ return generateEmbed({
@ -82,18 +76,14 @@ export async function generateMetadata({ params: { platform, hostname } }: Param
try { try {
const server = await getServer(platform, hostname); const server = await getServer(platform, hostname);
const { hostname: serverHostname, players } = server; const { hostname: serverHostname } = server;
const favicon = getFavicon(platform, server);
let description = `There is ${formatNumber(players.online)}/${formatNumber(players.max)} players connected!\n\n`;
description += "Click to view more information about the server.";
return generateEmbed({ return generateEmbed({
title: `${serverHostname} ${capitalizeFirstLetter(platform)} Server`, title: `${serverHostname} ${capitalizeFirstLetter(platform)} Server`,
embedTitle: `${capitalizeFirstLetter(platform)} Server: ${serverHostname}`, embedTitle: `${capitalizeFirstLetter(platform)} Server: ${serverHostname}`,
description: description, description: "Click to view more information about the server.",
image: favicon, image: `${config.apiEndpoint}/server/${platform}/preview/${serverHostname}`,
cardType: "summary_large_image",
}); });
} catch (err) { } catch (err) {
// An error occurred // An error occurred
@ -104,7 +94,7 @@ export async function generateMetadata({ params: { platform, hostname } }: Param
} }
} }
export default async function Page({ params: { platform, hostname } }: Params): Promise<ReactElement> { export default async function Page({ params: { platform, hostname } }: ServerPageParams): Promise<ReactElement> {
let error: string | undefined = undefined; // The error to display let error: string | undefined = undefined; // The error to display
let server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer | undefined = undefined; // The server to display let server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer | undefined = undefined; // The server to display
let invalidPlatform: boolean = !checkPlatform(platform); // Whether the platform is invalid let invalidPlatform: boolean = !checkPlatform(platform); // Whether the platform is invalid
@ -133,7 +123,10 @@ export default async function Page({ params: { platform, hostname } }: Params):
<LookupServer currentPlatform={platform.toLowerCase()} currentServer={hostname && hostname[0]} /> <LookupServer currentPlatform={platform.toLowerCase()} currentServer={hostname && hostname[0]} />
</div> </div>
{/* An errored occurred when looking up the server */}
{error && <ErrorCard message={error} />} {error && <ErrorCard message={error} />}
{/* The server */}
{server != null && ( {server != null && (
<ContextMenu> <ContextMenu>
<ContextMenuTrigger asChild> <ContextMenuTrigger asChild>
@ -151,6 +144,9 @@ export default async function Page({ params: { platform, hostname } }: Params):
</ContextMenuContent> </ContextMenuContent>
</ContextMenu> </ContextMenu>
)} )}
{/* Try a Server */}
{server == null && !error && <TryAServer />}
</div> </div>
); );
} }

View File

@ -20,6 +20,11 @@ type Embed = {
* The image to show as the thumbmail. * The image to show as the thumbmail.
*/ */
image?: string; image?: string;
/**
* The type of the card.
*/
cardType?: "summary" | "summary_large_image";
}; };
/** /**
@ -29,13 +34,17 @@ type Embed = {
* @param embedTitle the title of the embed * @param embedTitle the title of the embed
* @param description the description of the embed * @param description the description of the embed
* @param image the image to show as the thumbmail * @param image the image to show as the thumbmail
* @param cardType the type of the card
* @returns the metadata for the embed * @returns the metadata for the embed
*/ */
export function generateEmbed({ title, embedTitle, description, image }: Embed): Metadata { export function generateEmbed({ title, embedTitle, description, image, cardType }: Embed): Metadata {
// Fall back to the title // Fall back to the title
if (!embedTitle) { if (!embedTitle) {
embedTitle = title; embedTitle = title;
} }
if (!cardType) {
cardType = "summary";
}
const metadata: Metadata = { const metadata: Metadata = {
title: `${title}`, title: `${title}`,
@ -44,7 +53,7 @@ export function generateEmbed({ title, embedTitle, description, image }: Embed):
description: description, description: description,
}, },
twitter: { twitter: {
card: "summary", card: cardType,
}, },
}; };

View File

@ -0,0 +1,17 @@
const PASTE_URL: string = "https://paste.fascinated.cc";
/**
* Creates a new haste with the given content.
*
* @param content the content to create the haste with
* @returns the URL of the created haste
*/
export async function createHaste(content: string): Promise<string> {
const response = await fetch(`${PASTE_URL}/api/upload`, {
method: "POST",
body: content,
});
const { id } = await response.json();
return `${PASTE_URL}/${id}`;
}

View File

@ -1,6 +1,15 @@
import { ReactElement } from "react"; import { ReactElement } from "react";
import { CodeHighlighter } from "./code-highlighter"; import { CodeHighlighter } from "./code-highlighter";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog"; import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "./ui/dialog";
import { CreateHasteButton } from "@/app/components/create-haste-button";
type CodeDialogProps = { type CodeDialogProps = {
/** /**
@ -28,12 +37,15 @@ export function CodeDialog({ title, description, code, children }: CodeDialogPro
return ( return (
<Dialog> <Dialog>
<DialogTrigger asChild>{children}</DialogTrigger> <DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent className="max-h-screen md:max-h-[700px] text-sm"> <DialogContent className="text-sm">
<DialogHeader> <DialogHeader>
<DialogTitle>{title}</DialogTitle> <DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription> <DialogDescription>{description}</DialogDescription>
</DialogHeader> </DialogHeader>
<CodeHighlighter code={code} /> <CodeHighlighter code={code} />
<DialogFooter>
<CreateHasteButton content={code} />
</DialogFooter>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
); );

View File

@ -77,6 +77,7 @@ export function CodeHighlighter({ code, language = "json", rounded = true }: Cod
<span className="text-xs text-muted-foreground">{capitalizeFirstLetter(language)}</span> <span className="text-xs text-muted-foreground">{capitalizeFirstLetter(language)}</span>
</div> </div>
{/* Code */}
<SyntaxHighlighter <SyntaxHighlighter
className={cn("max-h-[600px] !bg-secondary break-all rounded-md", rounded && "rounded-md")} className={cn("max-h-[600px] !bg-secondary break-all rounded-md", rounded && "rounded-md")}
language={language} language={language}

View File

@ -0,0 +1,21 @@
"use client";
import { ReactElement } from "react";
import { Button } from "@/app/components/ui/button";
import { CreateHasteButtonProps } from "@/app/types/create-haste-button";
import { createHaste } from "@/app/common/hastebin";
export function CreateHasteButton({ content }: CreateHasteButtonProps): ReactElement {
/**
* Uploads the content to Haste and opens the URL in a new tab.
*/
async function upload(): Promise<void> {
const url = await createHaste(content);
console.log(url);
// Open the URL in a new tab.
window.open(url, "_blank", "noopener,noreferrer");
}
return <Button onClick={() => upload()}>Create Haste</Button>;
}

View File

@ -8,6 +8,7 @@ import { Separator } from "../ui/separator";
import { SkinPartImage } from "./skin-part-image"; import { SkinPartImage } from "./skin-part-image";
import { CacheInformation } from "@/app/components/cache-information"; import { CacheInformation } from "@/app/components/cache-information";
import { PlayerSkin } from "@/app/components/player/player-skin"; import { PlayerSkin } from "@/app/components/player/player-skin";
import { ReloadPageButton } from "@/app/components/reload-page-button";
type PlayerViewProps = { type PlayerViewProps = {
/** /**
@ -38,6 +39,7 @@ export function PlayerView({ player }: PlayerViewProps): ReactElement {
</div> </div>
</Card> </Card>
<div className="flex gap-2 flex-wrap justify-center"> <div className="flex gap-2 flex-wrap justify-center">
<ReloadPageButton />
<CodeDialog <CodeDialog
title="Player Data" title="Player Data"
description="The player's data from the API" description="The player's data from the API"

View File

@ -0,0 +1,49 @@
import { ReactElement } from "react";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/app/components/ui/tooltip";
import Image from "next/image";
import config from "@root/config.json";
import Link from "next/link";
import { Card } from "@/app/components/card";
/**
* The players to try out.
*/
const tryMePlayers: string[] = ["Notch", "jeb_", "Dinnerbone", "Grumm", "deadmau5"];
export function TryAPlayer(): ReactElement {
return (
<Card>
<div className="flex flex-col items-center justify-center text-center">
<div>
<h2 className="text-lg font-semibold">Try a Player</h2>
<p className="text-muted-foreground">Try one of these players to see how the player view works.</p>
</div>
<div className="flex flex-wrap justify-center gap-2 max-w-2xl mt-4">
{tryMePlayers.map(playerName => (
<Tooltip key={playerName}>
<TooltipTrigger asChild>
<div className="flex items-center justify-center bg-background p-1.5 rounded-md gap-2">
<Image
src={`${config.apiEndpoint}/player/head/${playerName}`}
alt={"The player's head"}
width={32}
height={32}
/>
<Link href={`/player/${playerName}`} className="hover:opacity-85 transform-gpu transition-all">
{playerName}
</Link>
</div>
</TooltipTrigger>
<TooltipContent>
<p>
Click to try the player <b>{playerName}</b>.
</p>
</TooltipContent>
</Tooltip>
))}
</div>
</div>
</Card>
);
}

View File

@ -0,0 +1,28 @@
"use client";
import { ReactElement } from "react";
import { Button } from "@/app/components/ui/button";
import { ArrowPathIcon } from "@heroicons/react/16/solid";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/app/components/ui/tooltip";
export function ReloadPageButton(): ReactElement {
/**
* Reload the page.
*/
function reload(): void {
window.location.reload();
}
return (
<Tooltip>
<TooltipTrigger asChild>
<Button onClick={() => reload()}>
<ArrowPathIcon className="w-4 h-4" />
</Button>
</TooltipTrigger>
<TooltipContent>
<p>Reload the page</p>
</TooltipContent>
</Tooltip>
);
}

View File

@ -4,6 +4,7 @@ import { ReactElement } from "react";
import { CodeDialog } from "../code-dialog"; import { CodeDialog } from "../code-dialog";
import { Button } from "../ui/button"; import { Button } from "../ui/button";
import { CacheInformation } from "@/app/components/cache-information"; import { CacheInformation } from "@/app/components/cache-information";
import { ReloadPageButton } from "@/app/components/reload-page-button";
type ServerViewProps = { type ServerViewProps = {
/** /**
@ -30,6 +31,7 @@ export function ServerView({ server, favicon }: ServerViewProps): ReactElement {
/> />
</div> </div>
<div className="flex gap-2 flex-wrap justify-center"> <div className="flex gap-2 flex-wrap justify-center">
<ReloadPageButton />
<CodeDialog <CodeDialog
title="Server Data" title="Server Data"
description="The servers's data from the API" description="The servers's data from the API"

View File

@ -0,0 +1,54 @@
import { ReactElement } from "react";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/app/components/ui/tooltip";
import Image from "next/image";
import Link from "next/link";
import { capitalizeFirstLetter } from "@/app/common/string-utils";
import { Card } from "@/app/components/card";
import { ServerPlatform } from "mcutils-library";
import { TryMeServer } from "@/app/types/server/try-me-server";
/**
* The servers to try out.
*/
const tryMeServers: TryMeServer[] = [
{ platform: ServerPlatform.Java, hostname: "mc.hypixel.net" },
{ platform: ServerPlatform.Java, hostname: "wildprison.net" },
{ platform: ServerPlatform.Java, hostname: "cubecraft.net" },
{ platform: ServerPlatform.Bedrock, hostname: "geo.hivebedrock.network" },
];
export function TryAServer(): ReactElement {
return (
<Card>
<div className="flex flex-col items-center justify-center text-center">
<div>
<h2 className="text-lg font-semibold">Try a Server</h2>
<p className="text-muted-foreground">Try one of these servers to see how the server view works.</p>
</div>
<div className="flex flex-wrap justify-center gap-2 max-w-2xl mt-4">
{tryMeServers.map(({ platform, hostname }) => (
<Tooltip key={hostname}>
<TooltipTrigger asChild>
<div className="flex items-center justify-center bg-background p-1.5 rounded-md gap-2">
<Image src={`/media/platform/${platform}.png`} alt={"The server's platform"} width={28} height={28} />
<Link
href={`/server/${platform}/${hostname}`}
className="hover:opacity-85 transform-gpu transition-all"
>
{hostname}
</Link>
</div>
</TooltipTrigger>
<TooltipContent>
<p>
Click to try the <b>{capitalizeFirstLetter(platform)}</b> server: <b>{hostname}</b>
</p>
</TooltipContent>
</Tooltip>
))}
</div>
</div>
</Card>
);
}

View File

@ -5,10 +5,10 @@ import Container from "./components/container";
import ThemeProvider from "./components/theme-provider"; import ThemeProvider from "./components/theme-provider";
import { Toaster } from "./components/ui/toaster"; import { Toaster } from "./components/ui/toaster";
import { TooltipProvider } from "./components/ui/tooltip"; import { TooltipProvider } from "./components/ui/tooltip";
import { inter } from "@/app/font/fonts";
import config from "@root/config.json";
import "./globals.css"; import "./globals.css";
import config from "@root/config.json";
import { inter } from "@/app/font/fonts";
export const viewport: Viewport = { export const viewport: Viewport = {
themeColor: "#3498DB", themeColor: "#3498DB",

View File

@ -0,0 +1,6 @@
export type CreateHasteButtonProps = {
/**
* The content to create the haste with.
*/
content: string;
};

View File

@ -0,0 +1,27 @@
export type LandingButton = {
/**
* The title of the button.
*/
title: string;
/**
* The tooltip to display for this statistic.
*/
tooltip: string;
/**
* The URL to go to.
*/
url: string;
/**
* Whether clicking the button will
* open the link in a new tab.
*/
openInNewTab?: boolean;
/**
* The class name to apply to the button.
*/
className?: string;
};

View File

@ -0,0 +1,5 @@
export type PlayerPageParams = {
params: {
id: string;
};
};

View File

@ -0,0 +1,8 @@
import { ServerPlatform } from "mcutils-library";
export type ServerPageParams = {
params: {
platform: ServerPlatform;
hostname: string;
};
};

View File

@ -0,0 +1,13 @@
import { ServerPlatform } from "mcutils-library";
export type TryMeServer = {
/**
* The platform of the server.
*/
platform: ServerPlatform;
/**
* The hostname of the server.
*/
hostname: string;
};

9
src/instrumentation.ts Normal file
View File

@ -0,0 +1,9 @@
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('../sentry.server.config');
}
if (process.env.NEXT_RUNTIME === 'edge') {
await import('../sentry.edge.config');
}
}