Compare commits

...

9 Commits

Author SHA1 Message Date
Renovate Bot
ca343f22c6 chore(deps): update dependency eslint to v9 2024-04-17 04:02:32 +00:00
ab495cd471 embed color
All checks were successful
Deploy Frontend / docker (17, 3.8.5) (push) Successful in 57s
2024-04-16 23:31:15 -04:00
ae4ece4ee5 does this work?
All checks were successful
Deploy Frontend / docker (17, 3.8.5) (push) Successful in 58s
2024-04-16 23:28:12 -04:00
54c116b85c Embed updates
All checks were successful
Deploy Frontend / docker (17, 3.8.5) (push) Successful in 57s
2024-04-16 23:25:41 -04:00
d5187aff6c robots 2024-04-16 23:24:02 -04:00
f4f51b8912 Fix the GitHub star button
All checks were successful
Deploy Frontend / docker (17, 3.8.5) (push) Successful in 56s
2024-04-16 23:15:09 -04:00
51b8d763c1 embed test 2024-04-16 23:15:00 -04:00
45f38396c6 Update player search form
All checks were successful
Deploy Frontend / docker (17, 3.8.5) (push) Successful in 3m6s
2024-04-16 23:10:19 -04:00
b89fd74515 Update for new domain 2024-04-16 22:59:16 -04:00
8 changed files with 56 additions and 22 deletions

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"siteName": "RESTfulMC",
"siteUrl": "http://localhost:3000",
"analyticsDomain": "mc.rainnny.club",
"analyticsDomain": "restfulmc.cc",
"metadata": {
"title": {
"default": "RESTfulMC",
@ -27,7 +27,7 @@
]
},
"viewport": {
"themeColor": "minecraft-green-1"
"themeColor": "#3C8627"
},
"navbarLinks": {
"Player": "/player",

View File

@ -3,7 +3,7 @@
"version": "1.0.0",
"author": "Braydon (Rainnny) <braydonrainnny@gmail.com>",
"description": "A simple, yet useful RESTful API for Minecraft utilizing Springboot.",
"homepage": "https://mc.rainnny.club",
"homepage": "https://restfulmc.cc",
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
@ -25,7 +25,7 @@
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.51.3",
"restfulmc-lib": "^1.1.1",
"restfulmc-lib": "^1.1.2",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7"
},
@ -33,7 +33,7 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint": "^9.0.0",
"eslint-config-next": "14.2.1",
"postcss": "^8",
"sleep-promise": "^9.1.0",

View File

@ -0,0 +1,2 @@
User-Agent: *
Allow: /

View File

@ -79,8 +79,8 @@ export const generateMetadata = async ({
try {
const player: CachedPlayer = await getPlayer(query); // Get the player to embed
return Embed({
title: `${player.username}'s Player`,
description: "Click to view data about this player.",
title: `${player.username}'s Profile`,
description: `UUID: ${player.uniqueId}\n\nClick to view data about this player.`,
thumbnail: player.skin.parts.HEAD,
});
} catch (err) {

View File

@ -68,13 +68,14 @@ const Navbar = (): JSX.Element => {
{/* Social Buttons */}
<div className="hidden md:flex">
{/* Star on Github <3 */}
<MinecraftButton className="group/star">
<Link
className="flex gap-1.5 items-center"
href="https://github.com/Rainnny7/RESTfulMC"
rel="noopener noreferrer"
target="_blank"
>
<Link
className="flex gap-1.5 items-center"
href="https://github.com/Rainnny7/RESTfulMC"
rel="noopener noreferrer"
target="_blank"
>
<MinecraftButton className="group/star">
{/* Star Count */}
<Suspense fallback={<Skeleton className="w-4 h-5 rounded-md" />}>
<GitHubStarCount />
@ -86,8 +87,8 @@ const Navbar = (): JSX.Element => {
height={22}
/>
<span>Star on GitHub</span>
</Link>
</MinecraftButton>
</MinecraftButton>
</Link>
</div>
</nav>
);

View File

@ -1,6 +1,7 @@
import MinecraftButton from "@/components/minecraft-button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { redirect } from "next/navigation";
/**
@ -23,12 +24,16 @@ const PlayerSearch = ({
className="flex flex-col gap-7 justify-center items-center"
action={handleRedirect}
>
<Input
name="query"
placeholder="Username / UUID"
defaultValue={query}
maxLength={36}
/>
<div className="w-full flex flex-col gap-3">
<Label>Username or UUID</Label>
<Input
type="search"
name="query"
placeholder="Query..."
defaultValue={query}
maxLength={36}
/>
</div>
<MinecraftButton type="submit">Search</MinecraftButton>
</form>
);

View File

@ -0,0 +1,26 @@
"use client";
import * as LabelPrimitive from "@radix-ui/react-label";
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";
import { cn } from "@/app/lib/utils";
const labelVariants = cva(
"text-sm font-medium text-zinc-300 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
);
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
VariantProps<typeof labelVariants>
>(({ className, ...props }, ref) => (
<LabelPrimitive.Root
ref={ref}
className={cn(labelVariants(), className)}
{...props}
/>
));
Label.displayName = LabelPrimitive.Root.displayName;
export { Label };