diff --git a/app/api/guides/[guideId]/artifacts/image/route.tsx b/app/api/guides/[guideId]/artifacts/image/route.tsx
index 3f0d342..4b090af 100644
--- a/app/api/guides/[guideId]/artifacts/image/route.tsx
+++ b/app/api/guides/[guideId]/artifacts/image/route.tsx
@@ -8,8 +8,8 @@ import { rarityGradient } from "@/lib/catalog/rarity";
import { artifactTierCount } from "@/lib/guides/artifacts";
import { getCachedPublicArtifactExport } from "@/lib/cache/public";
import { imageContentDisposition } from "@/lib/guides/export-image";
-import { normalizeTargetStat, statPriorityColor, targetStatIconName, targetStatOptions } from "@/lib/guides/stats";
-import { normalizeTalentPriorities, talentTypeLabel } from "@/lib/guides/talents";
+import { normalizeTargetStat, recommendedStatIconName, statPriorityColor, targetStatIconName, targetStatOptions } from "@/lib/guides/stats";
+import { normalizeTalentPriorities, talentRelationSymbol, talentTypeLabel } from "@/lib/guides/talents";
const anuphanFonts = Promise.all(
[
@@ -118,13 +118,21 @@ export async function GET(
]);
const profile = guide.profile;
+ const recommendedStatAsset = (value: string) => {
+ const iconName = recommendedStatIconName(value);
+ const iconIndex = targetStatOptions.findIndex((stat) => targetStatIconName(stat) === iconName);
+ return iconIndex >= 0 ? targetStatAssets[iconIndex] : null;
+ };
const groupRowHeights = guide.groups.map((group) => group.rows.map((row) => Math.max(76, 76 + (row.note ? Math.ceil(row.note.length / 58) * 22 : 0))));
const tierListHeight = guide.groups.reduce((sum, _group, groupIndex) => sum + 68 + groupRowHeights[groupIndex].reduce((groupSum, rowHeight) => groupSum + rowHeight, 0), 0) + Math.max(0, guide.groups.length - 1) * 16;
const detailHeight = profile
? 60 + profile.targets.length * 40 + (profile.talents.length ? 82 : 0) + (profile.note ? Math.max(48, Math.ceil(profile.note.length / 58) * 24) : 0)
: 0;
+ const mainStatExtraHeight = profile
+ ? Math.max(0, Math.max(profile.sands.length, profile.goblet.length, profile.circlet.length) - 2) * 24
+ : 0;
const profileHeight = profile
- ? 242 + (profile.substats.length ? 92 + profile.substats.length * 18 : 0)
+ ? 242 + mainStatExtraHeight + (profile.substats.length ? 92 + profile.substats.length * 18 : 0)
: 0;
const leftHeight = tierListHeight + (profile ? profileHeight + 16 : 0);
const rightHeight = detailHeight > 60 ? detailHeight : 0;
@@ -219,7 +227,7 @@ export async function GET(
{stat.label}
- {stat.values.length ? stat.values.map((value, index) =>
{statLabel(value)}) : "—"}
+ {stat.values.length ? stat.values.map((value, index) =>
{recommendedStatAsset(value) ?
: null}{statLabel(value)}) : "—"}
))}
@@ -229,9 +237,9 @@ export async function GET(
{profile?.substats.length ? (
-
ลำดับค่าสถานะ:
+
ออฟรอง
- {profile.substats.map((stat, index) =>
{statLabel(stat)})}
+ {profile.substats.map((stat, index) =>
{recommendedStatAsset(stat) ?
: null}{statLabel(stat)})}
) : null}
@@ -248,7 +256,7 @@ export async function GET(
const iconIndex = targetStatOptions.findIndex((stat) => stat === normalizeTargetStat(target.stat));
return (
-
{iconIndex >= 0 ?
: null}{normalizeTargetStat(target.stat) ?? target.stat}{target.value}
+
{iconIndex >= 0 ?
: null}{normalizeTargetStat(target.stat) ?? target.stat}{target.value}
);
})}
@@ -265,7 +273,7 @@ export async function GET(
{talent.type}{talent.level ? ` เลเวล ${talent.level}+` : ""}
{talentTypeLabel(talent.type)}
- {index < talents.length - 1 ? {talent.relationToNext === "gte" ? ">=" : ">"} : null}
+ {index < talents.length - 1 ? {talentRelationSymbol(talent.relationToNext)} : null}
))}
diff --git a/components/admin/guide-overview-form.tsx b/components/admin/guide-overview-form.tsx
index 3a6f3b2..93069e2 100644
--- a/components/admin/guide-overview-form.tsx
+++ b/components/admin/guide-overview-form.tsx
@@ -25,5 +25,5 @@ export function GuideOverviewForm({ guide }: { guide: { id: string; version: num
initialVersion: guide.version,
persist: (next, expectedVersion) => saveGuideOverview(guide.id, { ...next, expectedVersion }),
});
- return Overviewภาพและข้อความนี้แสดงบนหน้าแรกและส่วนแนะนำของ GuideGuide Image
setCover(asset)} />Overview;
+ return Overviewภาพและข้อความนี้แสดงบนหน้าแรกและส่วนแนะนำของ GuideGuide Image
setCover(asset)} />Overview;
}
diff --git a/components/admin/guide-section-editor.tsx b/components/admin/guide-section-editor.tsx
index 7cc25a4..936fe87 100644
--- a/components/admin/guide-section-editor.tsx
+++ b/components/admin/guide-section-editor.tsx
@@ -28,6 +28,7 @@ import {
} from "@dnd-kit/core";
import {
arrayMove,
+ horizontalListSortingStrategy,
SortableContext,
sortableKeyboardCoordinates,
useSortable,
@@ -212,12 +213,10 @@ function TalentLevelPicker({ value, onChange }: { value?: string; onChange: (val
function SortableTalentCard({
talent,
- index,
catalogTalent,
onLevelChange,
}: {
talent: TalentPriority;
- index: number;
catalogTalent?: CatalogTalent;
onLevelChange: (level?: string) => void;
}) {
@@ -231,7 +230,7 @@ function SortableTalentCard({
{catalogTalent?.iconUrl ? : null}
- {index + 1}. {catalogTalent?.name ?? talent.type}
+ {talent.type}. {catalogTalent?.name ?? talent.type}
- Recommended Statsเลือกค่าจากรายการแทนปุ่ม และเลือก Main Stat ได้สูงสุด 2 ค่าต่อชิ้น
+ Recommended Statsเลือกค่าจากรายการแทนปุ่ม และเลือก Main Stat ได้สูงสุด 3 ค่าต่อชิ้น
-
-
-
+
+
+