From 91e9d9c54e31c533c78461446303e35eb6355418 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Fri, 26 Jun 2026 18:44:02 +0700 Subject: [PATCH] feat: add Minecraft server page with copyable address, map integration, and supporting UI components --- app/form/admin/layout.tsx | 8 ++++++ app/form/layout.tsx | 21 ++++++++++++++- app/minecraft/client.tsx | 12 +++++++++ app/minecraft/layout.tsx | 35 +++++++++++++++++++++++++ app/minecraft/page.tsx | 47 ++++++++++++++++++++++++++++++++++ components/copybutton.tsx | 54 +++++++++++++++++++++++++++++++++++++++ components/ui/kbd.tsx | 26 +++++++++++++++++++ lib/utils.ts | 10 ++++++++ next.config.ts | 13 ++++++++++ 9 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 app/minecraft/client.tsx create mode 100644 app/minecraft/layout.tsx create mode 100644 app/minecraft/page.tsx create mode 100644 components/copybutton.tsx create mode 100644 components/ui/kbd.tsx diff --git a/app/form/admin/layout.tsx b/app/form/admin/layout.tsx index 270c643..b53b6da 100644 --- a/app/form/admin/layout.tsx +++ b/app/form/admin/layout.tsx @@ -3,6 +3,14 @@ import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { redirect } from "next/navigation"; import { SidebarProvider } from "@/components/ui/sidebar"; import { AdminSidebar } from "./client"; +import { Metadata } from "next"; + +export const metadata: Metadata = { + title: { + default: "Admin", + template: "%s | Erika!", + }, +} export default async function AdminLayout({ children, diff --git a/app/form/layout.tsx b/app/form/layout.tsx index cc8c7a0..30a7191 100644 --- a/app/form/layout.tsx +++ b/app/form/layout.tsx @@ -4,11 +4,30 @@ import { FormLayoutClient } from "./client"; import LoginDialog from "@/components/login-dialog"; import { Metadata } from "next"; +const siteUrl = process.env.BASE_URL; + export const metadata: Metadata = { title: { - default: "Erika! - กรอกแบบฟอร์ม", + default: "กรอกแบบฟอร์ม", template: "%s | Erika!", }, + openGraph: { + type: "website", + locale: "th_TH", + url: siteUrl, + siteName: "Form", + title: "กรอกแบบฟอร์ม", + description: + "Custom form ของเว็บไซด์", + images: [ + { + url: "/avatar.webp", + width: 512, + height: 512, + alt: "Erika! avatar", + }, + ], + }, } export default async function FormLayout({ diff --git a/app/minecraft/client.tsx b/app/minecraft/client.tsx new file mode 100644 index 0000000..20093a0 --- /dev/null +++ b/app/minecraft/client.tsx @@ -0,0 +1,12 @@ +"use client"; + +export function MapIframe() { + return ( +