chore : match text for both public and admin

This commit is contained in:
2026-10-15 00:36:25 +07:00 Unverified
parent e5fe3082b5
commit 0ac983b1f4
4 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -206,7 +206,7 @@ export function TeamImportPreviewCard({
<Card className={cn(checked && "ring-2 ring-primary")}>
<CardHeader>
<CardTitle>{team.title}</CardTitle>
<CardDescription>โรเทชั่น {seconds} วิ{sourceLabel ? ` - ${sourceLabel}` : ""}</CardDescription>
<CardDescription>Rotation {seconds} วิ{sourceLabel ? ` - ${sourceLabel}` : ""}</CardDescription>
<CardAction>
<Field orientation="horizontal">
<Checkbox id={checkboxId} checked={checked} disabled={disabled} onCheckedChange={(value) => onCheckedChange(value === true)} />
@@ -941,7 +941,7 @@ export function TeamEditor({
className="flex-none"
htmlFor={`team-rotation-${team.clientId}`}
>
Rotation
โรเทชั่น
</FieldLabel>
<Input
id={`team-rotation-${team.clientId}`}
@@ -71,7 +71,7 @@ describe("weapon damage editing", () => {
["0.00", "-"],
["120.00", "120%"],
["120.125", "120.13%"],
["", ""],
["", "-"],
])("displays %s as %s while preserving its raw draft value", async (raw, display) => {
const input = await render(raw);
expect(input.value).toBe(display);
+4 -2
View File
@@ -30,9 +30,11 @@ import { type EditorBase, hasIssuePrefix, parseEditorDraft, ConditionControls, r
function WeaponDamageInput({ value, onFocus, onBlur, ...props }: ComponentProps<typeof Input> & { value: string }) {
const [focused, setFocused] = useState(false);
const numeric = Number(value);
const displayValue = !value.trim() || !Number.isFinite(numeric)
const displayValue = !value.trim()
? "-"
: !Number.isFinite(numeric)
? value
: weaponComparisonPercent(value) ?? "";
: weaponComparisonPercent(value) ?? "-";
return <Input
{...props}
+2 -2
View File
@@ -280,7 +280,7 @@ function TeamCard({
<Card>
<CardHeader>
<CardTitle>{team.title}</CardTitle>
<CardDescription>โรเทชั่น {seconds} วิ</CardDescription>
<CardDescription>โรเทชั่น {seconds} วินาที</CardDescription>
{action ? <CardAction>{action}</CardAction> : null}
</CardHeader>
<CardContent className="flex flex-col gap-4">
@@ -389,7 +389,7 @@ function TeamCard({
<Separator />
<div className="flex items-end justify-between">
<div>
<p className="text-sm text-muted-foreground">{exporting ? "ดาเมจรวม" : "ดาเมจรวมต่อโรเทชั่น"}</p>
<p className="text-sm text-muted-foreground">ดาเมจรวม</p>
<p className="font-semibold">{total.toLocaleString()}</p>
</div>
<div className="text-right">