fix(stygian) : improve picker defaults and open level 105 first
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
GripVerticalIcon,
|
||||
PlusIcon,
|
||||
Trash2Icon,
|
||||
UserRoundIcon,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
closestCenter,
|
||||
@@ -107,6 +108,10 @@ type Recommendation = {
|
||||
items: StoredItem[];
|
||||
};
|
||||
|
||||
const characterPlaceholderIcon = <UserRoundIcon className="size-10" aria-hidden="true" />;
|
||||
const weaponPlaceholderIcon = <Image src="/icon/nav/Weapon.png" alt="" width={32} height={32} className="size-8 object-contain opacity-60" />;
|
||||
const artifactPlaceholderIcon = <Image src="/icon/nav/Artifact.webp" alt="" width={32} height={32} className="size-8 object-contain opacity-60" />;
|
||||
|
||||
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,
|
||||
})
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
@@ -451,15 +469,10 @@ function VisualRecommendation({
|
||||
{teamLayout && item.kind === "character" ? (
|
||||
<div className="mt-1 grid grid-cols-2 gap-1">
|
||||
<ConstellationSelect
|
||||
includeNone
|
||||
value={
|
||||
item.constellationLevel === null
|
||||
? "none"
|
||||
: String(item.constellationLevel)
|
||||
}
|
||||
value={String(item.constellationLevel ?? 0)}
|
||||
onValueChange={(next) =>
|
||||
updateCharacter({
|
||||
constellationLevel: next === "none" ? null : Number(next),
|
||||
constellationLevel: Number(next),
|
||||
})
|
||||
}
|
||||
triggerProps={{
|
||||
@@ -468,14 +481,11 @@ function VisualRecommendation({
|
||||
}}
|
||||
/>
|
||||
<RefinementSelect
|
||||
includeNone
|
||||
disabled={!weapon}
|
||||
value={
|
||||
item.refinement === null ? "none" : String(item.refinement)
|
||||
}
|
||||
value={String(item.refinement ?? 1)}
|
||||
onValueChange={(next) =>
|
||||
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 (
|
||||
<div className="flex flex-col gap-6">
|
||||
@@ -1080,7 +1092,7 @@ export function StygianEditor({
|
||||
<StygianBossTab
|
||||
boss={boss}
|
||||
position={position}
|
||||
priority={entry === 110}
|
||||
priority={entry === 105}
|
||||
/>
|
||||
</TabsTrigger>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user