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

View File

@ -3,7 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"author": "Braydon (Rainnny) <braydonrainnny@gmail.com>", "author": "Braydon (Rainnny) <braydonrainnny@gmail.com>",
"description": "A simple, yet useful RESTful API for Minecraft utilizing Springboot.", "description": "A simple, yet useful RESTful API for Minecraft utilizing Springboot.",
"homepage": "https://mc.rainnny.club", "homepage": "https://restfulmc.cc",
"scripts": { "scripts": {
"dev": "next dev --turbo", "dev": "next dev --turbo",
"build": "next build", "build": "next build",
@ -25,7 +25,7 @@
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"react-hook-form": "^7.51.3", "react-hook-form": "^7.51.3",
"restfulmc-lib": "^1.1.1", "restfulmc-lib": "^1.1.2",
"tailwind-merge": "^2.2.2", "tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7" "tailwindcss-animate": "^1.0.7"
}, },
@ -33,7 +33,7 @@
"@types/node": "^20", "@types/node": "^20",
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"eslint": "^8", "eslint": "^9.0.0",
"eslint-config-next": "14.2.1", "eslint-config-next": "14.2.1",
"postcss": "^8", "postcss": "^8",
"sleep-promise": "^9.1.0", "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 { try {
const player: CachedPlayer = await getPlayer(query); // Get the player to embed const player: CachedPlayer = await getPlayer(query); // Get the player to embed
return Embed({ return Embed({
title: `${player.username}'s Player`, title: `${player.username}'s Profile`,
description: "Click to view data about this player.", description: `UUID: ${player.uniqueId}\n\nClick to view data about this player.`,
thumbnail: player.skin.parts.HEAD, thumbnail: player.skin.parts.HEAD,
}); });
} catch (err) { } catch (err) {

View File

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

View File

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