diff --git a/app/thanks/page.tsx b/app/thanks/page.tsx new file mode 100644 index 0000000..c7b0d5e --- /dev/null +++ b/app/thanks/page.tsx @@ -0,0 +1,181 @@ +import type { Metadata } from "next"; +import Image from "next/image"; +import Link from "next/link"; +import { ExternalLinkIcon } from "lucide-react"; + +import { + Avatar, + AvatarFallback, + AvatarImage, +} from "@/components/ui/avatar"; +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +type ThanksProfile = { + username: string; + role: string; + profile: string; + link: string; +}; + +const specialThanks: ThanksProfile[] = [ + + { + username: "Buzz", + role: "Calculator & Guide Creator", + profile: "buzz.png", + link: "https://www.youtube.com/@Genshinmaichaigamemurtur", + }, + { + username: "Gunshin", + role: "Developer", + profile: "gunshin.gif", + link: "https://gunshiz.top" + }, + { + username: "Keqing Kung", + role: "Data Entry", + profile: "keqing.png", + link: "https://discord.com/users/860156010361520138", + }, + { + username: "Mple", + role: "Data Entry", + profile: "mple.png", + link: "https://discord.com/users/527126736651943946", + } +]; + +export const metadata: Metadata = { + title: "Special Thanks", + description: "ขอบคุณทุกคนที่มีส่วนช่วยให้ Buzz Guide เกิดขึ้นได้", +}; + +function getInitials(username: string) { + return username.trim().slice(0, 2).toUpperCase(); +} + +export default function ThanksPage() { + return ( +
+
+
+ + + ไกด์เกนชินไม่ใช่เกมมือถือ + +
+
+ +
+
+

+ Special Thanks +

+

+ ขอบคุณทุกคนที่มอบแรงสนับสนุนและเวลาให้เว็บไซต์นี้เกิดขึ้นได้ +

+
+ + + + Astral Hosting + + Astral Hosting + + + ผู้สนับสนุนหลักด้าน Hosting + + + +

+ ขอบคุณที่สนับสนุนระบบ Hosting ให้ Buzz Guide ออนไลน์และพร้อมใช้งาน +

+
+ + + +
+ + {specialThanks.length > 0 ? ( +
+ {specialThanks.map((person) => ( + + + + + {getInitials(person.username)} + + {person.username} + {person.role ? ( + {person.role} + ) : null} + + +

+ ขอบคุณที่เป็นส่วนสำคัญของ Buzz Guide +

+
+ + + +
+ ))} +
+ ) : ( +
I am sigma number one
+ )} +
+
+ ); +} diff --git a/components/admin/guide-overview-form.tsx b/components/admin/guide-overview-form.tsx index e6349e7..24bd4b0 100644 --- a/components/admin/guide-overview-form.tsx +++ b/components/admin/guide-overview-form.tsx @@ -47,9 +47,8 @@ export function GuideOverviewForm({ id: guide.coverMediaId, url: guide.coverUrl, }); - const invalidYoutubeUrl = Boolean( - youtubeUrl.trim() && !parseYouTubeUrl(youtubeUrl.trim()), - ); + const youtubeVideo = parseYouTubeUrl(youtubeUrl.trim()); + const invalidYoutubeUrl = Boolean(youtubeUrl.trim() && !youtubeVideo); const value = { coverMediaId: cover.id, overview, youtubeUrl }; const incompleteIssues = [ !cover.id ? "กรุณาอัปโหลด Guide Image" : null, @@ -156,6 +155,19 @@ export function GuideOverviewForm({ {invalidYoutubeUrl ? ( กรุณาใส่ลิงก์วิดีโอ YouTube ที่ถูกต้อง ) : null} + {youtubeVideo ? ( +
+