From d6153be50d408e0518c7628c629721983ab039b9 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Mon, 5 Oct 2026 22:40:59 +0700 Subject: [PATCH] feat : update --- app/auth/forgot-password/page.tsx | 13 ++- app/auth/password-reset/page.tsx | 9 +- app/commission/page.tsx | 13 +-- app/page.tsx | 5 +- components/admin/ui/catalog-select.tsx | 10 ++- components/auth/account-form.tsx | 5 +- components/auth/email-action-form.tsx | 26 ++++-- components/auth/sudloh-sign-in-redirect.tsx | 1 + components/commission/commission-intro.tsx | 76 +++++++++++++++++ components/commission/request-form.tsx | 8 +- components/public/condition-switcher.tsx | 2 +- components/public/directory-skeleton.tsx | 24 +++--- components/public/public-navigation.tsx | 59 +++++++++++++ components/public/site-header.tsx | 24 ++---- components/public/structured-directory.tsx | 93 ++++++++++++++++----- components/public/structured-guide.tsx | 10 +-- components/public/stygian-guide.tsx | 4 +- components/stygian/stygian-boss-display.tsx | 4 +- tests/public-performance.test.ts | 2 +- 19 files changed, 304 insertions(+), 84 deletions(-) create mode 100644 components/commission/commission-intro.tsx create mode 100644 components/public/public-navigation.tsx diff --git a/app/auth/forgot-password/page.tsx b/app/auth/forgot-password/page.tsx index 11b3702..efb00e8 100644 --- a/app/auth/forgot-password/page.tsx +++ b/app/auth/forgot-password/page.tsx @@ -1,8 +1,17 @@ import { SiteHeader } from "@/components/public/site-header"; import { EmailActionForm } from "@/components/auth/email-action-form"; +import { connection } from "next/server"; +import { safeAuthReturnPath } from "@/lib/auth/return-path"; +import { isSudlohOidcEnabled } from "@/lib/auth/server"; -export default function ForgotPasswordPage() { +export const instant = false; + +export default async function ForgotPasswordPage({ searchParams }: PageProps<"/auth/forgot-password">) { + await connection(); + const { next } = await searchParams; + const oidcEnabled = isSudlohOidcEnabled(); + const oidcOnly = oidcEnabled && process.env.SUDLOH_OIDC_ONLY === "true"; return
- +
; } diff --git a/app/auth/password-reset/page.tsx b/app/auth/password-reset/page.tsx index 258d9a9..bf33e12 100644 --- a/app/auth/password-reset/page.tsx +++ b/app/auth/password-reset/page.tsx @@ -1,13 +1,18 @@ import { connection } from "next/server"; import { SiteHeader } from "@/components/public/site-header"; import { EmailActionForm } from "@/components/auth/email-action-form"; +import { safeAuthReturnPath } from "@/lib/auth/return-path"; +import { isSudlohOidcEnabled } from "@/lib/auth/server"; export const instant = false; export default async function ResetPasswordPage({ searchParams }: PageProps<"/auth/password-reset">) { await connection(); - const { token, error } = await searchParams; + const { token, error, next } = await searchParams; + const oidcEnabled = isSudlohOidcEnabled(); + const oidcOnly = oidcEnabled && process.env.SUDLOH_OIDC_ONLY === "true"; return
- +
; } diff --git a/app/commission/page.tsx b/app/commission/page.tsx index 5b5df1f..fdb6040 100644 --- a/app/commission/page.tsx +++ b/app/commission/page.tsx @@ -3,8 +3,11 @@ import { Suspense } from "react"; import { connection } from "next/server"; import { SiteHeader } from "@/components/public/site-header"; import { CommissionRequestForm } from "@/components/commission/request-form"; +import { CommissionIntro } from "@/components/commission/commission-intro"; import { CommissionPushEntryPrompt } from "@/components/commission/push-entry-prompt"; import { Button } from "@/components/ui/button"; +import { Card, CardHeader } from "@/components/ui/card"; +import { Skeleton } from "@/components/ui/skeleton"; import { getCustomerSession } from "@/lib/auth/server"; import { getCatalogOptions } from "@/lib/guides/queries"; import { getCommissionAvailability } from "@/lib/commission/availability"; @@ -14,21 +17,21 @@ export const instant = false; async function CommissionContent() { await connection(); const availability = await getCommissionAvailability(); - if (!availability.isOpen) return
+ if (!availability.isOpen) return

ปิดรับ Commission ชั่วคราว

{availability.closureMessage}

-
; +
; const session = await getCustomerSession(); - if (!session) return
+ if (!session) return

เข้าสู่ระบบหรือสมัครสมาชิกก่อนเริ่มคำขอ

-
; +
; const catalog = await getCatalogOptions(); if (!catalog) return

ยังไม่มีข้อมูลตัวละครสำหรับสร้างคำขอ

; return
@@ -43,7 +46,7 @@ export default function CommissionPage() {

Commission

ขอทีม เปรียบเทียบอาวุธหรือกลุ่มดาวตามที่ต้องการ

- + }>
; } diff --git a/app/page.tsx b/app/page.tsx index e4a9079..4afda6f 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,6 +3,7 @@ import { Suspense } from "react"; import { LiveRefresh } from "@/components/live-refresh"; import { GoogleAdsense } from "@/components/public/google-adsense"; +import { DirectorySkeleton } from "@/components/public/directory-skeleton"; import { SiteFooter } from "@/components/public/site-footer"; import { StructuredDirectory } from "@/components/public/structured-directory"; import { SiteHeader } from "@/components/public/site-header"; @@ -23,13 +24,13 @@ export default function HomePage() {

- เลือกตัวละครแล้วส่องดูได้เลย + เลือกตัวละครแล้วส่องดู

ไกด์ตัวละคร อาวุธ อาร์ติแฟกต์ กลุ่มดาว ดาเมทแต่ละทีม และ ส่วนเสริมเล็กๆน้อยๆ

-
diff --git a/components/admin/ui/catalog-select.tsx b/components/admin/ui/catalog-select.tsx index b349380..50c26f0 100644 --- a/components/admin/ui/catalog-select.tsx +++ b/components/admin/ui/catalog-select.tsx @@ -2,6 +2,7 @@ import Image from "next/image"; import { CircleHelpIcon } from "lucide-react"; +import type { ReactNode } from "react"; import { TeamArtifactIcon } from "@/components/public/team-search"; import { @@ -129,6 +130,7 @@ type CatalogSlotSelectProps = CommonSelectProps void; label: string; className?: string; + placeholderIcon?: ReactNode; }; function CatalogSlotSelect({ @@ -143,6 +145,7 @@ function CatalogSlotSelect({ characterBackground = false, searchNames = (item) => [item.name, ...(item.aliases ?? [])], className, + placeholderIcon, }: CatalogSlotSelectProps) { const selected = items.find((item) => item.key === value) ?? null; @@ -168,7 +171,9 @@ function CatalogSlotSelect({ {selected ? ( ) : ( -