diff --git a/components/admin/stygian-editor.tsx b/components/admin/stygian-editor.tsx
index 13717ca..3bb1422 100644
--- a/components/admin/stygian-editor.tsx
+++ b/components/admin/stygian-editor.tsx
@@ -7,6 +7,7 @@ import {
GripVerticalIcon,
PlusIcon,
Trash2Icon,
+ UserRoundIcon,
} from "lucide-react";
import {
closestCenter,
@@ -107,6 +108,10 @@ type Recommendation = {
items: StoredItem[];
};
+const characterPlaceholderIcon = ;
+const weaponPlaceholderIcon = ;
+const artifactPlaceholderIcon = ;
+
function toInput(item: StoredItem): StygianRecommendationItemInput | null {
if (
(item.kind === "character" ||
@@ -120,8 +125,8 @@ function toInput(item: StoredItem): StygianRecommendationItemInput | null {
catalogKey: item.catalogKey,
weaponKey: item.weaponKey,
artifactKey: item.artifactKey,
- constellationLevel: item.constellationLevel,
- refinement: item.refinement,
+ constellationLevel: item.constellationLevel ?? 0,
+ refinement: item.refinement ?? 1,
}
: { kind: item.kind, catalogKey: item.catalogKey };
}
@@ -206,8 +211,8 @@ function ItemPicker({
catalogKey,
weaponKey: null,
artifactKey: null,
- constellationLevel: null,
- refinement: null,
+ constellationLevel: 0,
+ refinement: 1,
});
else if (kind === "weapon") onAdd({ kind, catalogKey });
else onAdd({ kind: "artifact", catalogKey });
@@ -286,6 +291,7 @@ function AddCharacterSlot({
value=""
label="Choose character"
placeholder="Search character…"
+ placeholderIcon={characterPlaceholderIcon}
emptyLabel="No matches"
className="rounded-lg border-dashed"
onValueChange={(catalogKey) => {
@@ -295,8 +301,8 @@ function AddCharacterSlot({
catalogKey,
weaponKey: null,
artifactKey: null,
- constellationLevel: null,
- refinement: null,
+ constellationLevel: 0,
+ refinement: 1,
});
}}
/>
@@ -373,6 +379,7 @@ function VisualRecommendation({
value={character.key}
label="Choose character"
placeholder="Search character…"
+ placeholderIcon={characterPlaceholderIcon}
emptyLabel="No matches"
className={cn(
"rounded-lg border-0 [&>img]:p-0",
@@ -384,8 +391,8 @@ function VisualRecommendation({
catalogKey,
weaponKey: null,
artifactKey: null,
- constellationLevel: null,
- refinement: null,
+ constellationLevel: 0,
+ refinement: 1,
});
}}
/>
@@ -397,6 +404,7 @@ function VisualRecommendation({
value={weapon?.key ?? ""}
label={`Choose weapon for ${character.name}`}
placeholder="Search weapon…"
+ placeholderIcon={weaponPlaceholderIcon}
emptyLabel="No matches"
onValueChange={(weaponKey) =>
updateCharacter({
@@ -415,6 +423,7 @@ function VisualRecommendation({
value={artifact?.key ?? ""}
label={`Choose artifact for ${character.name}`}
placeholder="Search artifact…"
+ placeholderIcon={artifactPlaceholderIcon}
emptyLabel="No matches"
onValueChange={(artifactKey) =>
updateCharacter({ artifactKey: artifactKey || null })
@@ -429,6 +438,7 @@ function VisualRecommendation({
value={artifact?.key ?? ""}
label={`Choose artifact for ${character.name}`}
placeholder="Search artifact…"
+ placeholderIcon={artifactPlaceholderIcon}
emptyLabel="No matches"
onValueChange={(artifactKey) =>
updateCharacter({ artifactKey: artifactKey || null })
@@ -440,9 +450,17 @@ function VisualRecommendation({
value={weapon?.key ?? ""}
label={`Choose weapon for ${character.name}`}
placeholder="Search weapon…"
+ placeholderIcon={weaponPlaceholderIcon}
emptyLabel="No matches"
onValueChange={(weaponKey) =>
- updateCharacter({ weaponKey: weaponKey || null })
+ updateCharacter({
+ weaponKey: weaponKey || null,
+ refinement: weaponKey
+ ? item.kind === "character"
+ ? (item.refinement ?? 1)
+ : 1
+ : null,
+ })
}
/>
@@ -451,15 +469,10 @@ function VisualRecommendation({
{teamLayout && item.kind === "character" ? (
updateCharacter({
- constellationLevel: next === "none" ? null : Number(next),
+ constellationLevel: Number(next),
})
}
triggerProps={{
@@ -468,14 +481,11 @@ function VisualRecommendation({
}}
/>
updateCharacter({
- refinement: next === "none" ? null : Number(next),
+ refinement: Number(next),
})
}
triggerProps={{
@@ -505,6 +515,7 @@ function VisualRecommendation({
value={item.catalogKey}
label="Change weapon"
placeholder="Search weapon…"
+ placeholderIcon={weaponPlaceholderIcon}
emptyLabel="No matches"
className="rounded-lg border-0"
onValueChange={(catalogKey) => {
@@ -525,6 +536,7 @@ function VisualRecommendation({
value={item.catalogKey}
label="Change artifact"
placeholder="Search artifact…"
+ placeholderIcon={artifactPlaceholderIcon}
emptyLabel="No matches"
className="rounded-lg border-0"
onValueChange={(catalogKey) => {
@@ -1018,7 +1030,7 @@ export function StygianEditor({
artifacts: CatalogItem[];
}) {
const [version, setVersion] = useState(schedule.version);
- const [level, setLevel] = useState<105 | 110>(110);
+ const [level, setLevel] = useState<105 | 110>(105);
const [bossPosition, setBossPosition] = useState(0);
return (
@@ -1080,7 +1092,7 @@ export function StygianEditor({
);
diff --git a/components/public/stygian-guide.tsx b/components/public/stygian-guide.tsx
index b20ef48..5c2fee6 100644
--- a/components/public/stygian-guide.tsx
+++ b/components/public/stygian-guide.tsx
@@ -121,7 +121,7 @@ function BossCard({ schedule, level, position, catalog }: { schedule: Schedule;
export function StygianGuide({ schedule, catalog }: { schedule: Schedule; catalog: Catalog }) {
return (
-
+
เลือกระดับบอส
{stygianLevels.map((level) => (
@@ -138,7 +138,7 @@ export function StygianGuide({ schedule, catalog }: { schedule: Schedule; catalo
const label = boss?.name ?? `Boss ${position + 1}`;
const positionLabel = stygianBossPositionLabels[position];
return
-
+
;
})}