feat : add all label type
CI / Verify (push) Successful in 1m33s
CI / Build immutable images and deploy (push) Successful in 2m27s

This commit is contained in:
2026-09-26 23:50:15 +07:00 Unverified
parent 4ef1968b04
commit b4de016993
10 changed files with 2881 additions and 37 deletions
+20 -18
View File
@@ -172,6 +172,8 @@ import {
parseTeamPresets,
parseTeamTransfer,
serializeTeamTransfer,
teamConstellationLabel,
teamRefinementLabel,
teamTransferFileName,
teamPresetCookieKey,
teamPresetStorageKey,
@@ -319,8 +321,8 @@ type TeamValue = {
weaponKey: string | null;
artifactKey: string | null;
secondArtifactKey: string | null;
constellation: number;
refinement: number;
constellation: string;
refinement: string;
damage: string;
}>;
};
@@ -2794,8 +2796,8 @@ function TeamEditor({
weaponKey: null,
artifactKey: null,
secondArtifactKey: null,
constellation: 0,
refinement: 1,
constellation: "0",
refinement: "1",
damage: "0",
}));
const teamSensors = useSensors(
@@ -3574,8 +3576,8 @@ function TeamEditor({
weaponKey: null,
artifactKey: null,
secondArtifactKey: null,
constellation: 0,
refinement: 1,
constellation: "0",
refinement: "1",
},
)
}
@@ -3600,7 +3602,7 @@ function TeamEditor({
{
weaponKey:
weaponKey || null,
refinement: 1,
refinement: "1",
},
)
}
@@ -3644,7 +3646,7 @@ function TeamEditor({
teamIndex,
memberIndex,
{
constellation: Number(value),
constellation: value,
},
);
}}
@@ -3655,18 +3657,18 @@ function TeamEditor({
aria-label={`Constellation ของตัวละครตำแหน่ง ${memberIndex + 1}`}
>
<SelectValue>
C{member.constellation}
{teamConstellationLabel(member.constellation)}
</SelectValue>
</SelectTrigger>
<SelectContent>
<SelectGroup>
{[0, 1, 2, 3, 4, 5, 6].map(
{["0", "1", "2", "3", "4", "5", "6", "0-6"].map(
(constellation) => (
<SelectItem
key={constellation}
value={String(constellation)}
>
C{constellation}
{teamConstellationLabel(constellation)}
</SelectItem>
),
)}
@@ -3682,7 +3684,7 @@ function TeamEditor({
teamIndex,
memberIndex,
{
refinement: Number(value),
refinement: value,
},
);
}}
@@ -3693,18 +3695,18 @@ function TeamEditor({
aria-label={`Refinement ของอาวุธตำแหน่ง ${memberIndex + 1}`}
>
<SelectValue>
R{member.refinement}
{teamRefinementLabel(member.refinement)}
</SelectValue>
</SelectTrigger>
<SelectContent>
<SelectGroup>
{[1, 2, 3, 4, 5].map(
{["1", "2", "3", "4", "5", "1-5"].map(
(refinement) => (
<SelectItem
key={refinement}
value={String(refinement)}
>
R{refinement}
{teamRefinementLabel(refinement)}
</SelectItem>
),
)}
@@ -3918,7 +3920,7 @@ function TeamEditor({
return (
<Field key={field} orientation="horizontal">
<Checkbox id={id} checked={applyFields.includes(selection)} onCheckedChange={(checked) => toggleApplyField(selection, checked === true)} />
<FieldLabel htmlFor={id}>{label}{field === "refinement" ? ` (R${member.refinement})` : ""}</FieldLabel>
<FieldLabel htmlFor={id}>{label}{field === "refinement" ? ` (${teamRefinementLabel(member.refinement)})` : ""}</FieldLabel>
</Field>
);
})}
@@ -4129,8 +4131,8 @@ function TeamEditor({
</div>
</div>
<div className="mt-2 flex items-center justify-center gap-1">
<Badge variant="secondary">C{member.constellation}</Badge>
<Badge variant="secondary">R{member.refinement}</Badge>
<Badge variant="secondary">{teamConstellationLabel(member.constellation)}</Badge>
<Badge variant="secondary">{teamRefinementLabel(member.refinement)}</Badge>
</div>
<p className="mt-1 truncate text-sm font-medium">{character?.name ?? member.characterName}</p>
<p className="mt-1 text-sm font-semibold">{Number(member.damage).toLocaleString()}</p>