Bracket map list dialog display "Tiebreaker" text when appropriate

This commit is contained in:
Kalle
2024-11-28 23:00:55 +02:00
parent 6d6163b99c
commit bfe39f20c1
2 changed files with 15 additions and 1 deletions

View File

@@ -1085,6 +1085,7 @@ function calendarEventWithToToolsTieBreakerMapPool() {
for (const tieBreakerCalendarEventId of [
TO_TOOLS_CALENDAR_EVENT_ID, // PICNIC
TO_TOOLS_CALENDAR_EVENT_ID + 2, // Paddling Pool
TO_TOOLS_CALENDAR_EVENT_ID + 4, // The Depths
]) {
for (const { mode, stageId } of tiebreakerPicks.stageModePairs) {
sql

View File

@@ -740,6 +740,7 @@ function RoundMapList({
}) {
const id = React.useId();
const [editing, setEditing] = React.useState(false);
const tournament = useTournament();
return (
<div>
@@ -806,12 +807,16 @@ function RoundMapList({
}
const isTeamsPick = !maps.list && i === 0;
const isLast = i === maps.count - 1;
return (
<MysteryRow
key={i}
number={i + 1}
isCounterpicks={!isTeamsPick && maps.pickBan === "COUNTERPICK"}
isTiebreaker={
tournament.ctx.mapPickingStyle === "AUTO_ALL" && isLast
}
/>
);
})}
@@ -888,9 +893,11 @@ function MapListRow({
function MysteryRow({
number,
isCounterpicks,
isTiebreaker,
}: {
number: number;
isCounterpicks: boolean;
isTiebreaker: boolean;
}) {
return (
<li className="map-list-dialog__map-list-row">
@@ -900,7 +907,13 @@ function MysteryRow({
})}
>
<span className="text-lg">{number}.</span>
{isCounterpicks ? <>Counterpick</> : <>Team&apos;s pick</>}
{isCounterpicks ? (
<>Counterpick</>
) : isTiebreaker ? (
<>Tiebreaker</>
) : (
<>Team&apos;s pick</>
)}
</div>
</li>
);