補上先攻勾選顯示並更新 README

This commit is contained in:
2026-04-16 16:49:02 +08:00
parent af7ebda9f4
commit b3809b5d4f
3 changed files with 73 additions and 2 deletions

View File

@@ -276,6 +276,7 @@ export function ScoreboardPage({
onSwapTeams={onSwapMatchup}
score={scoreState.scoreLeft}
serviceCourt={scoreState.serving === 'left' ? servingCourt : null}
showServingPrompt={scoreState.serving === null}
team={leftTeam}
teamSlot="top"
/>
@@ -303,6 +304,7 @@ export function ScoreboardPage({
onSwapTeams={onSwapMatchup}
score={scoreState.scoreRight}
serviceCourt={scoreState.serving === 'right' ? servingCourt : null}
showServingPrompt={scoreState.serving === null}
team={rightTeam}
teamSlot="bottom"
/>
@@ -379,6 +381,7 @@ type ScoreboardTeamPanelProps = {
onSwapTeams: () => void
score: number
serviceCourt: CourtSide | null
showServingPrompt: boolean
team: GroupTeam | null
teamSlot: 'top' | 'bottom'
}
@@ -395,6 +398,7 @@ function ScoreboardTeamPanel({
onSwapTeams,
score,
serviceCourt,
showServingPrompt,
team,
teamSlot,
}: ScoreboardTeamPanelProps) {
@@ -450,13 +454,22 @@ function ScoreboardTeamPanel({
const serveBar = (
<button
className={
currentServer && !canArrangeMatch ? 'serve-lane serve-lane-locked' : 'serve-lane'
currentServer && !canArrangeMatch
? 'serve-lane serve-lane-locked'
: showServingPrompt
? 'serve-lane serve-lane-prompt'
: 'serve-lane'
}
disabled={!canArrangeMatch || !team}
type="button"
onClick={onSetServing}
>
<span className="serve-lane-box" />
{showServingPrompt ? (
<span aria-hidden="true" className="serve-lane-arrow">
{teamSlot === 'top' ? '↓' : '↑'}
</span>
) : null}
<span className={currentServer ? 'serve-lane-box serve-lane-box-checked' : 'serve-lane-box'} />
<span></span>
{currentServer ? (
<small>