From 5d195968ecfbeb02508122b402cc622eccb2358e Mon Sep 17 00:00:00 2001
From: gunshiz
Date: Wed, 7 Oct 2026 17:03:15 +0700
Subject: [PATCH] feat : updae
---
app/commission/page.tsx | 19 +--
app/commission/tickets/page.tsx | 9 +-
app/donate/page.tsx | 4 +-
app/not-found.tsx | 6 +-
app/stygian/page.tsx | 5 +-
app/thanks/page.tsx | 23 +---
bun.lock | 3 +
components/admin/guide-section-editor.tsx | 6 +-
components/auth/account-form.tsx | 102 ++++++++++----
components/auth/email-action-form.tsx | 2 +-
components/auth/registration-otp-form.tsx | 10 +-
components/auth/sign-out-button.tsx | 33 ++++-
components/commission/commission-intro.tsx | 6 +-
components/commission/income-calendar.tsx | 2 +-
components/commission/mobile-slip-form.tsx | 2 +-
components/commission/mobile-slip-handoff.tsx | 10 +-
components/commission/payment-form.tsx | 4 +-
components/commission/request-form.tsx | 13 +-
components/commission/ticket-chat.tsx | 5 +-
components/public/artifact-image-export.tsx | 4 +-
components/public/comparison-context.test.tsx | 35 +++++
components/public/comparison-context.tsx | 23 ++++
components/public/condition-switcher.tsx | 6 +-
components/public/guide-image-export.tsx | 14 +-
components/public/public-account-menu.tsx | 51 +++++++
components/public/public-navigation.tsx | 2 +-
components/public/rotation-help.tsx | 3 +-
components/public/scrollable-nav.tsx | 4 +-
components/public/site-footer.tsx | 4 +-
components/public/site-header.tsx | 4 +-
components/public/structured-directory.tsx | 17 ++-
components/public/structured-guide.tsx | 54 +++++---
components/public/stygian-guide.tsx | 10 +-
components/public/team-search.tsx | 20 ++-
components/public/term-detail.tsx | 4 +-
components/public/weapon-chart.tsx | 124 ++++++------------
components/public/weapon-display-mode.tsx | 6 +-
components/public/weapon-image-export.tsx | 8 +-
components/stygian/stygian-boss-display.tsx | 2 +-
components/ui/input-otp.tsx | 86 ++++++++++++
lib/guides/image-export.test.tsx | 10 +-
package.json | 1 +
tests/security-boundaries.test.ts | 2 +-
43 files changed, 515 insertions(+), 243 deletions(-)
create mode 100644 components/public/comparison-context.test.tsx
create mode 100644 components/public/comparison-context.tsx
create mode 100644 components/public/public-account-menu.tsx
create mode 100644 components/ui/input-otp.tsx
diff --git a/app/commission/page.tsx b/app/commission/page.tsx
index 30e58bd..6af8c8b 100644
--- a/app/commission/page.tsx
+++ b/app/commission/page.tsx
@@ -19,22 +19,23 @@ async function CommissionContent() {
if (!availability.isOpen) return
ปิดรับ Commission ชั่วคราว
{availability.closureMessage}
-
}>
- ดู Ticket และคำขอที่มีอยู่
+
}>
+ ดูคำขอของฉัน
;
const session = await getCustomerSession();
- if (!session) return
-
เข้าสู่ระบบหรือสมัครสมาชิกก่อนเริ่มคำขอ
+ if (!session) return
+
เริ่มคำขอ
+
เข้าสู่ระบบหรือสมัครสมาชิกเพื่อบันทึกคำขอ ติดตามผล และพูดคุยกับทีมงาน
- }>เข้าสู่ระบบ
- }>สมัครสมาชิก
+ }>เข้าสู่ระบบ
+ }>สมัครสมาชิก
-
;
+
;
const catalog = await getCatalogOptions();
if (!catalog) return ยังไม่มีข้อมูลตัวละครสำหรับสร้างคำขอ
;
return
-
}>ดู Ticket ของฉัน
+
}>ดูคำขอของฉัน
;
}
@@ -42,7 +43,7 @@ async function CommissionContent() {
export default function CommissionPage() {
return
-
diff --git a/app/commission/tickets/page.tsx b/app/commission/tickets/page.tsx
index 8b11369..7d024e7 100644
--- a/app/commission/tickets/page.tsx
+++ b/app/commission/tickets/page.tsx
@@ -30,21 +30,22 @@ export default async function CommissionTicketsPage() {
return
-
Ticket ของฉัน
+ คำขอของฉัน
+ แต่ละคำขอมีแชตสำหรับรับผลและพูดคุยกับทีมงาน (Ticket) สถานะแชตบอกว่ายังส่งข้อความได้หรือไม่ ส่วนความคืบหน้าของงานสอบถามได้ในแชต
สร้างคำขอเพิ่ม
{pending.length > 0 && รอชำระเงิน
}
{pending.map((checkout) =>
รอชำระเงิน - ฿{checkout.amount}
{checkout.createdAt.toLocaleString("th-TH")}
)}
- Ticket ที่ชำระเงินแล้ว
- {tickets.length === 0 && ยังไม่มี Ticket
}
+ คำขอที่ชำระเงินแล้ว
+ {tickets.length === 0 && ยังไม่มีคำขอที่ชำระเงินแล้ว
}
{tickets.map(({ ticket, amount }) =>
{ticket.title || `Ticket #${ticket.id.slice(0, 8)}`}
- {ticket.status === "open" ? "เปิดอยู่" : "ปิดแล้ว"}
+ {ticket.status === "open" ? "แชตเปิดอยู่" : "แชตปิดแล้ว"}
฿{amount} - {ticket.updatedAt.toLocaleString("th-TH")}
)}
diff --git a/app/donate/page.tsx b/app/donate/page.tsx
index 70ed0fa..fc183a2 100644
--- a/app/donate/page.tsx
+++ b/app/donate/page.tsx
@@ -1,3 +1,4 @@
+import { Button } from "@/components/ui/button";
import Image from "@/components/ui/resilient-image";
import { SiteFooter } from "@/components/public/site-footer";
@@ -33,8 +34,9 @@ export default function DonatePage() {
priority
/>
+
}>บันทึก QR สำหรับโอนเงิน
- สามารถสแกน QR Code ได้ทุกแอปธนาคาร
+ สแกน QR ด้วยแอปธนาคาร หรือบันทึก QR แล้วเลือกรูปในแอปธนาคารบนมือถือเครื่องนี้
ขอบคุณทุกการสนับสนุน เลิฟๆคับ
diff --git a/app/not-found.tsx b/app/not-found.tsx
index 92b1ab5..e71aa07 100644
--- a/app/not-found.tsx
+++ b/app/not-found.tsx
@@ -20,13 +20,13 @@ export default function NotFound() {
- ไม่พบคู่มือนี้
+ ไม่พบหน้านี้
- หน้านี้อาจถูกซ่อน เปลี่ยนชื่อ หรือยังไม่มีเนื้อหาที่เผยแพร่
+ ลิงก์อาจไม่ถูกต้อง หน้าถูกย้าย หรือคุณไม่มีสิทธิ์เข้าถึง
- }>กลับไปหน้ารวมตัวละคร
+ }>กลับไปหน้ารวมตัวละคร
diff --git a/app/stygian/page.tsx b/app/stygian/page.tsx
index 23bbad2..becda36 100644
--- a/app/stygian/page.tsx
+++ b/app/stygian/page.tsx
@@ -28,10 +28,11 @@ export default async function StygianPage({ searchParams }: { searchParams: Prom
- {schedules.length ?
- {errorsAt(`weapons.${index}`).length > 0 && {errorsAt(`weapons.${index}`).join(" · ")}}
+ {errorsAt(`weapons.${index}`).length > 0 && {errorsAt(`weapons.${index}`).join(" - ")}}
= 100} onClick={() => {
const weapons = structuredClone(request.weapons); weapons[index].weaponKeys.push(""); patch({ weapons });
}}>เพิ่มอาวุธ
@@ -263,21 +263,22 @@ export function CommissionRequestForm({ catalog, userId }: { catalog: Catalog; u
{catalog.characters.find((item) => item.key === set.characterKey)?.name ?? "เลือกตัวละคร"}
- {errorsAt(`constellations.${index}`).length > 0 && {errorsAt(`constellations.${index}`).join(" · ")}}
+ {errorsAt(`constellations.${index}`).length > 0 && {errorsAt(`constellations.${index}`).join(" - ")}}
patch({ constellations: request.constellations.filter((_, i) => i !== index) })}>ลบชุดนี้
)}
patch({ constellations: [...request.constellations, { characterKey: "", levels: [] }] })}>เพิ่มชุดกลุ่มดาว
สรุปคำขอ
- {request.teams.length} ทีม · {request.weapons.reduce((sum, set) => sum + set.weaponKeys.filter(Boolean).length, 0)} อาวุธ · {request.constellations.reduce((sum, set) => sum + set.levels.length, 0)} ระดับกลุ่มดาว
+ {request.teams.length} ทีม - {request.weapons.reduce((sum, set) => sum + set.weaponKeys.filter(Boolean).length, 0)} อาวุธ - {request.constellations.reduce((sum, set) => sum + set.levels.length, 0)} ระดับกลุ่มดาว
{error && {error}}
รวม ฿{commissionPrice(request)}
+
{request.teams.length} ทีม - {request.weapons.reduce((sum, set) => sum + set.weaponKeys.filter(Boolean).length, 0)} อาวุธ - {request.constellations.reduce((sum, set) => sum + set.levels.length, 0)} ระดับกลุ่มดาว
{request.teams.length === 0 && request.weapons.length + request.constellations.length > 0 &&
รวมค่าบริการพื้นฐาน ฿100
}
- void submit()}>{busy ? "กำลังสร้างคำขอ…" : "ยืนยันและชำระเงิน"}
+ void submit()}>{busy ? "กำลังสร้างคำขอ…" : "ยืนยันและชำระเงิน"}
;
diff --git a/components/commission/ticket-chat.tsx b/components/commission/ticket-chat.tsx
index e38acad..cad7706 100644
--- a/components/commission/ticket-chat.tsx
+++ b/components/commission/ticket-chat.tsx
@@ -645,10 +645,11 @@ export function CommissionTicketChat({
แชต{admin ? "กับลูกค้า" : "กับทีมงาน"}
+ {!admin && สถานะนี้บอกว่าส่งข้อความได้หรือไม่ สอบถามความคืบหน้างานได้ในแชต}
- {status === "open" ? "เปิดอยู่" : "ปิดแล้ว"}
+ {admin ? (status === "open" ? "เปิดอยู่" : "ปิดแล้ว") : (status === "open" ? "แชตเปิดอยู่" : "แชตปิดแล้ว")}
{admin &&
(status === "open" ? (
@@ -1080,7 +1081,7 @@ export function CommissionTicketChat({
))}
- {images.length}/10 รูป · สูงสุด 10 MiB ต่อรูป
+ {images.length}/10 รูป - สูงสุด 10 MiB ต่อรูป
)}
diff --git a/components/public/artifact-image-export.tsx b/components/public/artifact-image-export.tsx
index 4af2ab8..688f41d 100644
--- a/components/public/artifact-image-export.tsx
+++ b/components/public/artifact-image-export.tsx
@@ -148,9 +148,9 @@ export function ArtifactImageExport({
return (