feat : update
This commit is contained in:
@@ -30,10 +30,10 @@ export function CreateGuideFlow({ characters, existingKeys }: { characters: Char
|
||||
|
||||
if (selected) {
|
||||
return (
|
||||
<Card className="mx-auto max-w-2xl">
|
||||
<Card className="mx-auto w-full max-w-4xl">
|
||||
<CardHeader>
|
||||
<CardTitle>ตั้งค่า Guide ของ {selected.name}</CardTitle>
|
||||
<CardDescription>เพิ่มภาพหน้าปกและ Overview ก่อนสร้าง Guide สาธารณะ</CardDescription>
|
||||
<CardDescription>เพิ่มภาพหน้าปก และใส่ Overview ได้หากต้องการ</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<FieldGroup>
|
||||
@@ -47,7 +47,7 @@ export function CreateGuideFlow({ characters, existingKeys }: { characters: Char
|
||||
<MediaUploader onReady={setCover} />
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="overview">Overview</FieldLabel>
|
||||
<FieldLabel htmlFor="overview">Overview (optional)</FieldLabel>
|
||||
<Textarea id="overview" value={overview} maxLength={500} onChange={(event) => setOverview(event.target.value)} placeholder="สรุปแนวทางเล่น จุดเด่น และสิ่งที่ผู้ชมจะพบใน Guide นี้" />
|
||||
<FieldDescription>{overview.length}/500 ตัวอักษร</FieldDescription>
|
||||
</Field>
|
||||
@@ -55,7 +55,7 @@ export function CreateGuideFlow({ characters, existingKeys }: { characters: Char
|
||||
</CardContent>
|
||||
<CardFooter className="justify-between">
|
||||
<Button type="button" variant="outline" onClick={() => setSelected(null)}><ArrowLeftIcon data-icon="inline-start" />เลือกใหม่</Button>
|
||||
<Button disabled={pending || !cover || !overview.trim()} onClick={() => startTransition(async () => {
|
||||
<Button disabled={pending || !cover} onClick={() => startTransition(async () => {
|
||||
const result = await createStructuredGuide({ characterKey: selected.key, coverMediaId: cover?.id, overview });
|
||||
if (result.status === "error") { toast.error(result.message); return; }
|
||||
toast.success("สร้าง Guide แล้ว");
|
||||
|
||||
Reference in New Issue
Block a user